Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1726285pxb; Thu, 7 Oct 2021 13:51:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhur2bo3PxJ6PgU4yPozyvOeoVD/ebmNKnOTg8Y0AkXSx8PwKU+WG75HQINQb4ykJNH31U X-Received: by 2002:aa7:db85:: with SMTP id u5mr9090523edt.234.1633639904037; Thu, 07 Oct 2021 13:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633639904; cv=none; d=google.com; s=arc-20160816; b=JF8T0mctVro4a6jw1qoqGsiS9RTAkPuhIpwd5Ates7pPOlXHqogFPdn/mB2SOeP3dn fckKPslmW52SZcjrTbG6/KVgX4fxs2GA6q5YXKf0UBlo3lXhhDgSKFmZzesPDvgpB4H+ 4+yBGAPsvewVf0KYtJn+OWD5zdItf+IfGcKdGh+Rs3gL2SLBMLWptuXRvItM0aYTAX1s +82G9A93nC+JlY9U8hFW98XQRuFI501cSAAEtv4dqNz8G1pfhzESOvUqqPDACbtuftes 09RJvIAhGt3rU1WhUyGyFTYgLcHoxgiltVnz597+AVLBrAS0Pq1sIJQYjosIUnan0Zad pbfw== 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=HmBi4MR/Q3CZSa63d6WzrgvVJoLQeYRULWRcv4sY0d2TIau2oWAnTwu2rh65G58HMP hr1egdhn266HgiBw7RrNAL7x/l42AC2AJ5Gi+oDQ96BLow8812JfvJwamVIPt22cGJdC yPCi61tog/YtJj7uaXJQ41/rDeMz1fKNvYjxSqdMrarWINpx/Yx4B+aZ2VcwWhf0jT/+ EdDXdGUpkiXvTMmCYsP2FV0PAAD+8ecAp3E9HsVkLzpQuupqtzWsklX+C1KtGP0G/+Nl lA/nD3j6hF974EVR0+BpNQoaiXVdBHxug6Cxdm2C1g3WSmuGTFuE7npXXk3bbjdiqMUO ZWgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=UMtQrdfz; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=QyXr7J0u; 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 r25si498813ejc.100.2021.10.07.13.51.20; Thu, 07 Oct 2021 13:51:44 -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=UMtQrdfz; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=QyXr7J0u; 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 S241955AbhJGTko (ORCPT + 99 others); Thu, 7 Oct 2021 15:40:44 -0400 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:43013 "EHLO wnew1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242225AbhJGTkg (ORCPT ); Thu, 7 Oct 2021 15:40:36 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id C81612B009FD; Thu, 7 Oct 2021 15:38:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 07 Oct 2021 15:38:42 -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=UMtQrdfzrRx1xNnDdeigfKIqi7r1V 7cUI1n5JrsEi/mhf5T37CtjDOartcKg5t27iPAIJ3/agsDtiiHP4UUIAwsRgo+Fy kK+RtH0pkkbiRAKTfELzXnH/YDnDXqjUJMj2baNkRPyCdnRmqAz2xL+ertdYqvEP dln1p+FFJNxbNyZdAZSYHZtV2nOrfBTia2kYdQ7LIjNG2/zLvnFZACz9MYCx9OwN YqKU4+NtbnlrBqlUonrf3wMNC1Mn7Oe0WK7Ma31mksAvlFFldIQcPY9KzNY6CyUG ir8BEji7E1R4pdh3BRQPID/3lSsQJPGUhG3UcLjbeZvVSxIweY0GuWEAg== 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=42TrVQEBS+T0uaTdbmpol3CTMIgV752tP7jigQFe0eQ=; b=QyXr7J0u geUgLj+DM0smWh835sfDo2aMXg5RPh/YecAuZ4amP/rAZPirZKdoFBhycurf9/FE SBuRxpKp7kM1PK4FFUjVnHqq0kyz9tJtukZerxMGus/xcePoHi6dvpUVDx3dnHj1 e48vYyVP4zl6TysmPoaOgvNAA93R2eRsqLhyP0LTUUNKFl0ToLhcadk6Nm3GAcfR 0AXvElWwMXi/j+CgBhiLzTlHV9nySXpNlph9hgaD3mjeLfdMWnLHMzXNUYquOfTI z3PfCZCU4VAmLhwmrtlZ1eT20sTxem8V8cN7zkPPTt87wGnisOAmy3Yc/wIgx43G fhCeYvAc2vmwyA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelkedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefhvghrnhgrnhguohcutfgrmhhoshcuoehgrhgvvghnfhho ohesuhelvddrvghuqeenucggtffrrghtthgvrhhnpeekleekjedtheejheekfefggeevvd fgueegffeuveduhfehueegkeeijedvvdejfeenucevlhhushhtvghrufhiiigvpedunecu rfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Oct 2021 15:38:38 -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 v3 09/20] drm/omapdrm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Date: Thu, 7 Oct 2021 21:37:44 +0200 Message-Id: <20211007193755.29579-10-greenfoo@u92.eu> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211007193755.29579-1-greenfoo@u92.eu> References: <20211007193755.29579-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