Re: [PATCH 1/6] drm/i915: grab force_wake when restoring LCPLL

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

 



On Mon, Aug 19, 2013 at 01:18:07PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> 
> If LCPLL is disabled, there's a chance we might be in package C8 state
> or deeper, and we'll get a hard hang when restoring LCPLL (also, a red
> led lights up on my motherboard). So grab the force_wake, which will
> get us out of RC6 and, as a consequence, out of PC8+ (since we need
> RC6 to get into PC8+).
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 00114a5..8c63d8e 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6031,6 +6031,10 @@ void hsw_restore_lcpll(struct drm_i915_private *dev_priv)
>  		    LCPLL_POWER_DOWN_ALLOW)) == LCPLL_PLL_LOCK)
>  		return;
>  
> +	/* Make sure we're not on PC8 state before disabling PC8, otherwise
> +	 * we'll hang the machine! */
> +	dev_priv->uncore.funcs.force_wake_get(dev_priv);

Calling the bare function pointer should be a warning that what you are
doing is quite perilous and needs a phat comment beforehand.

Or it is a mistake and you just meant gen6_gt_force_wake_get().
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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