From: Chris Wilson Date: Mon, 12 Jul 2010 18:35:38 +0000 (+0100) Subject: drm/i915: Check overlay stride errata for i830 and i845 X-Git-Tag: MMI-PSA29.97-13-9~22422^2~70^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a1efd14a99483a4fb9308902397ed86b69454c99;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Cc: stable@kernel.org Signed-off-by: Eric Anholt --- 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, || 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 */ @@ -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;