Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2103776pxb; Fri, 17 Sep 2021 02:11:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzScI0980FeeaFMp8tIJVd1ktt1pM+vglWLHWenDCm3FtnHKTAuYtDda6Haf/oyaE7cfxIz X-Received: by 2002:a17:906:7714:: with SMTP id q20mr11131512ejm.551.1631869881250; Fri, 17 Sep 2021 02:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631869881; cv=none; d=google.com; s=arc-20160816; b=fgf+vO5dNrrw2nHywPo7S+rJv/TDiQlPmm5O++8XXhX/n2V7vdj/m/2KCRXmc/egd1 25SQjOkqf3MK8RrEpyl4+c/IsFH9cV6BTPyCFTpCyroptSyhPljwA5BECf54ihNIyP0k zX3Mip4W4hIDRN+MUv01Y6aZ04sSf1uO4Hz8vitKH2gb5yMxBE1a2Hqj/1zytxO/0ToR Iv7hnRuoOpAyM0QANxZv3jm+PSLL/dCCfJrVyCJgs7ZsJ92sxGFc5F3+6v2sY1GtgJRg TNHzF3ZmtdkWQWnfiQzME3GznTlqktp/qSYAKtiUy5E5xrOF0iQKYK/jhBSVI5aRC4RA pDhA== 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=RqF2Gla2XhI9mprps508DrdpwyciwaRKEB2FwzxqOi0=; b=bC69FqQ4qlrACkTIpEoGJryWP8cO9zR5LD++/gnNo0Lhm/fkVJfSNf09Lhiyp3Bt84 pB8/WqdYZX8vvBfdxs+QODbuzUWK/TcUj5toNAxdaZxggD4inZojTEZz9Co5gYm3KIoQ 4SoNyF3G+vYllHEj738BWKU7CCfv9IjUS5wQIYL3feGpQZYokzReNrfOeqgWm30hsJq7 RVYS5jasUfG8ZHSeeuNKA/w4kY0LD+U9Se95Em+melJZ0bx0Np3xzAP/eNe0lzQTOzSj ydgzXavaZY4zVDLagrWfUHq97/D2amO27jr+Jcjf6w13omHsCQ/pkbLQ0pPDzM+TRiNq 10Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=UwPnE7X4; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=usiSwk+4; 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 e10si8425599edj.183.2021.09.17.02.10.53; Fri, 17 Sep 2021 02:11:21 -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=UwPnE7X4; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=usiSwk+4; 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 S240369AbhIPVS3 (ORCPT + 99 others); Thu, 16 Sep 2021 17:18:29 -0400 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]:52867 "EHLO wnew3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238874AbhIPVSR (ORCPT ); Thu, 16 Sep 2021 17:18:17 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 0482B2B011FA; Thu, 16 Sep 2021 17:16:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 16 Sep 2021 17:16:56 -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=RqF2Gla2XhI9m prps508DrdpwyciwaRKEB2FwzxqOi0=; b=UwPnE7X4zxy+qg3JPQDeKNTnE/b4u MvDMpm5++SYIo10YK52Qnjr/xU3RPIn2gRPABy5PX+RF4FIWSC50mTixX9jasj60 wxKtRmHQprtDWqTjJwL6D4vOVBL5aLrPwlEpbH+Lp0E21xEaSqI7T2a1uuIYVZYS UkI0d8R6vN+a/PjbygfKmogg9Fz0k/3TWcGmT5ngKDnWO+Q57VfqSzS7+LUSbMeT vMtQr4ITaniLBpSC1niiN9vjOTPbWodBK8WYahs4eszgjZSbN9LGw/83SPmY3fO+ ICOYG5hZaYFvjf4Nq90nJtA/6ZS65nJgyKs46DxeoZ3JkrDYBknqESv6A== 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=RqF2Gla2XhI9mprps508DrdpwyciwaRKEB2FwzxqOi0=; b=usiSwk+4 P/UjUIXnDBiWHuSGxZKDwbQsIqF4vKNP6aE9l6ezB/oJoVH5spI1eO8Bi1GOQN1z wmrLRqnvms7ofJTjAXsYRQdAOtTX0v6G6wEZftHz++JqV9plKhEAJNJJQkPnnw8r 6Pj7sdQ+63i4NyOCNw5PwYRZGWWRD0ER0NUJDRJOgwcxuX5vZNX5ClJU0vz17dff sDkcYQY6qkQWLHhTY865+UX4Yo4QFT+XVryb0kVobD0fqeVTsE4rEr9ngoo2PIb+ Po2m00K+i8t7ct3lQ7rKsJpZlVxjJUbX4YCnsFB51iBXMBcC5I0UC7MtOI2UACYo NugxTd03REQjdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehgedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefhvghrnhgrnhguohcutfgrmhhoshcuoehgrhgvvghnfhho ohesuhelvddrvghuqeenucggtffrrghtthgvrhhnpeekleekjedtheejheekfefggeevvd fgueegffeuveduhfehueegkeeijedvvdejfeenucevlhhushhtvghrufhiiigvpedvnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Sep 2021 17:16:52 -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 13/15] drm/gma500: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Date: Thu, 16 Sep 2021 23:15:50 +0200 Message-Id: <20210916211552.33490-14-greenfoo@u92.eu> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916211552.33490-1-greenfoo@u92.eu> References: <20210916211552.33490-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/gma500/psb_device.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/gma500/psb_device.c b/drivers/gpu/drm/gma500/psb_device.c index 951725a0f7a3..4e27f65a1f16 100644 --- a/drivers/gpu/drm/gma500/psb_device.c +++ b/drivers/gpu/drm/gma500/psb_device.c @@ -8,6 +8,7 @@ #include #include +#include #include "gma_device.h" #include "intel_bios.h" @@ -169,8 +170,10 @@ static int psb_save_display_registers(struct drm_device *dev) { struct drm_psb_private *dev_priv = dev->dev_private; struct drm_crtc *crtc; + struct drm_modeset_acquire_ctx ctx; struct gma_connector *connector; struct psb_state *regs = &dev_priv->regs.psb; + int ret; /* Display arbitration control + watermarks */ regs->saveDSPARB = PSB_RVDC32(DSPARB); @@ -183,7 +186,7 @@ static int psb_save_display_registers(struct drm_device *dev) regs->saveCHICKENBIT = PSB_RVDC32(DSPCHICKENBIT); /* Save crtc and output state */ - drm_modeset_lock_all(dev); + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { if (drm_helper_crtc_in_use(crtc)) dev_priv->ops->save_crtc(crtc); @@ -193,7 +196,8 @@ static int psb_save_display_registers(struct drm_device *dev) if (connector->save) connector->save(&connector->base); - drm_modeset_unlock_all(dev); + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); + return 0; } @@ -207,8 +211,10 @@ static int psb_restore_display_registers(struct drm_device *dev) { struct drm_psb_private *dev_priv = dev->dev_private; struct drm_crtc *crtc; + struct drm_modeset_acquire_ctx ctx; struct gma_connector *connector; struct psb_state *regs = &dev_priv->regs.psb; + int ret; /* Display arbitration + watermarks */ PSB_WVDC32(regs->saveDSPARB, DSPARB); @@ -223,7 +229,7 @@ static int psb_restore_display_registers(struct drm_device *dev) /*make sure VGA plane is off. it initializes to on after reset!*/ PSB_WVDC32(0x80000000, VGACNTRL); - drm_modeset_lock_all(dev); + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) if (drm_helper_crtc_in_use(crtc)) dev_priv->ops->restore_crtc(crtc); @@ -232,7 +238,7 @@ static int psb_restore_display_registers(struct drm_device *dev) if (connector->restore) connector->restore(&connector->base); - drm_modeset_unlock_all(dev); + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); return 0; } -- 2.33.0