Am 19.05.26 um 11:01 schrieb Maxime Ripard:
The driver skeleton currently recommends calling
drm_mode_config_reset() at probe time to create the initial state.

Now that drm_mode_config_create_initial_state() exists to handle
initial state allocation without hardware side effects, update the
skeleton to recommend it instead.

Signed-off-by: Maxime Ripard <[email protected]>

Reviewed-by: Thomas Zimmermann <[email protected]>

---
  drivers/gpu/drm/drm_drv.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 985c283cf59f..f537556b06a8 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -340,11 +340,13 @@ void drm_minor_release(struct drm_minor *minor)
   *
   *            // Further setup, display pipeline etc
   *
   *            platform_set_drvdata(pdev, drm);
   *
- *             drm_mode_config_reset(drm);
+ *             ret = drm_mode_config_create_initial_state(drm);
+ *             if (ret)
+ *                     return ret;
   *
   *            ret = drm_dev_register(drm);
   *            if (ret)
   *                    return ret;
   *


--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)


Reply via email to