Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/i915: Wait up to 3ms for the pcu to ack the cdclk change" failed to apply to 4.4-stable tree

PATCH [email protected] 1 participant 1 message Oct 28, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 848496e5902833600f7992f4faa82dc1546051ba Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Wed, 13 Jul 2016 16:32:03 +0300
Subject: [PATCH] drm/i915: Wait up to 3ms for the pcu to ack the cdclk change
request on SKL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Bspec tells us to keep bashing the PCU for up to 3ms when trying to inform it about an upcoming change in the cdclk frequency. Currently we only keep at it for 15*10usec (+ whatever delays gets added by the sandybridge_pcode_read() itself). Let's change the limit to 3ms.

I decided to keep 10 usec delay per iteration for now, even though the spec doesn't really tell us to do that.

Fixes 5d96d8afcfbb ("drm/i915/skl: Deinit/init the display at suspend/resume")
Cc David Weinehall <[email protected]>
drivers/gpu/drm/i915/intel_display.c +1 -9
index 78beb7e9d384..c4c1c85366de 100644
@@ -5691,15 +5691,7 @@ static bool skl_cdclk_pcu_ready(struct drm_i915_private *dev_priv)
 
 static bool skl_cdclk_wait_for_pcu_ready(struct drm_i915_private *dev_priv)
 {
-	unsigned int i;
-
-	for (i = 0; i < 15; i++) {
-		if (skl_cdclk_pcu_ready(dev_priv))
-			return true;
-		udelay(10);
-	}
-
-	return false;
+	return _wait_for(skl_cdclk_pcu_ready(dev_priv), 3000, 10) == 0;
 }
 
 static void skl_set_cdclk(struct drm_i915_private *dev_priv, int cdclk, int vco)