[Intel-gfx] [PATCH 02/10] drm/i915: fix lookup_power_well for power wells without any domain
Patrik Jakobsson
patrik.jakobsson at linux.intel.com
Thu Nov 12 05:36:50 PST 2015
On Wed, Nov 04, 2015 at 07:24:11PM +0200, Imre Deak wrote:
> The current lookup code wouldn't find a power well if it's not in any
> power domain. There wasn't any power wells before but an upcoming patch
> will detach the power domains from power well#1 and the MISC IO power
> wells, so fix things up accordingly.
>
Reviewed-by: Patrik Jakobsson <patrik.jakobsson at linux.intel.com>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
> drivers/gpu/drm/i915/intel_runtime_pm.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index fc5552c..868c0f2 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -962,10 +962,12 @@ static struct i915_power_well *lookup_power_well(struct drm_i915_private *dev_pr
> int power_well_id)
> {
> struct i915_power_domains *power_domains = &dev_priv->power_domains;
> - struct i915_power_well *power_well;
> int i;
>
> - for_each_power_well(i, power_well, POWER_DOMAIN_MASK, power_domains) {
> + for (i = 0; i < power_domains->power_well_count; i++) {
> + struct i915_power_well *power_well;
> +
> + power_well = &power_domains->power_wells[i];
> if (power_well->data == power_well_id)
> return power_well;
> }
> --
> 2.1.4
>
More information about the Intel-gfx
mailing list