浏览代码

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>
Matt Roper 11 年之前
父节点
当前提交
c10dddc1d5
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/gpu/drm/drm_plane_helper.c

+ 2 - 0
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;