[PATCH 7/7] drm/i915/display: Add intel_cdclk_modeset()
Anusha Srivatsa
anusha.srivatsa at intel.com
Tue Aug 30 20:05:02 UTC 2022
Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
---
drivers/gpu/drm/i915/display/intel_cdclk.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 33e99cc5403a..d61937fd0953 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -2006,6 +2006,21 @@ static bool intel_cdclk_can_squash(struct drm_i915_private *dev_priv,
a->ref == b->ref;
}
+static void intel_cdclk_modeset(const struct intel_cdclk_config *a,
+ const struct intel_cdclk_config *b,
+ struct intel_cdclk_state *new_cdclk)
+{
+ struct cdclk_step *cdclk_transition = new_cdclk->steps;
+
+ if (a->cdclk != b->cdclk || a->vco != b->vco ||
+ a->ref != b->ref) {
+ cdclk_transition->action = CDCLK_LEGACY;
+ cdclk_transition->cdclk = b->cdclk;
+
+ }
+ return;
+}
+
/**
* intel_cdclk_needs_modeset - Determine if changong between the CDCLK
* configurations requires a modeset on all pipes
@@ -2798,6 +2813,9 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
pipe_name(pipe));
} else if (intel_cdclk_needs_modeset(&old_cdclk_state->actual,
&new_cdclk_state->actual)) {
+ intel_cdclk_modeset(&old_cdclk_state->actual,
+ &new_cdclk_state->actual,
+ new_cdclk_state);
/* All pipes must be switched off while we change the cdclk. */
ret = intel_modeset_all_pipes(state);
if (ret)
--
2.25.1
More information about the Intel-gfx-trybot
mailing list