[PATCH] drm/plane_helper: Use helper for plane->CRTC linkage

Daniel Stone daniels at collabora.com
Tue May 26 02:12:53 PDT 2015


plane_state->crtc shouldn't be assigned directly, but instead use
drm_atomic_set_crtc_for_plane, which also takes care of updating the
plane_mask on each CRTC's state.

Signed-off-by: Daniel Stone <daniels at collabora.com>
---
 drivers/gpu/drm/drm_plane_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 40c1db9..e215a07 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -530,7 +530,7 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
 		return -ENOMEM;
 	plane_state->plane = plane;
 
-	plane_state->crtc = crtc;
+	drm_atomic_set_crtc_for_plane(plane_state, crtc);
 	drm_atomic_set_fb_for_plane(plane_state, fb);
 	plane_state->crtc_x = crtc_x;
 	plane_state->crtc_y = crtc_y;
@@ -577,7 +577,7 @@ int drm_plane_helper_disable(struct drm_plane *plane)
 		return -ENOMEM;
 	plane_state->plane = plane;
 
-	plane_state->crtc = NULL;
+	drm_atomic_set_crtc_for_plane(plane_state, NULL);
 	drm_atomic_set_fb_for_plane(plane_state, NULL);
 
 	return drm_plane_helper_commit(plane, plane_state, plane->fb);
-- 
2.4.1



More information about the dri-devel mailing list