Re: [PATCH v2 04/21] drm/i915: move power domain macros to intel_pm.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue,  4 Mar 2014 19:22:53 +0200
Imre Deak <imre.deak@xxxxxxxxx> wrote:

> These macros are used only locally, so move them to the .c file.
> 
> No functional change.
> 
> v2:
> - add init power domain to always-on power wells in the following
>   - separate - patch (Paulo)
> 
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_drv.h | 10 ----------
>  drivers/gpu/drm/i915/intel_pm.c | 20 ++++++++++++++++++--
>  2 files changed, 18 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 53b0512..0794bbd 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -121,8 +121,6 @@ enum intel_display_power_domain {
>  	POWER_DOMAIN_NUM,
>  };
>  
> -#define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1)
> -
>  #define POWER_DOMAIN_PIPE(pipe) ((pipe) + POWER_DOMAIN_PIPE_A)
>  #define POWER_DOMAIN_PIPE_PANEL_FITTER(pipe) \
>  		((pipe) + POWER_DOMAIN_PIPE_A_PANEL_FITTER)
> @@ -130,14 +128,6 @@ enum intel_display_power_domain {
>  	((tran) == TRANSCODER_EDP ? POWER_DOMAIN_TRANSCODER_EDP : \
>  	 (tran) + POWER_DOMAIN_TRANSCODER_A)
>  
> -#define HSW_ALWAYS_ON_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PIPE_A) |		\
> -	BIT(POWER_DOMAIN_TRANSCODER_EDP))
> -#define BDW_ALWAYS_ON_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PIPE_A) |		\
> -	BIT(POWER_DOMAIN_TRANSCODER_EDP) |	\
> -	BIT(POWER_DOMAIN_PIPE_A_PANEL_FITTER))
> -
>  enum hpd_pin {
>  	HPD_NONE = 0,
>  	HPD_PORT_A = HPD_NONE, /* PORT_A is internal */
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index db48d55..ebbd0ed 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5384,6 +5384,22 @@ void i915_release_power_well(void)
>  }
>  EXPORT_SYMBOL_GPL(i915_release_power_well);
>  
> +#define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1)
> +
> +#define HSW_ALWAYS_ON_POWER_DOMAINS (			\
> +	BIT(POWER_DOMAIN_PIPE_A) |			\
> +	BIT(POWER_DOMAIN_TRANSCODER_EDP))
> +#define HSW_DISPLAY_POWER_DOMAINS (				\
> +	(POWER_DOMAIN_MASK & ~HSW_ALWAYS_ON_POWER_DOMAINS) |	\
> +	BIT(POWER_DOMAIN_INIT))
> +
> +#define BDW_ALWAYS_ON_POWER_DOMAINS (			\
> +	HSW_ALWAYS_ON_POWER_DOMAINS |			\
> +	BIT(POWER_DOMAIN_PIPE_A_PANEL_FITTER))
> +#define BDW_DISPLAY_POWER_DOMAINS (				\
> +	(POWER_DOMAIN_MASK & ~BDW_ALWAYS_ON_POWER_DOMAINS) |	\
> +	BIT(POWER_DOMAIN_INIT))
> +
>  static struct i915_power_well i9xx_always_on_power_well[] = {
>  	{
>  		.name = "always-on",
> @@ -5400,7 +5416,7 @@ static struct i915_power_well hsw_power_wells[] = {
>  	},
>  	{
>  		.name = "display",
> -		.domains = POWER_DOMAIN_MASK & ~HSW_ALWAYS_ON_POWER_DOMAINS,
> +		.domains = HSW_DISPLAY_POWER_DOMAINS,
>  		.is_enabled = hsw_power_well_enabled,
>  		.set = hsw_set_power_well,
>  	},
> @@ -5414,7 +5430,7 @@ static struct i915_power_well bdw_power_wells[] = {
>  	},
>  	{
>  		.name = "display",
> -		.domains = POWER_DOMAIN_MASK & ~BDW_ALWAYS_ON_POWER_DOMAINS,
> +		.domains = BDW_DISPLAY_POWER_DOMAINS,
>  		.is_enabled = hsw_power_well_enabled,
>  		.set = hsw_set_power_well,
>  	},

Reviewed-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>

-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux