drm/i915: Detect invalid scanout pitches
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Jun 2013 16:26:45 +0000 (17:26 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 1 Jul 2013 09:14:46 +0000 (11:14 +0200)
commita35cdaa0e13e24f3fccc518bfef1516aa8a8a665
treeb28ec025f4a9e0d582c7cf81ba044b05b0eb1412
parente4e9222d4b5e041c3b5a54ee21d6c62e7cc56609
drm/i915: Detect invalid scanout pitches

Report back the user error of attempting to setup a CRTC with an invalid
framebuffer pitch. This is trickier than it should be as on gen4, there
is a restriction that tiled surfaces must have a stride less than 16k -
which is less than the largest supported CRTC size.

v2: Fix the limits for gen3
v3: Move check into intel_framebuffer_init() and fix VLV limits. (vsyrjala)
v4: Use idiomatic '>=' for generation checks

References: https://bugs.freedesktop.org/show_bug.cgi?id=65099
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c