[Intel-gfx] [PATCH 06/14] drm/i915: Check the clock from adjusted mode in intel_crtc_active()

Damien Lespiau damien.lespiau at intel.com
Tue Sep 10 17:00:56 CEST 2013


On Wed, Sep 04, 2013 at 06:25:23PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> The clock in crtc->mode doesn't necessarily mean anything. Let's look
> at the clock in adjusted_mode instead.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Damien Lespiau <damien.lespiau at intel.com>

-- 
Damien

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 48d93d3..397628b 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -45,10 +45,13 @@
>  
>  static bool intel_crtc_active(struct drm_crtc *crtc)
>  {
> +	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> +
>  	/* Be paranoid as we can arrive here with only partial
>  	 * state retrieved from the hardware during setup.
>  	 */
> -	return to_intel_crtc(crtc)->active && crtc->fb && crtc->mode.clock;
> +	return intel_crtc->active && crtc->fb &&
> +		intel_crtc->config.adjusted_mode.clock;
>  }
>  
>  static void i8xx_disable_fbc(struct drm_device *dev)
> -- 
> 1.8.1.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



More information about the Intel-gfx mailing list