[PATCH 11/14] drm/drv: Drop drm_mode_config_reset() from our skeleton

Maxime Ripard posted 14 patches 4 weeks ago
There is a newer version of this series
[PATCH 11/14] drm/drv: Drop drm_mode_config_reset() from our skeleton
Posted by Maxime Ripard 4 weeks ago
Now that we have drm_mode_config_create_state() to create the initial
state called as part of drm_dev_register(), we can stop recommending
calling drm_mode_config_reset() to perform that initialization in our
skeleton.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
 drivers/gpu/drm/drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 820106d56ab399a39cac56d98662b5ddbcae8ded..dc85d36670cf96dcd16e7eda8fe8563c6e7fc28d 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -339,11 +339,11 @@ void drm_minor_release(struct drm_minor *minor)
  *
  *		// Further setup, display pipeline etc
  *
  *		platform_set_drvdata(pdev, drm);
  *
- *		drm_mode_config_reset(drm);
+ *		drm_mode_config_create_state(drm);
  *
  *		ret = drm_dev_register(drm);
  *		if (ret)
  *			return ret;
  *

-- 
2.53.0
Re: [PATCH 11/14] drm/drv: Drop drm_mode_config_reset() from our skeleton
Posted by Tomi Valkeinen 3 weeks, 6 days ago
Hi,

On 10/03/2026 18:07, Maxime Ripard wrote:
> Now that we have drm_mode_config_create_state() to create the initial
> state called as part of drm_dev_register(), we can stop recommending
> calling drm_mode_config_reset() to perform that initialization in our
> skeleton.
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
>  drivers/gpu/drm/drm_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 820106d56ab399a39cac56d98662b5ddbcae8ded..dc85d36670cf96dcd16e7eda8fe8563c6e7fc28d 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -339,11 +339,11 @@ void drm_minor_release(struct drm_minor *minor)
>   *
>   *		// Further setup, display pipeline etc
>   *
>   *		platform_set_drvdata(pdev, drm);
>   *
> - *		drm_mode_config_reset(drm);
> + *		drm_mode_config_create_state(drm);
>   *
>   *		ret = drm_dev_register(drm);
>   *		if (ret)
>   *			return ret;
>   *
> 

Shouldn't the call just be dropped, as drm_dev_register() does it?

 Tomi