imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/37] drm/atomic: Get rid of existing states (not really)
@ 2025-09-02  9:34 Maxime Ripard
  2025-09-02  9:35 ` [PATCH v2 16/37] drm/imx-dc: Switch to drm_atomic_get_new_crtc_state() Maxime Ripard
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Maxime Ripard @ 2025-09-02  9:34 UTC (permalink / raw)
  To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, Maxime Ripard, Dmitry Baryshkov, Louis Chauvet,
	Haneen Mohammed, Melissa Wen, Jyri Sarha, Tomi Valkeinen,
	Paul Cercueil, linux-mips, Liviu Dudau, Russell King,
	Manikandan Muralidharan, Dharma Balasubiramani, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, linux-arm-kernel, Inki Dae,
	Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
	linux-samsung-soc, Liu Ying, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, imx, Laurentiu Palcu,
	Lucas Stach, Philipp Zabel, Anitha Chrisanthus, Edmund Dea,
	Paul Kocialkowski, Sui Jingfeng, Chun-Kuang Hu, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-mediatek, linux-kernel,
	Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, linux-arm-msm, freedreno, Sandy Huang,
	Heiko Stübner, Andy Yan, linux-rockchip, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, linux-sunxi, Thierry Reding,
	Mikko Perttunen, Jonathan Hunter, linux-tegra, Hans de Goede,
	Dave Stevenson, Maíra Canal, Raspberry Pi Kernel Maintenance

Hi,

Here's a series to get rid of the drm_atomic_helper_get_existing_*_state
accessors.

The initial intent was to remove the __drm_*_state->state pointer to
only rely on old and new states, but we still need it now to know which
of the two we need to free: if a state has not been committed (either
dropped or checked only), then we need to free the new one, if it has
been committed we need to free the old state. 

Thus, the state pointer is kept (and documented) only to point to the
state we should free eventually.

All users have been converted to the relevant old or new state
accessors.  

This was tested on tidss.

Let me know what you think,
Maxime

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Changes in v2:
- Dropped the first and second patches
- Reworked the recipient list to be nicer with SMTPs
- Link to v1: https://lore.kernel.org/r/20250825-drm-no-more-existing-state-v1-0-f08ccd9f85c9@kernel.org

---
Maxime Ripard (37):
      drm/atomic: Convert drm_atomic_get_connector_state() to use new connector state
      drm/atomic: Remove unused drm_atomic_get_existing_connector_state()
      drm/atomic: Document __drm_connectors_state state pointer
      drm/atomic: Convert __drm_atomic_get_current_plane_state() to modern accessor
      drm/atomic: Convert drm_atomic_get_plane_state() to use new plane state
      drm/vkms: Convert vkms_crtc_atomic_check() to use new plane state
      drm/tilcdc: crtc: Use drm_atomic_helper_check_crtc_primary_plane()
      drm/atomic: Remove unused drm_atomic_get_existing_plane_state()
      drm/atomic: Document __drm_planes_state state pointer
      drm/atomic: Convert drm_atomic_get_crtc_state() to use new connector state
      drm/ingenic: ipu: Switch to drm_atomic_get_new_crtc_state()
      drm/arm/malidp: Switch to drm_atomic_get_new_crtc_state()
      drm/armada: Switch to drm_atomic_get_new_crtc_state()
      drm/atmel-hlcdc: Switch to drm_atomic_get_new_crtc_state()
      drm/exynos: Switch to drm_atomic_get_new_crtc_state()
      drm/imx-dc: Switch to drm_atomic_get_new_crtc_state()
      drm/imx-dcss: Switch to drm_atomic_get_new_crtc_state()
      drm/imx-ipuv3: Switch to drm_atomic_get_new_crtc_state()
      drm/ingenic: Switch to drm_atomic_get_new_crtc_state()
      drm/kmb: Switch to drm_atomic_get_new_crtc_state()
      drm/logicvc: Switch to drm_atomic_get_new_crtc_state()
      drm/loongson: Switch to drm_atomic_get_new_crtc_state()
      drm/mediatek: Switch to drm_atomic_get_new_crtc_state()
      drm/msm/mdp5: Switch to drm_atomic_get_new_crtc_state()
      drm/omap: Switch to drm_atomic_get_new_crtc_state()
      drm/rockchip: Switch to drm_atomic_get_new_crtc_state()
      drm/sun4i: Switch to drm_atomic_get_new_crtc_state()
      drm/tegra: Switch to drm_atomic_get_new_crtc_state()
      drm/tilcdc: Switch to drm_atomic_get_new_crtc_state()
      drm/vboxvideo: Switch to drm_atomic_get_new_crtc_state()
      drm/vc4: Switch to drm_atomic_get_new_crtc_state()
      drm/atomic: Switch to drm_atomic_get_new_crtc_state()
      drm/framebuffer: Switch to drm_atomic_get_new_crtc_state()
      drm/atomic: Remove unused drm_atomic_get_existing_crtc_state()
      drm/atomic: Document __drm_crtcs_state state pointer
      drm/atomic: Convert drm_atomic_get_private_obj_state() to use new plane state
      drm/atomic: Document __drm_private_objs_state state pointer

 drivers/gpu/drm/arm/malidp_planes.c             |   2 +-
 drivers/gpu/drm/armada/armada_plane.c           |   3 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |   2 +-
 drivers/gpu/drm/drm_atomic.c                    |  21 ++--
 drivers/gpu/drm/drm_framebuffer.c               |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_plane.c       |   2 +-
 drivers/gpu/drm/imx/dc/dc-plane.c               |   2 +-
 drivers/gpu/drm/imx/dcss/dcss-plane.c           |   4 +-
 drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c         |   3 +-
 drivers/gpu/drm/ingenic/ingenic-drm-drv.c       |   3 +-
 drivers/gpu/drm/ingenic/ingenic-ipu.c           |   4 +-
 drivers/gpu/drm/kmb/kmb_plane.c                 |   3 +-
 drivers/gpu/drm/logicvc/logicvc_layer.c         |   4 +-
 drivers/gpu/drm/loongson/lsdc_plane.c           |   2 +-
 drivers/gpu/drm/mediatek/mtk_plane.c            |   3 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c      |   7 +-
 drivers/gpu/drm/omapdrm/omap_plane.c            |   2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c     |   6 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c    |   2 +-
 drivers/gpu/drm/sun4i/sun8i_ui_layer.c          |   3 +-
 drivers/gpu/drm/sun4i/sun8i_vi_layer.c          |   3 +-
 drivers/gpu/drm/tegra/dc.c                      |   2 +-
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c            |   9 +-
 drivers/gpu/drm/tilcdc/tilcdc_plane.c           |   3 +-
 drivers/gpu/drm/vboxvideo/vbox_mode.c           |   8 +-
 drivers/gpu/drm/vc4/vc4_plane.c                 |   6 +-
 drivers/gpu/drm/vkms/vkms_crtc.c                |   4 +-
 include/drm/drm_atomic.h                        | 144 ++++++++++++------------
 28 files changed, 124 insertions(+), 135 deletions(-)
---
base-commit: 7fa4d8dc380fbd81a9d702a855c50690c9c6442c
change-id: 20250825-drm-no-more-existing-state-9b3252c1a33b

Best regards,
-- 
Maxime Ripard <mripard@kernel.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 16/37] drm/imx-dc: Switch to drm_atomic_get_new_crtc_state()
  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 ` Maxime Ripard
  2025-09-02  9:35 ` [PATCH v2 17/37] drm/imx-dcss: " Maxime Ripard
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2025-09-02  9:35 UTC (permalink / raw)
  To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, Maxime Ripard, Liu Ying, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, imx, linux-arm-kernel

The imx-dc 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.

Signed-off-by: Maxime Ripard <mripard@kernel.org>

---
To: Liu Ying <victor.liu@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/gpu/drm/imx/dc/dc-plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/dc/dc-plane.c b/drivers/gpu/drm/imx/dc/dc-plane.c
index d8b946fb90de638da2bf4667307f11b06f4e77f5..e40d5d66c5c1f0d579a7a1019c0f2e00489ce15e 100644
--- a/drivers/gpu/drm/imx/dc/dc-plane.c
+++ b/drivers/gpu/drm/imx/dc/dc-plane.c
@@ -104,11 +104,11 @@ dc_plane_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state)
 		dc_plane_dbg(plane, "no CRTC in plane state\n");
 		return -EINVAL;
 	}
 
 	crtc_state =
-		drm_atomic_get_existing_crtc_state(state, plane_state->crtc);
+		drm_atomic_get_new_crtc_state(state, plane_state->crtc);
 	if (WARN_ON(!crtc_state))
 		return -EINVAL;
 
 	ret = drm_atomic_helper_check_plane_state(plane_state, crtc_state,
 						  DRM_PLANE_NO_SCALING,

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 17/37] drm/imx-dcss: Switch to drm_atomic_get_new_crtc_state()
  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 16/37] drm/imx-dc: Switch to drm_atomic_get_new_crtc_state() Maxime Ripard
@ 2025-09-02  9:35 ` Maxime Ripard
  2025-09-02 11:45   ` Laurentiu Palcu
  2025-09-02  9:35 ` [PATCH v2 18/37] drm/imx-ipuv3: " Maxime Ripard
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2025-09-02  9:35 UTC (permalink / raw)
  To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, Maxime Ripard, Laurentiu Palcu, Shawn Guo,
	Sascha Hauer, Lucas Stach, Pengutronix Kernel Team, Fabio Estevam,
	imx, linux-arm-kernel

The imx-dcss 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.

Signed-off-by: Maxime Ripard <mripard@kernel.org>

---
To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
To: Shawn Guo <shawnguo@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/gpu/drm/imx/dcss/dcss-plane.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imx/dcss/dcss-plane.c b/drivers/gpu/drm/imx/dcss/dcss-plane.c
index ab6d32bad756d080e1c56d7574403febceff94f4..3a063a53c8dfa6bc5bbbf9afc7ff6519199c2f19 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-plane.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-plane.c
@@ -157,12 +157,12 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,
 		return 0;
 
 	dma_obj = drm_fb_dma_get_gem_obj(fb, 0);
 	WARN_ON(!dma_obj);
 
-	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);
 
 	hdisplay = crtc_state->adjusted_mode.hdisplay;
 	vdisplay = crtc_state->adjusted_mode.vdisplay;
 
 	if (!dcss_plane_is_source_size_allowed(new_plane_state->src_w >> 16,

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 18/37] drm/imx-ipuv3: Switch to drm_atomic_get_new_crtc_state()
  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 16/37] drm/imx-dc: Switch to drm_atomic_get_new_crtc_state() Maxime Ripard
  2025-09-02  9:35 ` [PATCH v2 17/37] drm/imx-dcss: " Maxime Ripard
@ 2025-09-02  9:35 ` Maxime Ripard
  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ä
  4 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2025-09-02  9:35 UTC (permalink / raw)
  To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, Maxime Ripard, Philipp Zabel, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, imx, linux-arm-kernel

The imx-ipuv3 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.

Signed-off-by: Maxime Ripard <mripard@kernel.org>

---
To: Philipp Zabel <p.zabel@pengutronix.de>
To: Shawn Guo <shawnguo@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
index 704c549750f950c3f0ce5d6c6f637d9d7b53fb69..df19560e41b4f5b0dce97ae03947abeaf99e0883 100644
--- a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
@@ -384,12 +384,11 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
 
 	if (WARN_ON(!new_state->crtc))
 		return -EINVAL;
 
 	crtc_state =
-		drm_atomic_get_existing_crtc_state(state,
-						   new_state->crtc);
+		drm_atomic_get_new_crtc_state(state, new_state->crtc);
 	if (WARN_ON(!crtc_state))
 		return -EINVAL;
 
 	ret = drm_atomic_helper_check_plane_state(new_state, crtc_state,
 						  DRM_PLANE_NO_SCALING,

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 17/37] drm/imx-dcss: Switch to drm_atomic_get_new_crtc_state()
  2025-09-02  9:35 ` [PATCH v2 17/37] drm/imx-dcss: " Maxime Ripard
@ 2025-09-02 11:45   ` Laurentiu Palcu
  0 siblings, 0 replies; 7+ messages in thread
From: Laurentiu Palcu @ 2025-09-02 11:45 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, Shawn Guo, Sascha Hauer, Lucas Stach,
	Pengutronix Kernel Team, Fabio Estevam, imx, linux-arm-kernel

Hi Maxime,

On Tue, Sep 02, 2025 at 11:35:16AM +0200, Maxime Ripard wrote:
> The imx-dcss 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.
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>

Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>

Thanks,
Laurentiu
> 
> ---
> To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
> To: Shawn Guo <shawnguo@kernel.org>
> To: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: imx@lists.linux.dev
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>  drivers/gpu/drm/imx/dcss/dcss-plane.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/dcss/dcss-plane.c b/drivers/gpu/drm/imx/dcss/dcss-plane.c
> index ab6d32bad756d080e1c56d7574403febceff94f4..3a063a53c8dfa6bc5bbbf9afc7ff6519199c2f19 100644
> --- a/drivers/gpu/drm/imx/dcss/dcss-plane.c
> +++ b/drivers/gpu/drm/imx/dcss/dcss-plane.c
> @@ -157,12 +157,12 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,
>  		return 0;
>  
>  	dma_obj = drm_fb_dma_get_gem_obj(fb, 0);
>  	WARN_ON(!dma_obj);
>  
> -	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);
>  
>  	hdisplay = crtc_state->adjusted_mode.hdisplay;
>  	vdisplay = crtc_state->adjusted_mode.vdisplay;
>  
>  	if (!dcss_plane_is_source_size_allowed(new_plane_state->src_w >> 16,
> 
> -- 
> 2.50.1
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 00/37] drm/atomic: Get rid of existing states (not really)
  2025-09-02  9:34 [PATCH v2 00/37] drm/atomic: Get rid of existing states (not really) Maxime Ripard
                   ` (2 preceding siblings ...)
  2025-09-02  9:35 ` [PATCH v2 18/37] drm/imx-ipuv3: " Maxime Ripard
@ 2025-09-02 14:29 ` Ville Syrjälä
  2025-09-03 19:09 ` Ville Syrjälä
  4 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2025-09-02 14:29 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, Dmitry Baryshkov, Louis Chauvet, Haneen Mohammed,
	Melissa Wen, Jyri Sarha, Tomi Valkeinen, Paul Cercueil,
	linux-mips, Liviu Dudau, Russell King, Manikandan Muralidharan,
	Dharma Balasubiramani, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, linux-arm-kernel, Inki Dae, Seung-Woo Kim,
	Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
	linux-samsung-soc, Liu Ying, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, imx, Laurentiu Palcu,
	Lucas Stach, Philipp Zabel, Anitha Chrisanthus, Edmund Dea,
	Paul Kocialkowski, Sui Jingfeng, Chun-Kuang Hu, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-mediatek, linux-kernel,
	Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang <

On Tue, Sep 02, 2025 at 11:34:59AM +0200, Maxime Ripard wrote:
> Hi,
> 
> Here's a series to get rid of the drm_atomic_helper_get_existing_*_state
> accessors.
> 
> The initial intent was to remove the __drm_*_state->state pointer to
> only rely on old and new states, but we still need it now to know which
> of the two we need to free: if a state has not been committed (either
> dropped or checked only), then we need to free the new one, if it has
> been committed we need to free the old state. 
> 
> Thus, the state pointer is kept (and documented) only to point to the
> state we should free eventually.
> 
> All users have been converted to the relevant old or new state
> accessors.  
> 
> This was tested on tidss.
> 
> Let me know what you think,
> Maxime
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>

Other than the pre-existing ingenic private state issue that
Dmitry spotted I didn't see anything obviously wrong.

So apart from that the series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
> Changes in v2:
> - Dropped the first and second patches
> - Reworked the recipient list to be nicer with SMTPs
> - Link to v1: https://lore.kernel.org/r/20250825-drm-no-more-existing-state-v1-0-f08ccd9f85c9@kernel.org
> 
> ---
> Maxime Ripard (37):
>       drm/atomic: Convert drm_atomic_get_connector_state() to use new connector state
>       drm/atomic: Remove unused drm_atomic_get_existing_connector_state()
>       drm/atomic: Document __drm_connectors_state state pointer
>       drm/atomic: Convert __drm_atomic_get_current_plane_state() to modern accessor
>       drm/atomic: Convert drm_atomic_get_plane_state() to use new plane state
>       drm/vkms: Convert vkms_crtc_atomic_check() to use new plane state
>       drm/tilcdc: crtc: Use drm_atomic_helper_check_crtc_primary_plane()
>       drm/atomic: Remove unused drm_atomic_get_existing_plane_state()
>       drm/atomic: Document __drm_planes_state state pointer
>       drm/atomic: Convert drm_atomic_get_crtc_state() to use new connector state
>       drm/ingenic: ipu: Switch to drm_atomic_get_new_crtc_state()
>       drm/arm/malidp: Switch to drm_atomic_get_new_crtc_state()
>       drm/armada: Switch to drm_atomic_get_new_crtc_state()
>       drm/atmel-hlcdc: Switch to drm_atomic_get_new_crtc_state()
>       drm/exynos: Switch to drm_atomic_get_new_crtc_state()
>       drm/imx-dc: Switch to drm_atomic_get_new_crtc_state()
>       drm/imx-dcss: Switch to drm_atomic_get_new_crtc_state()
>       drm/imx-ipuv3: Switch to drm_atomic_get_new_crtc_state()
>       drm/ingenic: Switch to drm_atomic_get_new_crtc_state()
>       drm/kmb: Switch to drm_atomic_get_new_crtc_state()
>       drm/logicvc: Switch to drm_atomic_get_new_crtc_state()
>       drm/loongson: Switch to drm_atomic_get_new_crtc_state()
>       drm/mediatek: Switch to drm_atomic_get_new_crtc_state()
>       drm/msm/mdp5: Switch to drm_atomic_get_new_crtc_state()
>       drm/omap: Switch to drm_atomic_get_new_crtc_state()
>       drm/rockchip: Switch to drm_atomic_get_new_crtc_state()
>       drm/sun4i: Switch to drm_atomic_get_new_crtc_state()
>       drm/tegra: Switch to drm_atomic_get_new_crtc_state()
>       drm/tilcdc: Switch to drm_atomic_get_new_crtc_state()
>       drm/vboxvideo: Switch to drm_atomic_get_new_crtc_state()
>       drm/vc4: Switch to drm_atomic_get_new_crtc_state()
>       drm/atomic: Switch to drm_atomic_get_new_crtc_state()
>       drm/framebuffer: Switch to drm_atomic_get_new_crtc_state()
>       drm/atomic: Remove unused drm_atomic_get_existing_crtc_state()
>       drm/atomic: Document __drm_crtcs_state state pointer
>       drm/atomic: Convert drm_atomic_get_private_obj_state() to use new plane state
>       drm/atomic: Document __drm_private_objs_state state pointer
> 
>  drivers/gpu/drm/arm/malidp_planes.c             |   2 +-
>  drivers/gpu/drm/armada/armada_plane.c           |   3 +-
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |   2 +-
>  drivers/gpu/drm/drm_atomic.c                    |  21 ++--
>  drivers/gpu/drm/drm_framebuffer.c               |   2 +-
>  drivers/gpu/drm/exynos/exynos_drm_plane.c       |   2 +-
>  drivers/gpu/drm/imx/dc/dc-plane.c               |   2 +-
>  drivers/gpu/drm/imx/dcss/dcss-plane.c           |   4 +-
>  drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c         |   3 +-
>  drivers/gpu/drm/ingenic/ingenic-drm-drv.c       |   3 +-
>  drivers/gpu/drm/ingenic/ingenic-ipu.c           |   4 +-
>  drivers/gpu/drm/kmb/kmb_plane.c                 |   3 +-
>  drivers/gpu/drm/logicvc/logicvc_layer.c         |   4 +-
>  drivers/gpu/drm/loongson/lsdc_plane.c           |   2 +-
>  drivers/gpu/drm/mediatek/mtk_plane.c            |   3 +-
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c      |   7 +-
>  drivers/gpu/drm/omapdrm/omap_plane.c            |   2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c     |   6 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.c    |   2 +-
>  drivers/gpu/drm/sun4i/sun8i_ui_layer.c          |   3 +-
>  drivers/gpu/drm/sun4i/sun8i_vi_layer.c          |   3 +-
>  drivers/gpu/drm/tegra/dc.c                      |   2 +-
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c            |   9 +-
>  drivers/gpu/drm/tilcdc/tilcdc_plane.c           |   3 +-
>  drivers/gpu/drm/vboxvideo/vbox_mode.c           |   8 +-
>  drivers/gpu/drm/vc4/vc4_plane.c                 |   6 +-
>  drivers/gpu/drm/vkms/vkms_crtc.c                |   4 +-
>  include/drm/drm_atomic.h                        | 144 ++++++++++++------------
>  28 files changed, 124 insertions(+), 135 deletions(-)
> ---
> base-commit: 7fa4d8dc380fbd81a9d702a855c50690c9c6442c
> change-id: 20250825-drm-no-more-existing-state-9b3252c1a33b
> 
> Best regards,
> -- 
> Maxime Ripard <mripard@kernel.org>

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 00/37] drm/atomic: Get rid of existing states (not really)
  2025-09-02  9:34 [PATCH v2 00/37] drm/atomic: Get rid of existing states (not really) Maxime Ripard
                   ` (3 preceding siblings ...)
  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ä
  4 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2025-09-03 19:09 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, Dmitry Baryshkov, Louis Chauvet, Haneen Mohammed,
	Melissa Wen, Jyri Sarha, Tomi Valkeinen, Paul Cercueil,
	linux-mips, Liviu Dudau, Russell King, Manikandan Muralidharan,
	Dharma Balasubiramani, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, linux-arm-kernel, Inki Dae, Seung-Woo Kim,
	Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
	linux-samsung-soc, Liu Ying, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, imx, Laurentiu Palcu,
	Lucas Stach, Philipp Zabel, Anitha Chrisanthus, Edmund Dea,
	Paul Kocialkowski, Sui Jingfeng, Chun-Kuang Hu, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-mediatek, linux-kernel,
	Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, linux-arm-msm, freedreno, Sandy Huang,
	Heiko Stübner, Andy Yan, linux-rockchip, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, linux-sunxi, Thierry Reding,
	Mikko Perttunen, Jonathan Hunter, linux-tegra, Hans de Goede,
	Dave Stevenson, Maíra Canal, Raspberry Pi Kernel Maintenance

On Tue, Sep 02, 2025 at 11:34:59AM +0200, Maxime Ripard wrote:
> Hi,
> 
> Here's a series to get rid of the drm_atomic_helper_get_existing_*_state
> accessors.
> 
> The initial intent was to remove the __drm_*_state->state pointer to
> only rely on old and new states, but we still need it now to know which
> of the two we need to free: if a state has not been committed (either
> dropped or checked only), then we need to free the new one, if it has
> been committed we need to free the old state. 
> 
> Thus, the state pointer is kept (and documented) only to point to the
> state we should free eventually.
> 
> All users have been converted to the relevant old or new state
> accessors.  
> 
> This was tested on tidss.
> 
> Let me know what you think,
> Maxime
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>

<replying again to see if my smtp issues are now solved...>

Other than the pre-existing ingenic private state issue that
Dmitry spotted I didn't see anything obviously wrong.

So apart from that the series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
> Changes in v2:
> - Dropped the first and second patches
> - Reworked the recipient list to be nicer with SMTPs
> - Link to v1: https://lore.kernel.org/r/20250825-drm-no-more-existing-state-v1-0-f08ccd9f85c9@kernel.org
> 
> ---
> Maxime Ripard (37):
>       drm/atomic: Convert drm_atomic_get_connector_state() to use new connector state
>       drm/atomic: Remove unused drm_atomic_get_existing_connector_state()
>       drm/atomic: Document __drm_connectors_state state pointer
>       drm/atomic: Convert __drm_atomic_get_current_plane_state() to modern accessor
>       drm/atomic: Convert drm_atomic_get_plane_state() to use new plane state
>       drm/vkms: Convert vkms_crtc_atomic_check() to use new plane state
>       drm/tilcdc: crtc: Use drm_atomic_helper_check_crtc_primary_plane()
>       drm/atomic: Remove unused drm_atomic_get_existing_plane_state()
>       drm/atomic: Document __drm_planes_state state pointer
>       drm/atomic: Convert drm_atomic_get_crtc_state() to use new connector state
>       drm/ingenic: ipu: Switch to drm_atomic_get_new_crtc_state()
>       drm/arm/malidp: Switch to drm_atomic_get_new_crtc_state()
>       drm/armada: Switch to drm_atomic_get_new_crtc_state()
>       drm/atmel-hlcdc: Switch to drm_atomic_get_new_crtc_state()
>       drm/exynos: Switch to drm_atomic_get_new_crtc_state()
>       drm/imx-dc: Switch to drm_atomic_get_new_crtc_state()
>       drm/imx-dcss: Switch to drm_atomic_get_new_crtc_state()
>       drm/imx-ipuv3: Switch to drm_atomic_get_new_crtc_state()
>       drm/ingenic: Switch to drm_atomic_get_new_crtc_state()
>       drm/kmb: Switch to drm_atomic_get_new_crtc_state()
>       drm/logicvc: Switch to drm_atomic_get_new_crtc_state()
>       drm/loongson: Switch to drm_atomic_get_new_crtc_state()
>       drm/mediatek: Switch to drm_atomic_get_new_crtc_state()
>       drm/msm/mdp5: Switch to drm_atomic_get_new_crtc_state()
>       drm/omap: Switch to drm_atomic_get_new_crtc_state()
>       drm/rockchip: Switch to drm_atomic_get_new_crtc_state()
>       drm/sun4i: Switch to drm_atomic_get_new_crtc_state()
>       drm/tegra: Switch to drm_atomic_get_new_crtc_state()
>       drm/tilcdc: Switch to drm_atomic_get_new_crtc_state()
>       drm/vboxvideo: Switch to drm_atomic_get_new_crtc_state()
>       drm/vc4: Switch to drm_atomic_get_new_crtc_state()
>       drm/atomic: Switch to drm_atomic_get_new_crtc_state()
>       drm/framebuffer: Switch to drm_atomic_get_new_crtc_state()
>       drm/atomic: Remove unused drm_atomic_get_existing_crtc_state()
>       drm/atomic: Document __drm_crtcs_state state pointer
>       drm/atomic: Convert drm_atomic_get_private_obj_state() to use new plane state
>       drm/atomic: Document __drm_private_objs_state state pointer
> 
>  drivers/gpu/drm/arm/malidp_planes.c             |   2 +-
>  drivers/gpu/drm/armada/armada_plane.c           |   3 +-
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |   2 +-
>  drivers/gpu/drm/drm_atomic.c                    |  21 ++--
>  drivers/gpu/drm/drm_framebuffer.c               |   2 +-
>  drivers/gpu/drm/exynos/exynos_drm_plane.c       |   2 +-
>  drivers/gpu/drm/imx/dc/dc-plane.c               |   2 +-
>  drivers/gpu/drm/imx/dcss/dcss-plane.c           |   4 +-
>  drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c         |   3 +-
>  drivers/gpu/drm/ingenic/ingenic-drm-drv.c       |   3 +-
>  drivers/gpu/drm/ingenic/ingenic-ipu.c           |   4 +-
>  drivers/gpu/drm/kmb/kmb_plane.c                 |   3 +-
>  drivers/gpu/drm/logicvc/logicvc_layer.c         |   4 +-
>  drivers/gpu/drm/loongson/lsdc_plane.c           |   2 +-
>  drivers/gpu/drm/mediatek/mtk_plane.c            |   3 +-
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c      |   7 +-
>  drivers/gpu/drm/omapdrm/omap_plane.c            |   2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c     |   6 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.c    |   2 +-
>  drivers/gpu/drm/sun4i/sun8i_ui_layer.c          |   3 +-
>  drivers/gpu/drm/sun4i/sun8i_vi_layer.c          |   3 +-
>  drivers/gpu/drm/tegra/dc.c                      |   2 +-
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c            |   9 +-
>  drivers/gpu/drm/tilcdc/tilcdc_plane.c           |   3 +-
>  drivers/gpu/drm/vboxvideo/vbox_mode.c           |   8 +-
>  drivers/gpu/drm/vc4/vc4_plane.c                 |   6 +-
>  drivers/gpu/drm/vkms/vkms_crtc.c                |   4 +-
>  include/drm/drm_atomic.h                        | 144 ++++++++++++------------
>  28 files changed, 124 insertions(+), 135 deletions(-)
> ---
> base-commit: 7fa4d8dc380fbd81a9d702a855c50690c9c6442c
> change-id: 20250825-drm-no-more-existing-state-9b3252c1a33b
> 
> Best regards,
> -- 
> Maxime Ripard <mripard@kernel.org>

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-03 19:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 16/37] drm/imx-dc: Switch to drm_atomic_get_new_crtc_state() 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 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ä

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).