mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH RESEND 26/83] drm/meson: Switch to drm_mode_config_create_initial_state
       [not found] <20261105-drm-no-more-config-reset-v1-0-1f58d1e33380@kernel.org>
@ 2026-11-05 15:29 ` Maxime Ripard
  2026-11-05 15:52   ` neil.armstrong
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Ripard @ 2026-11-05 15:29 UTC (permalink / raw)
  To: David Airlie, Maarten Lankhorst, Simona Vetter, Thomas Zimmermann
  Cc: Maxime Ripard, dri-devel, Jerome Brunet, Kevin Hilman,
	Martin Blumenstingl, linux-amlogic

drm_mode_config_reset() has a dual role: it creates the initial KMS
state at probe time, and resets hardware and software state during
suspend/resume cycles.

Since the two roles need different behaviors (notably for objects like
drm_private_obj that must persist across suspend/resume),
drm_mode_config_create_initial_state() was introduced to handle only
the initial state creation at probe time.

Switch to drm_mode_config_create_initial_state().

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-amlogic@lists.infradead.org
---
 drivers/gpu/drm/meson/meson_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 49ff9f1f16d3..dda2dc2d5b00 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -345,5 +345,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
 		goto exit_afbcd;
 
-	drm_mode_config_reset(drm);
+	ret = drm_mode_config_create_initial_state(drm);
+	if (ret)
+		goto uninstall_irq;
 
 	drm_kms_helper_poll_init(drm);

-- 
2.55.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH RESEND 26/83] drm/meson: Switch to drm_mode_config_create_initial_state
  2026-11-05 15:29 ` [PATCH RESEND 26/83] drm/meson: Switch to drm_mode_config_create_initial_state Maxime Ripard
@ 2026-11-05 15:52   ` neil.armstrong
  0 siblings, 0 replies; 2+ messages in thread
From: neil.armstrong @ 2026-11-05 15:52 UTC (permalink / raw)
  To: Maxime Ripard, David Airlie, Maarten Lankhorst, Simona Vetter,
	Thomas Zimmermann
  Cc: dri-devel, Jerome Brunet, Kevin Hilman, Martin Blumenstingl,
	linux-amlogic

On 11/5/26 16:29, Maxime Ripard wrote:
> drm_mode_config_reset() has a dual role: it creates the initial KMS
> state at probe time, and resets hardware and software state during
> suspend/resume cycles.
> 
> Since the two roles need different behaviors (notably for objects like
> drm_private_obj that must persist across suspend/resume),
> drm_mode_config_create_initial_state() was introduced to handle only
> the initial state creation at probe time.
> 
> Switch to drm_mode_config_create_initial_state().
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: linux-amlogic@lists.infradead.org
> ---
>   drivers/gpu/drm/meson/meson_drv.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 49ff9f1f16d3..dda2dc2d5b00 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -345,5 +345,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
>   		goto exit_afbcd;
>   
> -	drm_mode_config_reset(drm);
> +	ret = drm_mode_config_create_initial_state(drm);
> +	if (ret)
> +		goto uninstall_irq;
>   
>   	drm_kms_helper_poll_init(drm);
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2026-11-05 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20261105-drm-no-more-config-reset-v1-0-1f58d1e33380@kernel.org>
2026-11-05 15:29 ` [PATCH RESEND 26/83] drm/meson: Switch to drm_mode_config_create_initial_state Maxime Ripard
2026-11-05 15:52   ` neil.armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®