[Intel-gfx] [PATCH 2/6] drm/i915/gt: Move rps.enabled/active to flags
Andi Shyti
andi at etezian.org
Sun Apr 26 23:15:56 UTC 2020
Hi Chris,
> intel_uncore_forcewake_get(uncore, FORCEWAKE_ALL);
> if (IS_CHERRYVIEW(i915))
> - rps->enabled = chv_rps_enable(rps);
> + enabled = chv_rps_enable(rps);
> else if (IS_VALLEYVIEW(i915))
> - rps->enabled = vlv_rps_enable(rps);
> + enabled = vlv_rps_enable(rps);
> else if (INTEL_GEN(i915) >= 9)
> - rps->enabled = gen9_rps_enable(rps);
> + enabled = gen9_rps_enable(rps);
> else if (INTEL_GEN(i915) >= 8)
> - rps->enabled = gen8_rps_enable(rps);
> + enabled = gen8_rps_enable(rps);
> else if (INTEL_GEN(i915) >= 6)
> - rps->enabled = gen6_rps_enable(rps);
> + enabled = gen6_rps_enable(rps);
> else if (IS_IRONLAKE_M(i915))
> - rps->enabled = gen5_rps_enable(rps);
> + enabled = gen5_rps_enable(rps);
> intel_uncore_forcewake_put(uncore, FORCEWAKE_ALL);
> - if (!rps->enabled)
> + if (!enabled || rps->max_freq <= rps->min_freq)
isn't this a bit out of context? I don't think the above
functions have any effect on max_freq and min freq.
just if (!enable) should do.
Andi
> return;
More information about the Intel-gfx
mailing list