From patchwork Thu Jul 9 21:32:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 6760131 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4A1479F319 for ; Thu, 9 Jul 2015 21:30:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 739C02078F for ; Thu, 9 Jul 2015 21:30:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6E455207A1 for ; Thu, 9 Jul 2015 21:30:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0561B7A081; Thu, 9 Jul 2015 14:30:44 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD0F97A00F for ; Thu, 9 Jul 2015 14:30:40 -0700 (PDT) Received: by widjy10 with SMTP id jy10so255692615wid.1 for ; Thu, 09 Jul 2015 14:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=9sXkl94eRV3JEzoqcAC4P7xaOjZr3ufH3gOijEAeXAo=; b=LeS7XWNvk89r7ndkpIxM05LLD+kObCes4zL5Q/w9Ufe6bQ/gViBpFxkJIEuB6rZzUj DAIBDZeVkgS+KX8FTxvpVtWCVW2CXn/O+XXCLc2DYnsT1MWUTYiY4vDsW3KENXw72Lop EzG026IpEppVIfsC5OfcCoRou0NswueIOdIss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=9sXkl94eRV3JEzoqcAC4P7xaOjZr3ufH3gOijEAeXAo=; b=HDZ3GoV7gze1Y5weH33jCWogp0VI753870ZIL1xXniC8PrAAHztttf5jtMfU9EI+AR p4oIqIt1YZDq17t8cD8k5SNjSCRcON7JEaIUHNOnhmS93Wzc64E7E10RBCe0nm0A0VOS bUQMqqsmRJi5GizLcsj8HXBhubMIQkog5I1ehVg6KR0mkiQREzsK1PbsvlqDdmMYb0l9 rVFQ72KMy7hWxd5vmb08kO6mL7yWbGO/wGtK5XtO9DyJESmM+4zTKs+5xRmgaSxRNNjj bTUJ33YSuGs19Yy/osImvLPbQCIuQ0NjEgDXE509AW09atjGSHiIWK94XU+xhOCUzHiE aVag== X-Gm-Message-State: ALoCoQm/TVy3t9nFzo378HtrO4idWeBckbgJLQFUW4gJtIxbsbUJxy3f1L2sqtohjIHFeKfV3jxZ X-Received: by 10.180.75.78 with SMTP id a14mr126202394wiw.43.1436477439659; Thu, 09 Jul 2015 14:30:39 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id j6sm3004128wix.5.2015.07.09.14.30.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 14:30:38 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Thu, 9 Jul 2015 23:32:50 +0200 Message-Id: <1436477570-4936-19-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436477570-4936-1-git-send-email-daniel.vetter@ffwll.ch> References: <1436477570-4936-1-git-send-email-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Cc: Alex Deucher , Daniel Vetter , Intel Graphics Development , =?UTF-8?q?Christian=20K=C3=B6nig?= , Daniel Vetter Subject: [Intel-gfx] [PATCH 18/18] drm/amdgpu: don't grab dev->struct_mutex in pm functions X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Similar to radeon, except that amdgpu doesn't even use struct_mutex to protect anything like the shared z buffer (sane gpu architecture, yay!). And the code already grabs the globa adev->ring_lock, so this code can't race with itself. Which makes struct_mutex completely redundnant. Remove it. Cc: Alex Deucher Cc: "Christian König" Signed-off-by: Daniel Vetter Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) Reviewed-by: Thierry Reding --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index ed13baa7c976..535d90254673 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -580,7 +580,6 @@ force: amdgpu_dpm_print_power_state(adev, adev->pm.dpm.requested_ps); } - mutex_lock(&adev->ddev->struct_mutex); mutex_lock(&adev->ring_lock); /* update whether vce is active */ @@ -628,7 +627,6 @@ force: done: mutex_unlock(&adev->ring_lock); - mutex_unlock(&adev->ddev->struct_mutex); } void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable)