From patchwork Fri Oct 20 17:07:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10020711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 56703602CB for ; Fri, 20 Oct 2017 17:07:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 437A528372 for ; Fri, 20 Oct 2017 17:07:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3601228F23; Fri, 20 Oct 2017 17:07:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2AB628372 for ; Fri, 20 Oct 2017 17:07:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2385C6EC9B; Fri, 20 Oct 2017 17:07:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEB216EC94; Fri, 20 Oct 2017 17:07:16 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7141C607BA; Fri, 20 Oct 2017 17:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1508519236; bh=cpZTrnGyg+u3GluPC+9eTZ2wHXHacwjgyoO+FmKxk2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cokv98y1lqS8nKJdC+3UMMAJuLYpuYWUaF4rIKFxn629dtf5gw7P/Orty2IYPOuDD 49TNCp/BIeYz35Yx8s/F9dgQhwrX/piOTNezljAT9HpTHDMyk/V0GHm+CGvknP5pta xrUvvl7sDnVXGbmqkxPtKYDZKrS6DvWiN4pTRnLQ= Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 03C3F607B3; Fri, 20 Oct 2017 17:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1508519232; bh=cpZTrnGyg+u3GluPC+9eTZ2wHXHacwjgyoO+FmKxk2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AQQS40PO2UYwC6zVcRxoPk3fGLs7VkJK6ZClUo6RJ93RN7AjQycGlVr0V5i9Wz1yb cvM17/Y6ifi8nEy4M8Dqr29i5MNmHyL+uLyYqR47dEqROtkUj2uMjJr27K7McDFzlY zt17LP7BK6lC2YwU4UpxVZ8FWLRixSt/jYoGhDKg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 03C3F607B3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 8/9] drm/msm: Removed unused struct_mutex_task Date: Fri, 20 Oct 2017 11:07:02 -0600 Message-Id: <1508519223-10631-9-git-send-email-jcrouse@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508519223-10631-1-git-send-email-jcrouse@codeaurora.org> References: <1508519223-10631-1-git-send-email-jcrouse@codeaurora.org> Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Recent changes to locking have rendered struct_mutex_task unused. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.h | 6 ------ drivers/gpu/drm/msm/msm_gem_submit.c | 2 -- 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 9853e3e..c46dc12 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -154,12 +154,6 @@ struct msm_drm_private { struct shrinker shrinker; struct msm_vblank_ctrl vblank_ctrl; - - /* task holding struct_mutex.. currently only used in submit path - * to detect and reject faults from copy_from_user() for submit - * ioctl. - */ - struct task_struct *struct_mutex_task; }; struct msm_format { diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 9e087cf..d68bfa6 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -449,7 +449,6 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, goto out_unlock; } } - priv->struct_mutex_task = current; submit = submit_create(dev, gpu, queue, args->nr_bos, args->nr_cmds); if (!submit) { @@ -569,7 +568,6 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, out_unlock: if (ret && (out_fence_fd >= 0)) put_unused_fd(out_fence_fd); - priv->struct_mutex_task = NULL; mutex_unlock(&dev->struct_mutex); return ret; }