summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_plane_helper.c
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2014-04-10 14:18:06 -0700
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-04-22 11:19:08 +0200
commitc10dddc1d5055467f67d50724f5297fe23b69cc2 (patch)
treeefcb4b5c0189dd58447ab438cb98f59df4af9ff9 /drivers/gpu/drm/drm_plane_helper.c
parentf9b0e251dfbf2c4da642ec9210db29a7ac63b81a (diff)
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 <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_plane_helper.c')
-rw-r--r--drivers/gpu/drm/drm_plane_helper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index d2b1c03b3d71..f48566445c31 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -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;