dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>,
	 Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org,
	Maxime Ripard <mripard@kernel.org>,
	 Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	 Rob Clark <robin.clark@oss.qualcomm.com>,
	 Dmitry Baryshkov <lumag@kernel.org>,
	 Abhinav Kumar <abhinav.kumar@linux.dev>,
	 Jessica Zhang <jessica.zhang@oss.qualcomm.com>,
	Sean Paul <sean@poorly.run>,
	 Marijn Suijten <marijn.suijten@somainline.org>,
	 linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: [PATCH v2 24/37] drm/msm/mdp5: Switch to drm_atomic_get_new_crtc_state()
Date: Tue, 02 Sep 2025 11:35:23 +0200	[thread overview]
Message-ID: <20250902-drm-no-more-existing-state-v2-24-de98fc5f6d66@kernel.org> (raw)
In-Reply-To: <20250902-drm-no-more-existing-state-v2-0-de98fc5f6d66@kernel.org>

The msm atomic_check implementation uses the deprecated
drm_atomic_get_existing_crtc_state() helper.

This hook is called as part of the global atomic_check, thus before the
states are swapped. The existing state thus points to the new state, and
we can use drm_atomic_get_new_crtc_state() instead.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>

---
To: Rob Clark <robin.clark@oss.qualcomm.com>
To: Dmitry Baryshkov <lumag@kernel.org>
Cc: Abhinav Kumar <abhinav.kumar@linux.dev>
Cc: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
index 7c790406d533fbabb330c438419efb18204cc4b7..4ca183fb61a95af60ef5a2c011ae6b2a0df963f0 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
@@ -334,12 +334,11 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
 
 	crtc = new_plane_state->crtc ? new_plane_state->crtc : old_plane_state->crtc;
 	if (!crtc)
 		return 0;
 
-	crtc_state = drm_atomic_get_existing_crtc_state(state,
-							crtc);
+	crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
 	if (WARN_ON(!crtc_state))
 		return -EINVAL;
 
 	return mdp5_plane_atomic_check_with_state(crtc_state, new_plane_state);
 }
@@ -371,12 +370,12 @@ static int mdp5_plane_atomic_async_check(struct drm_plane *plane,
 	struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(new_plane_state);
 	struct drm_crtc_state *crtc_state;
 	int min_scale, max_scale;
 	int ret;
 
-	crtc_state = drm_atomic_get_existing_crtc_state(state,
-							new_plane_state->crtc);
+	crtc_state = drm_atomic_get_new_crtc_state(state,
+						   new_plane_state->crtc);
 	if (WARN_ON(!crtc_state))
 		return -EINVAL;
 
 	if (!crtc_state->active)
 		return -EINVAL;

-- 
2.50.1


  parent reply	other threads:[~2025-09-02  9:36 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02  9:34 [PATCH v2 00/37] drm/atomic: Get rid of existing states (not really) Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 01/37] drm/atomic: Convert drm_atomic_get_connector_state() to use new connector state Maxime Ripard
2025-09-02 13:08   ` Dmitry Baryshkov
2025-09-05  9:19   ` Luca Ceresoli
2025-09-02  9:35 ` [PATCH v2 02/37] drm/atomic: Remove unused drm_atomic_get_existing_connector_state() Maxime Ripard
2025-09-05  9:20   ` Luca Ceresoli
2025-09-02  9:35 ` [PATCH v2 03/37] drm/atomic: Document __drm_connectors_state state pointer Maxime Ripard
2025-09-05  9:20   ` Luca Ceresoli
2025-09-02  9:35 ` [PATCH v2 04/37] drm/atomic: Convert __drm_atomic_get_current_plane_state() to modern accessor Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 05/37] drm/atomic: Convert drm_atomic_get_plane_state() to use new plane state Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 06/37] drm/vkms: Convert vkms_crtc_atomic_check() " Maxime Ripard
2025-09-02 14:19   ` Ville Syrjälä
2025-09-05 15:12   ` Louis Chauvet
2025-09-02  9:35 ` [PATCH v2 07/37] drm/tilcdc: crtc: Use drm_atomic_helper_check_crtc_primary_plane() Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 08/37] drm/atomic: Remove unused drm_atomic_get_existing_plane_state() Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 09/37] drm/atomic: Document __drm_planes_state state pointer Maxime Ripard
2025-09-05  9:20   ` Luca Ceresoli
2025-09-02  9:35 ` [PATCH v2 10/37] drm/atomic: Convert drm_atomic_get_crtc_state() to use new connector state Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 11/37] drm/ingenic: ipu: Switch to drm_atomic_get_new_crtc_state() Maxime Ripard
2025-09-03 19:03   ` Paul Cercueil
2025-09-02  9:35 ` [PATCH v2 12/37] drm/arm/malidp: " Maxime Ripard
2025-09-02 15:47   ` Liviu Dudau
2025-09-02  9:35 ` [PATCH v2 13/37] drm/armada: " Maxime Ripard
2025-09-02 14:20   ` Ville Syrjälä
2025-09-02  9:35 ` [PATCH v2 14/37] drm/atmel-hlcdc: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 15/37] drm/exynos: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 16/37] drm/imx-dc: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 17/37] drm/imx-dcss: " Maxime Ripard
2025-09-02 11:45   ` Laurentiu Palcu
2025-09-02  9:35 ` [PATCH v2 18/37] drm/imx-ipuv3: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 19/37] drm/ingenic: " Maxime Ripard
2025-09-03 19:04   ` Paul Cercueil
2025-09-02  9:35 ` [PATCH v2 20/37] drm/kmb: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 21/37] drm/logicvc: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 22/37] drm/loongson: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 23/37] drm/mediatek: " Maxime Ripard
2025-09-02  9:35 ` Maxime Ripard [this message]
2025-09-02  9:35 ` [PATCH v2 25/37] drm/omap: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 26/37] drm/rockchip: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 27/37] drm/sun4i: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 28/37] drm/tegra: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 29/37] drm/tilcdc: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 30/37] drm/vboxvideo: " Maxime Ripard
2025-09-02  9:39   ` Hans de Goede
2025-09-02  9:35 ` [PATCH v2 31/37] drm/vc4: " Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 32/37] drm/atomic: " Maxime Ripard
2025-09-02 13:21   ` Dmitry Baryshkov
2025-09-02  9:35 ` [PATCH v2 33/37] drm/framebuffer: " Maxime Ripard
2025-09-02 13:22   ` Dmitry Baryshkov
2025-09-02  9:35 ` [PATCH v2 34/37] drm/atomic: Remove unused drm_atomic_get_existing_crtc_state() Maxime Ripard
2025-09-02 13:22   ` Dmitry Baryshkov
2025-09-02  9:35 ` [PATCH v2 35/37] drm/atomic: Document __drm_crtcs_state state pointer Maxime Ripard
2025-09-02  9:35 ` [PATCH v2 36/37] drm/atomic: Convert drm_atomic_get_private_obj_state() to use new plane state Maxime Ripard
2025-09-02 13:25   ` Dmitry Baryshkov
2025-09-02 14:14     ` Ville Syrjälä
2025-09-02 14:17       ` Dmitry Baryshkov
2025-09-02 14:27         ` Ville Syrjälä
2025-09-02  9:35 ` [PATCH v2 37/37] drm/atomic: Document __drm_private_objs_state state pointer Maxime Ripard
2025-09-05  9:20   ` Luca Ceresoli
2025-09-02 14:29 ` [PATCH v2 00/37] drm/atomic: Get rid of existing states (not really) Ville Syrjälä
2025-09-03 19:09 ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250902-drm-no-more-existing-state-v2-24-de98fc5f6d66@kernel.org \
    --to=mripard@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jessica.zhang@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).