[Intel-gfx] [PATCH 01/10] drm/i915: fix the power well ID for always on wells

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Nov 12 05:39:15 PST 2015


On Wed, Nov 04, 2015 at 07:24:10PM +0200, Imre Deak wrote:
> lookup_power_well() expects uniq power well IDs, but atm we have
> uninitialized IDs which would clash with those power wells with a 0
> ID. This wasn't a problem so far since nothing looked up such a power
> well, but an upcoming patch will (Misc IO for SKL), so fix this up on
> platforms where this matters.

I thought we were moving the MISCIO and PW1 out from the power well
framework? I think I'd rather do that than to fabricate stuff for .data.

> 
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h         | 4 +++-
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 2 ++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 72bbed2..c103f8d 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -621,7 +621,7 @@ enum punit_power_well {
>  	PUNIT_POWER_WELL_DPIO_RX1		= 11,
>  	PUNIT_POWER_WELL_DPIO_CMN_D		= 12,
>  
> -	PUNIT_POWER_WELL_NUM,
> +	PUNIT_POWER_WELL_ALWAYS_ON,
>  };
>  
>  enum skl_disp_power_wells {
> @@ -632,6 +632,8 @@ enum skl_disp_power_wells {
>  	SKL_DISP_PW_DDI_D,
>  	SKL_DISP_PW_1 = 14,
>  	SKL_DISP_PW_2,
> +
> +	SKL_DISP_PW_ALWAYS_ON,
>  };
>  
>  #define SKL_POWER_WELL_STATE(pw) (1 << ((pw) * 2))
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 3a989a7..fc5552c 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -1633,6 +1633,7 @@ static struct i915_power_well vlv_power_wells[] = {
>  		.always_on = 1,
>  		.domains = VLV_ALWAYS_ON_POWER_DOMAINS,
>  		.ops = &i9xx_always_on_power_well_ops,
> +		.data = PUNIT_POWER_WELL_ALWAYS_ON,
>  	},
>  	{
>  		.name = "display",
> @@ -1734,6 +1735,7 @@ static struct i915_power_well skl_power_wells[] = {
>  		.always_on = 1,
>  		.domains = SKL_DISPLAY_ALWAYS_ON_POWER_DOMAINS,
>  		.ops = &i9xx_always_on_power_well_ops,
> +		.data = SKL_DISP_PW_ALWAYS_ON,
>  	},
>  	{
>  		.name = "power well 1",
> -- 
> 2.1.4

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list