Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1256525pxb; Thu, 23 Sep 2021 23:47:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEJb6X8xttDjwJNsrQdZffej5c67GlLxk86BAZa0OqevDax5ijnMFAvj93iNK1XUgGelLa X-Received: by 2002:a17:906:7ac5:: with SMTP id k5mr9870797ejo.386.1632466058742; Thu, 23 Sep 2021 23:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632466058; cv=none; d=google.com; s=arc-20160816; b=OfxZSHIcVcPr2Hqn1C2+p+VruLvI3yc6p14cy9O7J1VWk4jlfzeBKJpyIJGdYS51cu Gekn16iDCB5/X17o5FVJfmq1lsFlYdfhdTQNgIn7gnai6gpz+B9Ozt/jdV5uBK1LVfiF WLKp+D/FDaqPg91eGYlqNL8eyx9dRxZ2g0IaGsABd5bgXjXXUYixsr+LtuAcxWpgQs8S 0VDVZxoTNA/n131h1Y0r56DZs3u47VO//Ld/lS8EjQxMpQMg7SAAwk5MTxcJPqxEYx3e tyzN/54bLpwBDbVzmLMIhZt9T8eB4wwbtEAnLL6hFgeemUsg0geocbaWJV+wZwQ+L29a q6Pg== 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=42TrVQEBS+T0uaTdbmpol3CTMIgV752tP7jigQFe0eQ=; b=kymxGaG7uOIpZvA49aFVmcUOtocpTKRqxibk3ErjPks6svUgPhq8GGcLKunpgwfdAC pDcXydWyzcHjkDOJAbFg0zBRXP0/I6ScP9GOuUCO7Y8Sckf1CvE5tuYaoMTK0G6CQZGP 6OG/A+Vy0OssaFewRB9iCfhmduRxsU/vyVgtn9HRo77eWydcijqXhoaINyAUTr7o3lNa ni6wZ3XKsrEwxRhksAtfMs8seOWK+P3S9nFO53JwJIgNh3XCuYMYZKgWPK/Mpx34OZCt awLCLQRsbVKJbR1m27XSPdPGHmc5PSQYrwhvOZsjTfGyAYX7Z4cjvuYGRlCV8HUbJ4yT 8qZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=CPK5kTuK; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Xg4VeC5Z; 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 k21si8280837edk.61.2021.09.23.23.47.12; Thu, 23 Sep 2021 23:47:38 -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=CPK5kTuK; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Xg4VeC5Z; 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 S244372AbhIXGpd (ORCPT + 99 others); Fri, 24 Sep 2021 02:45:33 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:32857 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244366AbhIXGpc (ORCPT ); Fri, 24 Sep 2021 02:45:32 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 507CB58106F; Fri, 24 Sep 2021 02:43:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 24 Sep 2021 02:43:59 -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=42TrVQEBS+T0u aTdbmpol3CTMIgV752tP7jigQFe0eQ=; b=CPK5kTuKRqui3pT5A5oFLcMoiRLMD /DecsrzBd4f/OBGunPloQSHB/BSiZxsE+iRQpTWxX3UdqjBMDKEBks4PagZimtPK ONhgiiA6jUrl9TBz7a/zD1a5e+LqmPgGv+5upWAhh0biFmBuZKxBJ5BBZck3IGO8 PH+Klo/jJW2JtW9N12YaGRvyzjGn4kcwgrh6OTpqTkOlCnrIfB0mzO7simeiwN+b uGfqoqeEcVOxjOE9uR1QNXAM0PYe22vSpLJ5GX8dHgDTi4t5QELjBaBqxjnFL2dn dzZ/yaMQ38oU0kIDjz78LPOuxTKaviPAd0JtWo+iUCU1bUF5L+z9uml7g== 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=42TrVQEBS+T0uaTdbmpol3CTMIgV752tP7jigQFe0eQ=; b=Xg4VeC5Z OIgWUbwetn5d/iZJd9LG54qVBHbjW9GOqVneIF7AP9O6KcWb8Qpq1ufdO0dmvF7i eb8+5Mc8XajsdNswzE54rpHJeunfpC5NGxlQV2ZrBDXM29dfCbTKiIL+rw2kclK9 N45WUnyQeS15tBFNfQ6u7iEw3nLzlwgWdpm8RXH9UruyGCf65kz6QIZc7B3+3wZr xJ4a0RnKoN9ZFJxZd0Oh6W+m7x+YZAdYIIS2E4XvDRJpDF0hWhDAze5re6uW76GH bgai4H4u3bCCY5A9a8MwvC5dZ2WF8k10Z+qwbSj+jgeJHPgwJ1friWz/NIIicDK7 wzGrfR3V7xEubQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejtddguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefhvghrnhgrnhguohcutfgrmhhoshcuoehgrhgvvghnfhho ohesuhelvddrvghuqeenucggtffrrghtthgvrhhnpeekleekjedtheejheekfefggeevvd fgueegffeuveduhfehueegkeeijedvvdejfeenucevlhhushhtvghrufhiiigvpedunecu rfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Sep 2021 02:43:56 -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 09/17] drm/omapdrm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Date: Fri, 24 Sep 2021 08:43:16 +0200 Message-Id: <20210924064324.229457-10-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 Reviewed-by: Sean Paul --- drivers/gpu/drm/omapdrm/omap_fb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index 190afc564914..fa7636c13c19 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "omap_dmm_tiler.h" #include "omap_drv.h" @@ -62,15 +63,17 @@ static int omap_framebuffer_dirty(struct drm_framebuffer *fb, unsigned num_clips) { struct drm_crtc *crtc; + struct drm_modeset_acquire_ctx ctx; + int ret; - drm_modeset_lock_all(fb->dev); + DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, 0, ret); drm_for_each_crtc(crtc, fb->dev) omap_crtc_flush(crtc); - drm_modeset_unlock_all(fb->dev); + DRM_MODESET_LOCK_ALL_END(fb->dev, ctx, ret); - return 0; + return ret; } static const struct drm_framebuffer_funcs omap_framebuffer_funcs = { -- 2.33.0