[Intel-gfx] [PATCH 3/5] drm/i915: Add a name for the Punit GPLLENABLE bit

Deepak S deepak.s at intel.com
Tue Nov 18 10:20:42 CET 2014


On Saturday 08 November 2014 01:03 AM, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Remove the magic number for the GPLLENABLE bit by adding a name for it.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>   drivers/gpu/drm/i915/i915_reg.h | 1 +
>   drivers/gpu/drm/i915/intel_pm.c | 4 ++--
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index d43fa0e..ec4dc00 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -564,6 +564,7 @@ enum punit_power_well {
>   #define PUNIT_REG_GPU_LFM			0xd3
>   #define PUNIT_REG_GPU_FREQ_REQ			0xd4
>   #define PUNIT_REG_GPU_FREQ_STS			0xd8
> +#define   GPLLENABLE				(1<<4)
>   #define   GENFREQSTATUS				(1<<0)
>   #define PUNIT_REG_MEDIA_TURBO_FREQ_REQ		0xdc
>   #define PUNIT_REG_CZ_TIMESTAMP			0xce
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index befad36..71eb377 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5397,7 +5397,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
>   
>   	val = vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS);
>   
> -	DRM_DEBUG_DRIVER("GPLL enabled? %s\n", val & 0x10 ? "yes" : "no");
> +	DRM_DEBUG_DRIVER("GPLL enabled? %s\n", val & GPLLENABLE ? "yes" : "no");
>   	DRM_DEBUG_DRIVER("GPU status: 0x%08x\n", val);
>   
>   	dev_priv->rps.cur_freq = (val >> 8) & 0xff;
> @@ -5477,7 +5477,7 @@ static void valleyview_enable_rps(struct drm_device *dev)
>   
>   	val = vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS);
>   
> -	DRM_DEBUG_DRIVER("GPLL enabled? %s\n", val & 0x10 ? "yes" : "no");
> +	DRM_DEBUG_DRIVER("GPLL enabled? %s\n", val & GPLLENABLE ? "yes" : "no");
>   	DRM_DEBUG_DRIVER("GPU status: 0x%08x\n", val);
>   
:)

Reviewed-by: Deepak S <deepak.s at linux.intel.com>


>   	dev_priv->rps.cur_freq = (val >> 8) & 0xff;




More information about the Intel-gfx mailing list