aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/zte
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-11-01 16:15:58 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2017-11-20 13:33:21 -0500
commit10b47ee02d1ae66160058241cf5b962f64e81b47 (patch)
treed8158b85c8518b7be38449f12be36300710fb834 /drivers/gpu/drm/zte
parent58a275aa956498ccf964678767560b0c91f31a23 (diff)
drm: Check crtc_state->enable rather than crtc->enabled in drm_plane_helper_check_state()
drm_plane_helper_check_state() is supposed to do things the atomic way, so it should not be inspecting crtc->enabled. Rather we should be looking at crtc_state->enable. We have a slight complication due to drm_plane_helper_check_update() reusing drm_plane_helper_check_state() for non-atomic drivers. Thus we'll have to pass the crtc_state in manally and construct a fake crtc_state in drm_plane_helper_check_update(). v2: Fix the WARNs about plane_state->crtc matching crtc_state->crtc Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171101201558.6059-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/zte')
-rw-r--r--drivers/gpu/drm/zte/zx_plane.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/zte/zx_plane.c b/drivers/gpu/drm/zte/zx_plane.c
index 18e763493264..ee0002529b8f 100644
--- a/drivers/gpu/drm/zte/zx_plane.c
+++ b/drivers/gpu/drm/zte/zx_plane.c
@@ -80,7 +80,7 @@ static int zx_vl_plane_atomic_check(struct drm_plane *plane,
80 clip.x2 = crtc_state->adjusted_mode.hdisplay; 80 clip.x2 = crtc_state->adjusted_mode.hdisplay;
81 clip.y2 = crtc_state->adjusted_mode.vdisplay; 81 clip.y2 = crtc_state->adjusted_mode.vdisplay;
82 82
83 return drm_plane_helper_check_state(plane_state, &clip, 83 return drm_plane_helper_check_state(plane_state, crtc_state, &clip,
84 min_scale, max_scale, 84 min_scale, max_scale,
85 true, true); 85 true, true);
86} 86}
@@ -315,7 +315,7 @@ static int zx_gl_plane_atomic_check(struct drm_plane *plane,
315 clip.x2 = crtc_state->adjusted_mode.hdisplay; 315 clip.x2 = crtc_state->adjusted_mode.hdisplay;
316 clip.y2 = crtc_state->adjusted_mode.vdisplay; 316 clip.y2 = crtc_state->adjusted_mode.vdisplay;
317 317
318 return drm_plane_helper_check_state(plane_state, &clip, 318 return drm_plane_helper_check_state(plane_state, crtc_state, &clip,
319 DRM_PLANE_HELPER_NO_SCALING, 319 DRM_PLANE_HELPER_NO_SCALING,
320 DRM_PLANE_HELPER_NO_SCALING, 320 DRM_PLANE_HELPER_NO_SCALING,
321 false, true); 321 false, true);