From patchwork Wed Jan 15 21:05:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13940940 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B691EC02185 for ; Wed, 15 Jan 2025 21:05:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26C5610E16B; Wed, 15 Jan 2025 21:05:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="m85B3tyl"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1369510E7E5 for ; Wed, 15 Jan 2025 21:05:54 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B38685C5E90; Wed, 15 Jan 2025 21:05:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF187C4CED1; Wed, 15 Jan 2025 21:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736975153; bh=hY2WCPBkfNB6VAzQ2TTD6t4BV2WNicqT+QdY1QJWur4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=m85B3tylrsmUrTt9Q+grjfyjBKZiDI5crZCB/0LyGTxWQSdZpYr046DTHseq5gn1o gVgFFFvZ9Dt/xm63FqwmU8V8WMnjvln6LDt/29iJRB5GxM+vB/NEjXkQ3WwApO6HcV IhqVXMkI/44EkDRYuGMeoePAbRyfLtcCfiD9kCbqPrHsPUX7PNttyZztY3xUp03jJ7 +ys6dXFYfIDfpcnu7LMblOhg+tpzEW8g6Y4/YyiVkLR1FzAWxrCzK2KXC2OPWV/Yqs 55o4yyefitljh2El2KvqB1LBJ5Jk3zDJz4SUKGol6IVSgZOKkYyWu8f3wTI09iVQci rB/7pKEP6zaiw== From: Maxime Ripard Date: Wed, 15 Jan 2025 22:05:11 +0100 Subject: [PATCH 04/29] drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_tail_rpm() MIME-Version: 1.0 Message-Id: <20250115-bridge-connector-v1-4-9a2fecd886a6@kernel.org> References: <20250115-bridge-connector-v1-0-9a2fecd886a6@kernel.org> In-Reply-To: <20250115-bridge-connector-v1-0-9a2fecd886a6@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Douglas Anderson Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Maxime Ripard X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2531; i=mripard@kernel.org; h=from:subject:message-id; bh=hY2WCPBkfNB6VAzQ2TTD6t4BV2WNicqT+QdY1QJWur4=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDOkdymKfuc3FBQ6s7YmQc3cLqrCcs3a9EyPb2pKzOVwf/ zZ+DFjQMZWFQZiTQVZMkeWJTNjp5e2LqxzsV/6AmcPKBDKEgYtTACaywp2xTr0mlntmmTdb1MwW cb2Da/Ku3o8Kubtq/u4FOfHCkzIeWR6ZUXTGwO2WWJzh0ohHoXrvGOtTfDa3c/RcTQzxetNZaCr TOyNe9v0mJb+wV9td4ltKxA+nnAs6PTF+AQvrVrMrpfuU9gIA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_atomic_helper_commit_tail_rpm() is the final part of an atomic commit, and is given the state being committed as a parameter. However, that parameter is named old_state, but documented as the "new modeset state" which is all super confusing. Let's rename that parameter to state. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic_helper.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index c80d2ee0247a5316dd103d6178c7fa96eb366c9a..cb08fda752c65d6d0c4388bb4bf7054e74a053a8 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1789,36 +1789,36 @@ void drm_atomic_helper_commit_tail(struct drm_atomic_state *state) } EXPORT_SYMBOL(drm_atomic_helper_commit_tail); /** * drm_atomic_helper_commit_tail_rpm - commit atomic update to hardware - * @old_state: new modeset state to be committed + * @state: new modeset state to be committed * * This is an alternative implementation for the * &drm_mode_config_helper_funcs.atomic_commit_tail hook, for drivers * that support runtime_pm or need the CRTC to be enabled to perform a * commit. Otherwise, one should use the default implementation * drm_atomic_helper_commit_tail(). */ -void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state *old_state) +void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state *state) { - struct drm_device *dev = old_state->dev; + struct drm_device *dev = state->dev; - drm_atomic_helper_commit_modeset_disables(dev, old_state); + drm_atomic_helper_commit_modeset_disables(dev, state); - drm_atomic_helper_commit_modeset_enables(dev, old_state); + drm_atomic_helper_commit_modeset_enables(dev, state); - drm_atomic_helper_commit_planes(dev, old_state, + drm_atomic_helper_commit_planes(dev, state, DRM_PLANE_COMMIT_ACTIVE_ONLY); - drm_atomic_helper_fake_vblank(old_state); + drm_atomic_helper_fake_vblank(state); - drm_atomic_helper_commit_hw_done(old_state); + drm_atomic_helper_commit_hw_done(state); - drm_atomic_helper_wait_for_vblanks(dev, old_state); + drm_atomic_helper_wait_for_vblanks(dev, state); - drm_atomic_helper_cleanup_planes(dev, old_state); + drm_atomic_helper_cleanup_planes(dev, state); } EXPORT_SYMBOL(drm_atomic_helper_commit_tail_rpm); static void commit_tail(struct drm_atomic_state *state) {