drm/atomic: Introduce state->obj backpointers
Useful since this way we can pass around just the state objects and will get ther real object, too. Specifically this allows us to again simplify the parameters for set_crtc_for_plane. v2: msm already has it's own specific plane_reset hook, don't forget that one! v3: Fixup kerneldoc, reported by 0-day builder. Cc: Rob Clark <robdclark@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> (v2) Tested-by: Rob Clark <robdclark@gmail.com> (v2) Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Esse commit está contido em:
@@ -517,6 +517,7 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||
plane_state = kzalloc(sizeof(*plane_state), GFP_KERNEL);
|
||||
if (!plane_state)
|
||||
return -ENOMEM;
|
||||
plane_state->plane = plane;
|
||||
|
||||
plane_state->crtc = crtc;
|
||||
drm_atomic_set_fb_for_plane(plane_state, fb);
|
||||
@@ -563,6 +564,7 @@ int drm_plane_helper_disable(struct drm_plane *plane)
|
||||
plane_state = kzalloc(sizeof(*plane_state), GFP_KERNEL);
|
||||
if (!plane_state)
|
||||
return -ENOMEM;
|
||||
plane_state->plane = plane;
|
||||
|
||||
plane_state->crtc = NULL;
|
||||
drm_atomic_set_fb_for_plane(plane_state, NULL);
|
||||
|
Referência em uma nova issue
Block a user