[Intel-gfx] [PATCH] drm/i915: Use wait_for_register in hsw_disable_lcpll()

Michal Wajdeczko michal.wajdeczko at intel.com
Mon Apr 10 12:30:43 UTC 2017


There is no need to use macro as we can use generic function.
And as side effect we can lower driver footprint.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index eeb828c..2fce1a7 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8693,11 +8693,11 @@ static void hsw_disable_lcpll(struct drm_i915_private *dev_priv,
 		val |= LCPLL_CD_SOURCE_FCLK;
 		I915_WRITE(LCPLL_CTL, val);
 
-		if (wait_for_us(I915_READ(LCPLL_CTL) &
-				LCPLL_CD_SOURCE_FCLK_DONE, 1))
+		if (__intel_wait_for_register_fw(dev_priv, LCPLL_CTL,
+						 LCPLL_CD_SOURCE_FCLK_DONE,
+						 LCPLL_CD_SOURCE_FCLK_DONE,
+						 1, 0, &val))
 			DRM_ERROR("Switching to FCLK failed\n");
-
-		val = I915_READ(LCPLL_CTL);
 	}
 
 	val |= LCPLL_PLL_DISABLE;
-- 
2.7.4



More information about the Intel-gfx mailing list