Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3826633pxb; Wed, 13 Oct 2021 13:54:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy3/d+HvZzhVsyQjsGwyBeSP4Ill8p5XT/RF6dh04jmUoAAiAOKV9d1CKw2oBSvU+jal37 X-Received: by 2002:a17:907:6283:: with SMTP id nd3mr1761057ejc.362.1634158451800; Wed, 13 Oct 2021 13:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634158451; cv=none; d=google.com; s=arc-20160816; b=vli4s2j7m9xULDSx8GubW92q5gijqBuqo9egV4e/7ji9LNflw1o/lm1IFBP405jxPg R/d+V/0a7uQboUmzGmGPzhAhgSjlwXiSj/GUIzEOhMG7CU4tqsndNHCtxWfJBC0Im5kF 9lWbpfY8wp4foejAwrJkHkd7C1JACuIoUM6n76Bxq/8ldftmj+1hSW3e+nTSijenvXVp shPhW25/+a1MhrRBWz2+cBL2GIh7RwVGhhY0SeP7xqXGCXAgsmNY+0/+f6TjGptGLpzb QMr3GeuO1nf7dh349szRII84q5TNsuyJ8mn55NQNgiBaT7OPLHIVdLVmiAW35dbV/wmG ndKA== 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=nOdyEdifxDRgI6KScAeWeL5k+rXwThKWB9kJ+Ud8NgDiOGSgo1+raC4NTmsfEbpELm OsfqpWYl+8DvWtadeJpbXLyk94bnVRWaMcn6LyXFF1ljKccofUqLnIHKacngurEXp5Ml 4J5xqjmyQW+/aXNuqzf/1mSYJgJ7M5+RYSkYs2MtYUA+v7tM+kbi0n95vwVPv2xrrb7H yqLpyx6ujAMVwUOf0v3QoPW+IpiCXlivdbuaIm7GojhWlZaNk5b/5tQAgkQhXzwcPQhy u2Us1X/GtMi81AXQzXtGiYU4/+qsuypgJzI+35WjerfRl/ip4a9eFXeG87Zd2UMd6w+b F8IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b="wKRI4ru/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=SwVLD4MW; 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 f5si928296ejf.660.2021.10.13.13.53.48; Wed, 13 Oct 2021 13:54:11 -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="wKRI4ru/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=SwVLD4MW; 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 S230141AbhJMUvn (ORCPT + 99 others); Wed, 13 Oct 2021 16:51:43 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:55823 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230172AbhJMUv3 (ORCPT ); Wed, 13 Oct 2021 16:51:29 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 1FFC5581177; Wed, 13 Oct 2021 16:49:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 13 Oct 2021 16:49:25 -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=wKRI4ru/5mGdxKbXoV389wBbxUoub XFYtTacCNpsC0tGZj5GZ3G33WPqdTDGyZhWaq+E15xF1lv8kP8azHlCblEqPBVuj C7Gyq0MYj2nJ+kocASrkB9bkCFQgM4VNe2GhQfu/1AJnrArHZ+33fgBXkMWyFiKl 6jdEej6H+adb2/Ns3U4yBYHTrtmLzrLkL8hZy/gm9DMavoOlbNzMgm0EkgyGJKEx UnJvztEZUPA9a45b8oWcY5rvUfi3kZXM3eVEThlSHTyjRAd9dbwC9rNVXi48WrcZ SnTcBeOERM1LzrHwGMbOplqVwsxzcdWxA8sO8mv5fXWYlntteeChZcStQ== 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= fm1; bh=wTeB+AcsPUqMTkq0tx5O/S28gFdBW8XNnb+QC7S+PpM=; b=SwVLD4MW 9nUg8dCNsHVB6ibxALzWVqUnVqP682UqfneZ4BTt6IYTai8pmbVJVaQkmJR8se9N ZOdCfG6hxIuIi00yc9MOy/gbuBxOQ9SrmF7MoXxecFeS/m3LVtN2J085ycUwMkcA mbckJXbf3moMFcPE0rCfokwNUpbI0/sgR4a8cKpBr80fuLJy4NRED4l013BvmGPt ggXFNWjILN0IuQB2zFTuw/aeYoA7DxP9xcZGf1zw6DzFC5XUi2pPgrHAyKXK3tyc zMrLMGPCxBJxIVsKJqbf2uoo2BQ78cX/l1nNfIwxpcv4kjsaP/WkfXHr4++SgaKG CA63JxV7p3YH2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddutddgudehvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefhvghrnhgrnhguohcutfgrmhhoshcuoehgrhgvvghnfhho ohesuhelvddrvghuqeenucggtffrrghtthgvrhhnpeekleekjedtheejheekfefggeevvd fgueegffeuveduhfehueegkeeijedvvdejfeenucevlhhushhtvghrufhiiigvpedunecu rfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Oct 2021 16:49:22 -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 v4 11/20] drm/msm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Date: Wed, 13 Oct 2021 22:48:37 +0200 Message-Id: <20211013204846.90026-12-greenfoo@u92.eu> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211013204846.90026-1-greenfoo@u92.eu> References: <20211013204846.90026-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