Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24d9092c authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-fixes-2018-04-26' of...

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
parents bb1278e8 0b551f1e
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -2140,10 +2140,22 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
		}
	}

	/* According to BSpec, "The CD clock frequency must be at least twice
	/*
	 * According to BSpec, "The CD clock frequency must be at least twice
	 * the frequency of the Azalia BCLK." and BCLK is 96 MHz by default.
	 *
	 * FIXME: Check the actual, not default, BCLK being used.
	 *
	 * FIXME: This does not depend on ->has_audio because the higher CDCLK
	 * is required for audio probe, also when there are no audio capable
	 * displays connected at probe time. This leads to unnecessarily high
	 * CDCLK when audio is not required.
	 *
	 * FIXME: This limit is only applied when there are displays connected
	 * at probe time. If we probe without displays, we'll still end up using
	 * the platform minimum CDCLK, failing audio probe.
	 */
	if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9)
	if (INTEL_GEN(dev_priv) >= 9)
		min_cdclk = max(2 * 96000, min_cdclk);

	/*
+2 −2
Original line number Diff line number Diff line
@@ -49,12 +49,12 @@
 * check the condition before the timeout.
 */
#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \
	unsigned long timeout__ = jiffies + usecs_to_jiffies(US) + 1;	\
	const ktime_t end__ = ktime_add_ns(ktime_get_raw(), 1000ll * (US)); \
	long wait__ = (Wmin); /* recommended min for usleep is 10 us */	\
	int ret__;							\
	might_sleep();							\
	for (;;) {							\
		bool expired__ = time_after(jiffies, timeout__);	\
		const bool expired__ = ktime_after(ktime_get_raw(), end__); \
		OP;							\
		if (COND) {						\
			ret__ = 0;					\
+1 −1
Original line number Diff line number Diff line
@@ -806,7 +806,7 @@ void intel_fbdev_output_poll_changed(struct drm_device *dev)
		return;

	intel_fbdev_sync(ifbdev);
	if (ifbdev->vma)
	if (ifbdev->vma || ifbdev->helper.deferred_setup)
		drm_fb_helper_hotplug_event(&ifbdev->helper);
}

+5 −6
Original line number Diff line number Diff line
@@ -641,19 +641,18 @@ void skl_enable_dc6(struct drm_i915_private *dev_priv)

	DRM_DEBUG_KMS("Enabling DC6\n");

	gen9_set_dc_state(dev_priv, DC_STATE_EN_UPTO_DC6);
	/* Wa Display #1183: skl,kbl,cfl */
	if (IS_GEN9_BC(dev_priv))
		I915_WRITE(GEN8_CHICKEN_DCPR_1, I915_READ(GEN8_CHICKEN_DCPR_1) |
			   SKL_SELECT_ALTERNATE_DC_EXIT);

	gen9_set_dc_state(dev_priv, DC_STATE_EN_UPTO_DC6);
}

void skl_disable_dc6(struct drm_i915_private *dev_priv)
{
	DRM_DEBUG_KMS("Disabling DC6\n");

	/* Wa Display #1183: skl,kbl,cfl */
	if (IS_GEN9_BC(dev_priv))
		I915_WRITE(GEN8_CHICKEN_DCPR_1, I915_READ(GEN8_CHICKEN_DCPR_1) |
			   SKL_SELECT_ALTERNATE_DC_EXIT);

	gen9_set_dc_state(dev_priv, DC_STATE_DISABLE);
}