drm/plane-helper: Fix primary plane scaling check
Subsystems (2)
PATCH 1/1 drm/plane-helper: Fix primary plane scaling check
The src_w / src_h parameters to update_plane include a subpixel offset; we need to shift off the subpixel bits before comparing to CRTC size when checking for primary plane scaling.
Signed-off-by Matt Roper <[email protected]>
--- drivers/gpu/drm/drm_plane_helper.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_plane_helper.c +2 -0
@@ -145,6 +145,8 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, }/* Disallow scaling */ + src_w >>=16 ; + src_h >>=16 ;if (crtc_w != src_w || crtc_h != src_h) {DRM_DEBUG_KMS ("Can't scale primary plane\n" );return -EINVAL ;
Signature · 1 line
1.8.5.1
Quoted 5 lines · Matt Roper
The
src_w/src_hparameters toupdate_planeinclude a subpixel offset; we need to shift off the subpixel bits before comparing to CRTC size when checking for primary plane scaling.Signed-off-by Matt Roper <[email protected]>
Reviewed-by Daniel Vetter <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/drm_plane_helper.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/drm_plane_helper.c +2
-0@@ -145,6 +145,8 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, }/* Disallow scaling */ + src_w >>=16 ; + src_h >>=16 ;if (crtc_w != src_w || crtc_h != src_h) {DRM_DEBUG_KMS ("Can't scale primary plane\n" );return -EINVAL ;Signature · 6 lines
1.8.5.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch