diff mbox

drm/i915: Don't forget to mark crtc as inactive after disable

Message ID 1436277279-1154-1-git-send-email-patrik.jakobsson@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Patrik Jakobsson July 7, 2015, 1:54 p.m. UTC
Watermark calculations depend on the intel_crtc->active flag to be set
properly. Suspend/resume is broken on SKL and we also get DDB mismatches
without this patch.

The regression was introduced in:

commit eddfcbcdc27fbecb33bff098967bbdd7ca75bfa6
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Jun 15 12:33:53 2015 +0200

    drm/i915: Update less state during modeset.

    No need to repeatedly call update_watermarks, or update_fbc.
    Down to a single call to update_watermarks in .crtc_enable

    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
    Tested-by(IVB): Matt Roper <matthew.d.roper@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Shuang He July 8, 2015, 12:39 p.m. UTC | #1
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6745
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
ILK                 -9              302/302              293/302
SNB                 -32              312/316              280/316
IVB                 -14              343/343              329/343
BYT                                  287/287              287/287
HSW                                  380/380              380/380
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*ILK  igt@kms_flip@blocking-absolute-wf_vblank-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_flip@flip-vs-dpms-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_flip@flip-vs-rmfb-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_flip@nonexisting-fb      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_flip@rcs-wf_vblank-vs-dpms-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_flip@vblank-vs-hang      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_flip@wf_vblank-ts-check      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_flip@wf_vblank-vs-modeset-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*ILK  igt@kms_render@direct-render      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_cursor_crc@cursor-size-change      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@bo-too-big      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@bo-too-big-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@dpms-vs-vblank-race      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@dpms-vs-vblank-race-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip_event_leak      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@flip-vs-dpms-off-vs-modeset      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@flip-vs-dpms-off-vs-modeset-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@modeset-vs-vblank-race      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@modeset-vs-vblank-race-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@nonexisting-fb      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@nonexisting-fb-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@single-buffer-flip-vs-dpms-off-vs-modeset      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip@single-buffer-flip-vs-dpms-off-vs-modeset-interruptible      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_flip_tiling@flip-changes-tiling      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_mmio_vs_cs_flip@setcrtc_vs_cs_flip      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@kms_mmio_vs_cs_flip@setplane_vs_cs_flip      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@cursor      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@cursor-dpms      FAIL(1)      DMESG_FAIL(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@debugfs-forcewake-user      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@dpms-mode-unset-non-lpsp      FAIL(1)      DMESG_FAIL(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@dpms-non-lpsp      FAIL(1)      DMESG_FAIL(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@drm-resources-equal      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@fences      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@fences-dpms      FAIL(1)      DMESG_FAIL(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@gem-execbuf      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@gem-idle      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@gem-mmap-cpu      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@gem-mmap-gtt      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@gem-pread      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@i2c      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@modeset-non-lpsp      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@modeset-non-lpsp-stress-no-wait      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@pci-d3-state      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@reg-read-ioctl      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*SNB  igt@pm_rpm@rte      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-128x128-onscreen      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-128x128-random      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-128x128-sliding      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-256x256-offscreen      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-256x256-onscreen      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-256x256-sliding      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-64x64-offscreen      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-64x64-onscreen      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-64x64-random      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-64x64-sliding      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_cursor_crc@cursor-size-change      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_fence_pin_leak      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_mmio_vs_cs_flip@setcrtc_vs_cs_flip      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
*IVB  igt@kms_mmio_vs_cs_flip@setplane_vs_cs_flip      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_disable_shared_dpll[i915]()@WARNING:.* at .* intel_disable_shared_dpll+0x
Note: You need to pay more attention to line start with '*'
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 99bf147..ffd2c96 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5046,6 +5046,10 @@  static void ironlake_crtc_disable(struct drm_crtc *crtc)
 
 		ironlake_fdi_pll_disable(intel_crtc);
 	}
+
+	intel_crtc->active = false;
+	intel_update_watermarks(crtc);
+	intel_disable_shared_dpll(intel_crtc);
 }
 
 static void haswell_crtc_disable(struct drm_crtc *crtc)
@@ -5091,6 +5095,10 @@  static void haswell_crtc_disable(struct drm_crtc *crtc)
 	for_each_encoder_on_crtc(dev, crtc, encoder)
 		if (encoder->post_disable)
 			encoder->post_disable(encoder);
+
+	intel_crtc->active = false;
+	intel_update_watermarks(crtc);
+	intel_disable_shared_dpll(intel_crtc);
 }
 
 static void i9xx_pfit_enable(struct intel_crtc *crtc)
@@ -6155,6 +6163,9 @@  static void i9xx_crtc_disable(struct drm_crtc *crtc)
 
 	if (!IS_GEN2(dev))
 		intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
+
+	intel_crtc->active = false;
+	intel_update_watermarks(crtc);
 }
 
 static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)