Re: [PATCH v2 03/20] drm/mode-config: Mention drm_mode_config_reset() culprits

Thomas Zimmermann
2026-04-21T13:08:06Z

Hi

Am 20.03.26 um 17:27 schrieb Maxime Ripard:
> drm_mode_config_reset() does not reset drm_private_states by design.
>
> This is especially significant for the DP MST and tunneling code that
> expect to be preserved across a suspend/resume cycle, where
> drm_mode_config_reset() is also used.

Do we really? There's drm_mode_config_helper_suspend/resume(). Why would
drivers do a drm_mode_config_reset().

Best regards
Thomas

>
> Let's document this expectation.
>
> Link: https://lore.kernel.org/dri-devel/aOaQLx-7EpsHRwkH@ideak-desk/
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
> drivers/gpu/drm/drm_mode_config.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
> index 66f7dc37b5970c0a08f8dde008aef56376c59f37..cba527571ca66d3aa6dc652c87e03a19815d1d41 100644
> --- a/drivers/gpu/drm/drm_mode_config.c
> +++ b/drivers/gpu/drm/drm_mode_config.c
> @@ -187,10 +187,14 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
> * @dev: drm device
> *
> * This functions calls all the crtc's, encoder's and connector's ->reset
> * callback. Drivers can use this in e.g. their driver load or resume code to
> * reset hardware and software state.
> + *
> + * Note that @drm_private_obj structures are expected to be stable across
> + * suspend/resume cycles, and @drm_mode_config_reset() does not affect these
> + * structures.
> */
> void drm_mode_config_reset(struct drm_device *dev)
> {
> struct drm_crtc *crtc;
> struct drm_colorop *colorop;
>

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