Commit c89d5454 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Jani Nikula

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: b63a16f6 ("drm/i915: Compute display surface offset in the plane check hook for SKL+")
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1477325584-23679-1-git-send-email-ville.syrjala@linux.intel.comTested-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit da064b47)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 7e9b3f95
...@@ -2978,7 +2978,8 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state) ...@@ -2978,7 +2978,8 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state)
/* Rotate src coordinates to match rotated GTT view */ /* Rotate src coordinates to match rotated GTT view */
if (intel_rotation_90_or_270(rotation)) if (intel_rotation_90_or_270(rotation))
drm_rect_rotate(&plane_state->base.src, drm_rect_rotate(&plane_state->base.src,
fb->width, fb->height, DRM_ROTATE_270); fb->width << 16, fb->height << 16,
DRM_ROTATE_270);
/* /*
* Handle the AUX surface first since * Handle the AUX surface first since
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment