Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1255891pxb; Thu, 23 Sep 2021 23:46:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+sLwZ7JW0enLXf4OxXJknW9TZvRuRDN4Ik5SqSij7/2XHcRppkSjssx2iyP97tp5+tqZK X-Received: by 2002:a50:bae6:: with SMTP id x93mr3272211ede.232.1632465974876; Thu, 23 Sep 2021 23:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632465974; cv=none; d=google.com; s=arc-20160816; b=A10iFnaV7ekWWG9evnPuQAVvmlwwz8Bo07HtRkfpufvQ9RNm8vQgbUQqvLNPSlp85w kEuvrqQJLccFvNLriuMcdVJdReag0wOd0gQmw1J+j34PR3xSBmT3CytkuIN59An/b9kQ b2tabqhAlM8abYIscejp5w9kQi0o4NSFXXFwqHbZ2m2KUWmfbselbm7V04CofYFsd9kh j2eWUeDMVmUrNbyXAfQbCxTGjyWWXxgu6Kq3g1iPSJHMh21cD2AjkmjFmyRVx0nuKwOE pWKPmm+4lnWnm5QWLPjtNnRdhvy2zq6g2ldBG2eQXMzW4tdR8rHuPDOHGeAxioWYkzx3 1oUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=wTeB+AcsPUqMTkq0tx5O/S28gFdBW8XNnb+QC7S+PpM=; b=APF9HeMnralV3Vd2wJ4v887/l7O+/U19szJxXwmacQsUHtWJ6xqN9MfTYiKIJyDN8+ 7jK0/SV+rRfHIl15iUozVJ99wCTPSNvlTJJvibGxR8s/iRZkPyQee3s9RlHc6FzRPm1w VK3wZwfsscp8vdVdOJ0w3IjRowhLgtfGLfZo5/lgs9VCsVXwS1145k1W0ZZFNXRlLF8O /MvrqmDLbMELD9QFofciTWqlhsgaVkCzmJv+uBO3QVzz+Z53miALoca4g/v1Jpzbp9bb AfP/8A5jN+esP9C5DaCN3yApqRIS27t5f/4vQ9D7nN7jtI83PL0Syc7RsHX8cF7FQim3 0vXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=QlZT4Uh2; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NNNBAoIs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si8625726edq.233.2021.09.23.23.45.51; Thu, 23 Sep 2021 23:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=QlZT4Uh2; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NNNBAoIs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244420AbhIXGpv (ORCPT + 99 others); Fri, 24 Sep 2021 02:45:51 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:46753 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244366AbhIXGpi (ORCPT ); Fri, 24 Sep 2021 02:45:38 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 5BD60581075; Fri, 24 Sep 2021 02:44:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 24 Sep 2021 02:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u92.eu; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=wTeB+AcsPUqMT kq0tx5O/S28gFdBW8XNnb+QC7S+PpM=; b=QlZT4Uh2QAi43G9r1MwJXHAURmNz7 stKwPMetOSzjIhXUcDNJHD1B8AndSEBDalf6GiPt1flVVrA9j/AAk+W7x996RZ+J tC7onfLqobCCuZXYBGHAxZCmugI9owsvAkbpXuTWfUHgxfz5Dcs+pc+RzD7Ciq56 V5Kt6fTt7XwNKQnIdizRRvBxdtwpFScogNyCrOPyTSykKH0oCYAYien8PhQyRuf2 EHSwA2WlLJH6nqVabkBp4xVON8qzPwvKmJ2XuVYXpFQHKPtxg+3fM3P7jIVIF1bm NIxkAozroKhuBFPdb7wdep7PG1Fn9JAOJE94D89b4ebhsxbqbjJaVJcAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=wTeB+AcsPUqMTkq0tx5O/S28gFdBW8XNnb+QC7S+PpM=; b=NNNBAoIs s+iDhU4wSRff0Uavn0ZxWywNpUeNeZuyyf9o9Id665GY7U9KlGcnRZjCv+589fYb LZXu78iSLR4C0Zo0B5Ge0G2fUxQBRsYC/Szfaz/DQHRmf/bOgDgEFV6aa9eSqMsW Hpf7II1dd+/AwRSU+NSXDpxmnQtTP2WziueqF1HAvDwcFgQrAlozsry13nr1wveF jBKznJKUsOyf9TWdNkCKJms+1pQXFzuPmbpQD0TbOdtIoM77aFpH5MttRUKW5uiZ ABeqCUu5ZHK0igOlHHnzDDEbjuGy/11mvwyorez5lN9lgB2SsEH8gfiJIJF1kXwv DN8CwXXFAQEhSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejtddguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefhvghrnhgrnhguohcutfgrmhhoshcuoehgrhgvvghnfhho ohesuhelvddrvghuqeenucggtffrrghtthgvrhhnpeekleekjedtheejheekfefggeevvd fgueegffeuveduhfehueegkeeijedvvdejfeenucevlhhushhtvghrufhiiigvpedvnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Sep 2021 02:44:02 -0400 (EDT) From: Fernando Ramos To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, sean@poorly.run, linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 11/17] drm/msm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Date: Fri, 24 Sep 2021 08:43:18 +0200 Message-Id: <20210924064324.229457-12-greenfoo@u92.eu> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924064324.229457-1-greenfoo@u92.eu> References: <20210924064324.229457-1-greenfoo@u92.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As requested in Documentation/gpu/todo.rst, replace driver calls to drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and DRM_MODESET_LOCK_ALL_END() Signed-off-by: Fernando Ramos --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 768012243b44..b89687074890 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "dpu_kms.h" #include "dpu_hw_lm.h" @@ -1172,14 +1173,15 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data) struct drm_display_mode *mode; struct drm_framebuffer *fb; struct drm_plane_state *state; + struct drm_modeset_acquire_ctx ctx; struct dpu_crtc_state *cstate; - int i, out_width; + int i, out_width, ret; dpu_crtc = s->private; crtc = &dpu_crtc->base; - drm_modeset_lock_all(crtc->dev); + DRM_MODESET_LOCK_ALL_BEGIN(crtc->dev, ctx, 0, ret); cstate = to_dpu_crtc_state(crtc->state); mode = &crtc->state->adjusted_mode; @@ -1263,9 +1265,9 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data) dpu_crtc->vblank_cb_time = ktime_set(0, 0); } - drm_modeset_unlock_all(crtc->dev); + DRM_MODESET_LOCK_ALL_END(crtc->dev, ctx, ret); - return 0; + return ret; } DEFINE_SHOW_ATTRIBUTE(_dpu_debugfs_status); -- 2.33.0