Skip to content

Commit

Permalink
drm/i915: Check overlay stride errata for i830 and i845
Browse files Browse the repository at this point in the history
commit a1efd14 upstream.

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: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Chris Wilson authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 5078304 commit 4060b48
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/gpu/drm/i915/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ static int check_overlay_src(struct drm_device *dev,
|| rec->src_width < N_HORIZ_Y_TAPS*4)
return -EINVAL;

/* check alingment constrains */
/* check alignment constraints */
switch (rec->flags & I915_OVERLAY_TYPE_MASK) {
case I915_OVERLAY_RGB:
/* not implemented */
Expand Down Expand Up @@ -990,7 +990,10 @@ static int check_overlay_src(struct drm_device *dev,
return -EINVAL;

/* stride checking */
stride_mask = 63;
if (IS_I830(dev) || IS_845G(dev))
stride_mask = 255;
else
stride_mask = 63;

if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask)
return -EINVAL;
Expand Down

0 comments on commit 4060b48

Please sign in to comment.