[PATCH 4/4] drm/display/cdclk: Access new_cdclk_state from bxt_set_cdclk

Anusha Srivatsa anusha.srivatsa at intel.com
Tue Sep 13 23:04:29 UTC 2022


v2: Add a wrapper around the cdclk_state declaration so in cases of suspend
driver does not expect a valid dev_priv and that is expected.

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

diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index e0d47648e15a..5e831d6b2c12 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -1700,6 +1700,14 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
 	int clock;
 	int ret;
 
+	struct intel_cdclk_state *cdclk_state;
+
+	if (dev_priv->display.cdclk_state != NULL) {
+		cdclk_state = dev_priv->display.cdclk_state;
+		if (cdclk_state->steps->action == CDCLK_SQUASH_ONLY)
+			drm_err(&dev_priv->drm, "****Atomic check has set Squash as the cdclk action*****\n");
+	}
+
 	/* Inform power controller of upcoming frequency change. */
 	if (DISPLAY_VER(dev_priv) >= 11)
 		ret = skl_pcode_request(&dev_priv->uncore, SKL_PCODE_CDCLK_CONTROL,
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list