drm/i915/skl: Don't try to update plane watermarks if they haven't changed
authorLyude <cpaul@redhat.com>
Mon, 29 Aug 2016 16:31:27 +0000 (12:31 -0400)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 7 Sep 2016 10:29:17 +0000 (12:29 +0200)
commitccebc23b57c313229526dc76383ce82f5e0b9001
tree18feb5af39b388e6bdc34a4aa2a1a681255858c6
parentb18c1bb48eb5911bf99fbc5bf6509d4ae06feb9d
drm/i915/skl: Don't try to update plane watermarks if they haven't changed

i915 sometimes needs to disable planes in the middle of an atomic
commit, and then reenable them later in the same commit. Because of
this, we can't make the assumption that the state of the plane actually
changed. Since the state of the plane hasn't actually changed, neither
have it's watermarks. And if the watermarks hasn't changed then we
haven't populated skl_results with anything, which means we'll end up
zeroing out a plane's watermarks in the middle of the atomic commit
without restoring them later.

Simple reproduction recipe:
 - Get a SKL laptop, launch any kind of X session
 - Get two extra monitors
 - Keep hotplugging both displays (so that the display configuration
   jumps from 1 active pipe to 3 active pipes and back)
 - Eventually underrun

Changes since v1:
 - Fix incorrect use of "it's"
Changes since v2:
 - Add reproduction recipe

Signed-off-by: Lyude <cpaul@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 62e0fb880123 ("drm/i915/skl: Update plane watermarks atomically during plane updates")
Signed-off-by: Lyude <cpaul@redhat.com>
Testcase: kms_plane
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1472488288-27280-1-git-send-email-cpaul@redhat.com
Cc: drm-intel-fixes@lists.freedesktop.org
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_sprite.c