[Intel-gfx] [PATCH 3/6] drm/i915: Introduce i9xx_has_pps()

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Mar 19 13:26:23 UTC 2019


On 18/03/2019 16:56, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Add a small helper to determine if we have the panel power
> sequencer or not. We'll make PNV an exceptional case so
> that we can unset .is_mobile for the desktop variant.
> 
> Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_display.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 0ddd83dbd768..2ba61181746d 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1441,6 +1441,14 @@ static void chv_enable_pll(struct intel_crtc *crtc,
>   	}
>   }
>   
> +static bool i9xx_has_pps(struct drm_i915_private *dev_priv)
> +{
> +	if (IS_I830(dev_priv))
> +		return false;
> +
> +	return IS_PINEVIEW(dev_priv) || IS_MOBILE(dev_priv);
> +}
> +
>   static void i9xx_enable_pll(struct intel_crtc *crtc,
>   			    const struct intel_crtc_state *crtc_state)
>   {
> @@ -1452,7 +1460,7 @@ static void i9xx_enable_pll(struct intel_crtc *crtc,
>   	assert_pipe_disabled(dev_priv, crtc->pipe);
>   
>   	/* PLL is protected by panel, make sure we can write it */
> -	if (IS_MOBILE(dev_priv) && !IS_I830(dev_priv))
> +	if (i9xx_has_pps(dev_priv))
>   		assert_panel_unlocked(dev_priv, crtc->pipe);
>   
>   	/*
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list