Commit a1efd14a authored by Chris Wilson's avatar Chris Wilson Committed by Eric Anholt

drm/i915: Check overlay stride errata for i830 and i845

Apparently i830 and i845 cannot handle any stride that is not a multiple
of 256, unlike their brethren which do support 64 byte aligned strides.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 7de56f43
...@@ -958,7 +958,7 @@ static int check_overlay_src(struct drm_device *dev, ...@@ -958,7 +958,7 @@ static int check_overlay_src(struct drm_device *dev,
|| rec->src_width < N_HORIZ_Y_TAPS*4) || rec->src_width < N_HORIZ_Y_TAPS*4)
return -EINVAL; return -EINVAL;
/* check alingment constrains */ /* check alignment constraints */
switch (rec->flags & I915_OVERLAY_TYPE_MASK) { switch (rec->flags & I915_OVERLAY_TYPE_MASK) {
case I915_OVERLAY_RGB: case I915_OVERLAY_RGB:
/* not implemented */ /* not implemented */
...@@ -990,6 +990,9 @@ static int check_overlay_src(struct drm_device *dev, ...@@ -990,6 +990,9 @@ static int check_overlay_src(struct drm_device *dev,
return -EINVAL; return -EINVAL;
/* stride checking */ /* stride checking */
if (IS_I830(dev) || IS_845G(dev))
stride_mask = 255;
else
stride_mask = 63; stride_mask = 63;
if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask) if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment