diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-11-01 21:15:58 +0100 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-11-20 19:33:21 +0100 |
commit | 10b47ee02d1ae66160058241cf5b962f64e81b47 (patch) | |
tree | d8158b85c8518b7be38449f12be36300710fb834 /include/drm/drm_plane_helper.h | |
parent | drm/vmwgfx: Try to fix plane clipping (diff) | |
download | linux-10b47ee02d1ae66160058241cf5b962f64e81b47.tar.xz linux-10b47ee02d1ae66160058241cf5b962f64e81b47.zip |
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 'include/drm/drm_plane_helper.h')
-rw-r--r-- | include/drm/drm_plane_helper.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h index 7c8a00ceadb7..41b8309b0a57 100644 --- a/include/drm/drm_plane_helper.h +++ b/include/drm/drm_plane_helper.h @@ -38,7 +38,8 @@ */ #define DRM_PLANE_HELPER_NO_SCALING (1<<16) -int drm_plane_helper_check_state(struct drm_plane_state *state, +int drm_plane_helper_check_state(struct drm_plane_state *plane_state, + const struct drm_crtc_state *crtc_state, const struct drm_rect *clip, int min_scale, int max_scale, bool can_position, |