[Intel-gfx] [PATCH 08/38] drm/atomic: Add __drm_atomic_get_current_plane_state

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Jun 2 13:41:04 UTC 2016


Op 02-06-16 om 00:06 schreef Daniel Vetter:
> ... and use it in msm&vc4. Again just want to encapsulate
> drm_atomic_state internals a bit.
>
> The const threading is a bit awkward in vc4 since C sucks, but I still
> think it's worth to enforce this. Eventually I want to make all the
> obj->state pointers const too, but that's a lot more work ...
>
Maybe instead of exposing such a dangerous function, wrap it in something like

drm_atomic_crtc_state_for_each_plane_state, which returns either get_current_plane_state or plane->state?

The only times this function is used is when iterating over all plane states a anyway, and it would be useful for i915 too.

~Maarten



More information about the dri-devel mailing list