On Mon, Jan 19, 2026 at 01:49:58PM +0100, Maxime Ripard wrote: > The drm_private_obj initialization was inconsistent with the rest of the > KMS objects. Indeed, it required to pass a preallocated state in > drm_private_obj_init(), while all the others objects would have a reset > callback that would be called later on to create the state. > > However, reset really is meant to reset the hardware and software state. > That it creates an initial state is a side-effect that has been used in > all objects but drm_private_obj. This is made more complex since some > drm_private_obj, the DisplayPort ones in particular, need to be > persistent across and suspend/resume cycle, and such a cycle would call > drm_mode_config_reset(). > > Thus, we need to add a new callback to allocate a pristine state for a > given private object. > > This discussion has also came up during the atomic state readout > discussion, so it might be introduced into the other objects later on. > > Until all drivers are converted to that new allocation pattern, we will > only call it if the passed state is NULL. This will be removed > eventually. > > Signed-off-by: Maxime Ripard <[email protected]> > --- > drivers/gpu/drm/drm_atomic.c | 18 ++++++++++++++++-- > include/drm/drm_atomic.h | 13 +++++++++++++ > 2 files changed, 29 insertions(+), 2 deletions(-) >
Reviewed-by: Dmitry Baryshkov <[email protected]> -- With best wishes Dmitry
