Op 16-03-17 om 08:10 schreef Dhinakaran Pandiyan:
> From: "Pandiyan, Dhinakaran" <[email protected]>
>
> It is necessary to track states for objects other than connector, crtc
> and plane for atomic modesets. But adding objects like DP MST link
> bandwidth to drm_atomic_state would mean that a non-core object will be
> modified by the core helper functions for swapping and clearing
> it's state. So, lets add void * objects and helper functions that operate
> on void * types to keep these objects and states private to the core.
> Drivers can then implement specific functions to swap and clear states.
> The other advantage having just void * for these objects in
> drm_atomic_state is that objects of different types can be managed in the
> same state array.
>
> v2: Added docs and new iterator to filter private objects (Daniel)
> v3: Macro alignment (Chris)
>
> Cc: Daniel Vetter <[email protected]>
> Cc: Archit Taneja <[email protected]>
> Cc: Maarten Lankhorst <[email protected]>
> Cc: Chris Wilson <[email protected]>
> Cc: Harry Wentland <[email protected]>
> Acked-by: Harry Wentland <[email protected]>
> Suggested-by: Daniel Vetter <[email protected]>
> Signed-off-by: Dhinakaran Pandiyan <[email protected]>

Mostly looks good, but too many null checks. I think it's best to get rid of 
them all
by freeing state->driver_private in default_clear() or setting num_private_objs 
to 0.
It would remove the need for all null checks I think..

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to