Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3825270pxb; Wed, 13 Oct 2021 13:51:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziDHbf3eHfv4k4M2kmM4C2u/OqpZ/5TZQ1Yw+V5jhjDZ2Yw8+OGeEI0SsSqg5kZUZ0l4zw X-Received: by 2002:a05:6402:348b:: with SMTP id v11mr2402658edc.296.1634158319326; Wed, 13 Oct 2021 13:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634158319; cv=none; d=google.com; s=arc-20160816; b=M+Y8SVIobCkFgt/1T9J6Lfr5S9TnecWj3O36IRrIeF7nsfddXh4E0ycc4VSpsKWq4t V+5k7imnKfCfudYF3BmXuivaOxiY2YT0hgfBrDws1kwZlfPYx8tVn4kUcyOWdtfCB6nN r5XnaVNJevaWQZovNoaYZMXAZubzzEfDWuIxBHlce+iVImZTQKScN1Qjj/jC+mUJpauq LmhwG17brGhotiyOWPtxLGidPbk6vAyBXw5sUuS+tAAFqFIhVaBe3l5TMKade0sI6sbg SBTa+9vfXfdWo8ZJv/sD6fsRebjl/OU3spki7TLJjH8n2jW3Uiyo/r8g73d9TGWSp5Lp acbQ== 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=sRgoQoNkjCncowkPoEDUwqxGLqGMCVFDVIOz4LcXwChcuqCUkj3W65x36ssPS54LIJ zXGpTVmG00h5p/jR6EUNx7Wk01pOl8NMkrFYLF8XfxTJ2OW5HbaaX4+o7tuF2RnNMoiw UkDXyWB8oPqJxlQ2LeID8otYdd8xvBy4sTqWFx/QF7dEpZZqKZ0Gs7PyZIBKyoRkqluA pfgo8qL5zOdSw3b/PT404FvfBZV5RmJWJW+BnlvbZGetUdDs1pxLr4QXNMBWbFUJIGd8 gPb44HCOtxijNJLXCvDvOUrbZ+ctiUQ761RJUEPoFPvxiJ0wnzig2wikyro1X+XTesaI rznA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=jAC6WEzK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Dn59sFJa; 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 s12si896560ejc.488.2021.10.13.13.51.35; Wed, 13 Oct 2021 13:51:59 -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=jAC6WEzK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Dn59sFJa; 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 S230219AbhJMUve (ORCPT + 99 others); Wed, 13 Oct 2021 16:51:34 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:60855 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbhJMUvX (ORCPT ); Wed, 13 Oct 2021 16:51:23 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 73255581178; Wed, 13 Oct 2021 16:49:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 13 Oct 2021 16:49:19 -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=jAC6WEzKPYI2fHJxTKU/Td9YDZjFe r0Q/9jMycLZpTV1Ox14zOEDKFVeMJJL7oSPd0DBJ7iiB8gpTyiNtl4kSxQ91rMjs R+i/aPykdwx3HY13SzkvNn77ZvZd6JOqu5H9HOrXBHRdhX5Gxin/nCSVO+1C/hh/ zSdbNlWq0Es7NqFzYRws9wNFiu4qjIXyWEIimClDzbgtF2cSxgdITgBgZxChwOu1 IonVoIE5JgGCZSJXjBDP4WaC4EuZplptFOHdIkY6asGSfL9E0O/ZJSrA6gB6xOOs hxZk/A3NjuVoQ+bnTSzIKm1kb5aoemb9l0IZK64P1ipP213eHQ9K+CNgg== 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=Dn59sFJa OxLushapHvJBvI1kxZwJ5W3QkRaQvAmcz01oURoF27ww1AaanLrxC3uKlpJ2Pz5h uRgkz5sEM6YLgpf8fNV5fd+PtGu/5ajWmYbqId9y+Zsyc8v6vSwNxy0a+nZHa7s+ njBwvzRKmQS6iI7Gpb22Zkebvsx8yf67PLXik2u6rwALbsNX5911L/0x4THjWYZk P8o/mDvmJ8jZA7FWr2kPEBJ0UYS+Sh4u4xjD53ZqaN0x8K1ukiv95pHh/HCXQUeS v56VqgJG2eFILsl3OIOaXuqiriiWLXjhWzi1QxrJkVvEUOrQzm6km3befezDfdBC 5wYCrvgV+ZO5BQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddutddgudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefhvghrnhgrnhguohcutfgrmhhoshcuoehgrhgvvghnfhho ohesuhelvddrvghuqeenucggtffrrghtthgvrhhnpeekleekjedtheejheekfefggeevvd fgueegffeuveduhfehueegkeeijedvvdejfeenucevlhhushhtvghrufhiiigvpeefnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Oct 2021 16:49:16 -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 09/20] drm/omapdrm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Date: Wed, 13 Oct 2021 22:48:35 +0200 Message-Id: <20211013204846.90026-10-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 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