drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 24 Oct 2016 16:13:04 +0000 (19:13 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Oct 2016 16:32:26 +0000 (19:32 +0300)
commitda064b47c0b8d0dff1905b38c76e7e51fb5a9547
treecaa3300e116f932ab6bc7b246f73f3d1720abb11
parentaafee2eb8ce86c13b3dde819de2f93d0ba61a040
drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation

Pass the framebuffer size in .16 fixed point coordinates to
drm_rect_rotate() since that's what the source coordinates are as well
at this stage. We used to do this part of the computation in integer
coordinates, but that got changed when moving the computation to
happen in the check phase of the operation. Unfortunately I forgot
to shift up the fb width and height appropriately.

With the bogus size we ended up with some negative fb offset, which when
added to the vma offset caused out scanout to start at an offset earlier
than we inteded. Eg. when testing on my SKL I saw a row of incorrect
tiles at the top of my screen.

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Cc: drm-intel-fixes@lists.freedesktop.org
Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1477325584-23679-1-git-send-email-ville.syrjala@linux.intel.com
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_display.c