aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-04-27 00:08:47 -0400
committerDave Airlie <airlied@redhat.com>2018-04-27 00:08:47 -0400
commit24d9092c8b7de0a0f630adbe3504bef8d3a618af (patch)
tree74472777a1b49f1f0884df31359deecff71fb758 /drivers
parentbb1278e891662616ccf4584523318d5f7ddb3a7c (diff)
parent0b551f1e0fc50ee4e3cde2dd639cb010dae5b997 (diff)
Merge tag 'drm-intel-fixes-2018-04-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix for black screen issues (FDO #104158 and #104425) - A correction for wrongly applied display W/A - Fixes for HDA codec interop issue (no audio) and too eager HW timeouts * tag 'drm-intel-fixes-2018-04-26' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/fbdev: Enable late fbdev initial configuration drm/i915: Use ktime on wait_for drm/i915: Enable display WA#1183 from its correct spot drm/i915/audio: set minimum CD clock to twice the BCLK
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_cdclk.c16
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h4
-rw-r--r--drivers/gpu/drm/i915/intel_fbdev.c2
-rw-r--r--drivers/gpu/drm/i915/intel_runtime_pm.c11
4 files changed, 22 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
index fc8b2c6e3508..32d24c69da3c 100644
--- a/drivers/gpu/drm/i915/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/intel_cdclk.c
@@ -2140,10 +2140,22 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
2140 } 2140 }
2141 } 2141 }
2142 2142
2143 /* According to BSpec, "The CD clock frequency must be at least twice 2143 /*
2144 * According to BSpec, "The CD clock frequency must be at least twice
2144 * the frequency of the Azalia BCLK." and BCLK is 96 MHz by default. 2145 * the frequency of the Azalia BCLK." and BCLK is 96 MHz by default.
2146 *
2147 * FIXME: Check the actual, not default, BCLK being used.
2148 *
2149 * FIXME: This does not depend on ->has_audio because the higher CDCLK
2150 * is required for audio probe, also when there are no audio capable
2151 * displays connected at probe time. This leads to unnecessarily high
2152 * CDCLK when audio is not required.
2153 *
2154 * FIXME: This limit is only applied when there are displays connected
2155 * at probe time. If we probe without displays, we'll still end up using
2156 * the platform minimum CDCLK, failing audio probe.
2145 */ 2157 */
2146 if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9) 2158 if (INTEL_GEN(dev_priv) >= 9)
2147 min_cdclk = max(2 * 96000, min_cdclk); 2159 min_cdclk = max(2 * 96000, min_cdclk);
2148 2160
2149 /* 2161 /*
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index d4368589b355..a80fbad9be0f 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -49,12 +49,12 @@
49 * check the condition before the timeout. 49 * check the condition before the timeout.
50 */ 50 */
51#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \ 51#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \
52 unsigned long timeout__ = jiffies + usecs_to_jiffies(US) + 1; \ 52 const ktime_t end__ = ktime_add_ns(ktime_get_raw(), 1000ll * (US)); \
53 long wait__ = (Wmin); /* recommended min for usleep is 10 us */ \ 53 long wait__ = (Wmin); /* recommended min for usleep is 10 us */ \
54 int ret__; \ 54 int ret__; \
55 might_sleep(); \ 55 might_sleep(); \
56 for (;;) { \ 56 for (;;) { \
57 bool expired__ = time_after(jiffies, timeout__); \ 57 const bool expired__ = ktime_after(ktime_get_raw(), end__); \
58 OP; \ 58 OP; \
59 if (COND) { \ 59 if (COND) { \
60 ret__ = 0; \ 60 ret__ = 0; \
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 6f12adc06365..6467a5cc2ca3 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -806,7 +806,7 @@ void intel_fbdev_output_poll_changed(struct drm_device *dev)
806 return; 806 return;
807 807
808 intel_fbdev_sync(ifbdev); 808 intel_fbdev_sync(ifbdev);
809 if (ifbdev->vma) 809 if (ifbdev->vma || ifbdev->helper.deferred_setup)
810 drm_fb_helper_hotplug_event(&ifbdev->helper); 810 drm_fb_helper_hotplug_event(&ifbdev->helper);
811} 811}
812 812
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 53ea564f971e..66de4b2dc8b7 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -641,19 +641,18 @@ void skl_enable_dc6(struct drm_i915_private *dev_priv)
641 641
642 DRM_DEBUG_KMS("Enabling DC6\n"); 642 DRM_DEBUG_KMS("Enabling DC6\n");
643 643
644 gen9_set_dc_state(dev_priv, DC_STATE_EN_UPTO_DC6); 644 /* Wa Display #1183: skl,kbl,cfl */
645 if (IS_GEN9_BC(dev_priv))
646 I915_WRITE(GEN8_CHICKEN_DCPR_1, I915_READ(GEN8_CHICKEN_DCPR_1) |
647 SKL_SELECT_ALTERNATE_DC_EXIT);
645 648
649 gen9_set_dc_state(dev_priv, DC_STATE_EN_UPTO_DC6);
646} 650}
647 651
648void skl_disable_dc6(struct drm_i915_private *dev_priv) 652void skl_disable_dc6(struct drm_i915_private *dev_priv)
649{ 653{
650 DRM_DEBUG_KMS("Disabling DC6\n"); 654 DRM_DEBUG_KMS("Disabling DC6\n");
651 655
652 /* Wa Display #1183: skl,kbl,cfl */
653 if (IS_GEN9_BC(dev_priv))
654 I915_WRITE(GEN8_CHICKEN_DCPR_1, I915_READ(GEN8_CHICKEN_DCPR_1) |
655 SKL_SELECT_ALTERNATE_DC_EXIT);
656
657 gen9_set_dc_state(dev_priv, DC_STATE_DISABLE); 656 gen9_set_dc_state(dev_priv, DC_STATE_DISABLE);
658} 657}
659 658