[PATCH 3/4] drm/i915/dispaly: Add macro definition of crawl condition

Anusha Srivatsa anusha.srivatsa at intel.com
Thu Aug 25 23:22:23 UTC 2022


Prep patch to simplify crawl condition

Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 53afb7f89e9f..2723a05fc25b 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -38,6 +38,8 @@
 #include "intel_psr.h"
 #include "vlv_sideband.h"
 
+#define ADLP_CDCLK_CRAWL(i915, vco)	(HAS_CDCLK_CRAWL(i915) && i915->cdclk.hw.vco > 0 && vco > 0)
+
 /**
  * DOC: CDCLK / RAWCLK
  *
@@ -1733,7 +1735,7 @@ static void bxt_set_cdclk(struct drm_i915_private *i915,
 		return;
 	}
 
-	if (HAS_CDCLK_CRAWL(i915) && i915->cdclk.hw.vco > 0 && vco > 0) {
+	if (ADLP_CDCLK_CRAWL(i915, vco)) {
 		if (i915->cdclk.hw.vco != vco)
 			adlp_cdclk_pll_crawl(i915, vco);
 	} else if (DISPLAY_VER(i915) >= 11) {
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list