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]>
---
 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;
  *

-- 
2.54.0

Reply via email to