aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2016-11-07 15:20:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-01 02:33:02 -0500
commit4c741e2adb351a44d1f4bc210aafd382939ac7ae (patch)
tree04c5d257d4cab8e80306139668c512e23a98d2ed /drivers/gpu/drm
parentf1dc9aaee02950e95cc045209d9bf07955bc16d8 (diff)
drm/i915: Ignore bogus plane coordinates on SKL when the plane is not visible
commit 3bfdfdcbce2796ce75bf2d85fd8471858d702e5d upstream. When the plane is invisible we may have all sorts of bogus stuff in the coordinates, which we must ignore or else we might fail the plane update. This started to happen on SKL when I moved the plane offset computation to happen in the check phase. Previously we happily ignored it all since we never called the update_plane hook with an invisible plane. 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> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98258 Testcase: igt/pm_rpm/legacy-planes Testcase: igt/pm_rpm/universal-planes Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-3-git-send-email-ville.syrjala@linux.intel.com (cherry picked from commit a5e4c7d0aa6784d8abe95c3ceef0da9656d17468) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 869b29fe9ec4..3c9cb35e46ab 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2975,6 +2975,9 @@ int skl_check_plane_surface(struct intel_plane_state *plane_state)
2975 unsigned int rotation = plane_state->base.rotation; 2975 unsigned int rotation = plane_state->base.rotation;
2976 int ret; 2976 int ret;
2977 2977
2978 if (!plane_state->base.visible)
2979 return 0;
2980
2978 /* Rotate src coordinates to match rotated GTT view */ 2981 /* Rotate src coordinates to match rotated GTT view */
2979 if (intel_rotation_90_or_270(rotation)) 2982 if (intel_rotation_90_or_270(rotation))
2980 drm_rect_rotate(&plane_state->base.src, 2983 drm_rect_rotate(&plane_state->base.src,