On Fri, 16 Sep 2022, Anusha Srivatsa <anusha.srivatsa@xxxxxxxxx> wrote: > Populate the new struct steps for squash case. > > Signed-off-by: Anusha Srivatsa <anusha.srivatsa@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_cdclk.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c > index 220d32adbd12..d2e81134b6f2 100644 > --- a/drivers/gpu/drm/i915/display/intel_cdclk.c > +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c > @@ -1973,8 +1973,9 @@ static bool intel_cdclk_can_crawl(struct drm_i915_private *dev_priv, > > static bool intel_cdclk_can_squash(struct drm_i915_private *dev_priv, > const struct intel_cdclk_config *a, > - const struct intel_cdclk_config *b) > + struct intel_cdclk_config *b) Why are you dropping const? > { > + struct cdclk_step *cdclk_transition = b->steps; The type name has step, the array is named steps, why is the variable "transition"? > /* > * FIXME should store a bit more state in intel_cdclk_config > * to differentiate squasher vs. cd2x divider properly. For > @@ -1984,6 +1985,12 @@ static bool intel_cdclk_can_squash(struct drm_i915_private *dev_priv, > if (!has_cdclk_squasher(dev_priv)) > return false; > > + if (a->cdclk != b->cdclk && a->vco != 0 && > + a->vco == b->vco && a->ref == b->ref) { > + cdclk_transition->action = CDCLK_SQUASH_ONLY; > + cdclk_transition->cdclk = b->cdclk; > + } > + > return a->cdclk != b->cdclk && > a->vco != 0 && > a->vco == b->vco && -- Jani Nikula, Intel Open Source Graphics Center