aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-07-12 14:35:38 -0400
committerEric Anholt <eric@anholt.net>2010-08-01 22:46:16 -0400
commita1efd14a99483a4fb9308902397ed86b69454c99 (patch)
treee0e64ed6a78a41fdc9dada859a552a94afdc2800 /drivers
parent7de56f43e06ec6e17f548dfb359d395adbfbb87d (diff)
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: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index d7ad5139d17c..fe05ba27440a 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -958,7 +958,7 @@ static int check_overlay_src(struct drm_device *dev,
958 || rec->src_width < N_HORIZ_Y_TAPS*4) 958 || rec->src_width < N_HORIZ_Y_TAPS*4)
959 return -EINVAL; 959 return -EINVAL;
960 960
961 /* check alingment constrains */ 961 /* check alignment constraints */
962 switch (rec->flags & I915_OVERLAY_TYPE_MASK) { 962 switch (rec->flags & I915_OVERLAY_TYPE_MASK) {
963 case I915_OVERLAY_RGB: 963 case I915_OVERLAY_RGB:
964 /* not implemented */ 964 /* not implemented */
@@ -990,7 +990,10 @@ static int check_overlay_src(struct drm_device *dev,
990 return -EINVAL; 990 return -EINVAL;
991 991
992 /* stride checking */ 992 /* stride checking */
993 stride_mask = 63; 993 if (IS_I830(dev) || IS_845G(dev))
994 stride_mask = 255;
995 else
996 stride_mask = 63;
994 997
995 if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask) 998 if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask)
996 return -EINVAL; 999 return -EINVAL;