On Tue, Sep 02, 2025 at 03:13:30PM +0200, Thomas Zimmermann wrote:
> Am 02.09.25 um 10:32 schrieb Maxime Ripard:
> > Signed-off-by: Maxime Ripard <[email protected]>
>
> Reviewed-by: Thomas Zimmermann <[email protected]>
>
> However, can this happen? Private state objects without state data?
I was going to ask the same. The commit message should explain why.
> > ---
> > drivers/gpu/drm/drm_atomic.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > index
> > b356d26faad4acaa25c1fe6f9bd5043b6364ce87..9b198610791d19c7fd276ca59264a961d21caf43
> > 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -295,10 +295,13 @@ void drm_atomic_state_default_clear(struct
> > drm_atomic_state *state)
> > }
> >
> > for (i = 0; i < state->num_private_objs; i++) {
> > struct drm_private_obj *obj = state->private_objs[i].ptr;
> >
> > + if (!obj)
> > + continue;
> > +
> > obj->funcs->atomic_destroy_state(obj,
> > state->private_objs[i].state);
> > state->private_objs[i].ptr = NULL;
> > state->private_objs[i].state = NULL;
> > state->private_objs[i].old_state = NULL;
--
Regards,
Laurent Pinchart