Re: [PATCH 2/2] drm/i915/vlv: remove wait for previous GFX clk disable request

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

 



On Wed, 2015-04-01 at 14:22 -0700, Jesse Barnes wrote:
> Looks like it was introduced in:
> 
> commit 650ad970a39f8b6164fe8613edc150f585315289
> Author: Imre Deak <imre.deak@xxxxxxxxx>
> Date:   Fri Apr 18 16:35:02 2014 +0300
> 
>     drm/i915: vlv: factor out vlv_force_gfx_clock and check for pending force-of
> 
> but I'm not sure why.  It has caused problems for us in the past (see
> 85250ddff7a603dfe0ec0503a9e6395f79424f61 and
> 8d4eee9cd7a170342dc6fbc2ee19ae77031a8cd5) and doesn't seem to be
> required, so let's just drop it.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=89611
> Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 14 --------------
>  1 file changed, 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 4d6d6f0..c3fdbb0 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1208,21 +1208,7 @@ int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool force_on)
>  	u32 val;
>  	int err;
>  
> -	val = I915_READ(VLV_GTLC_SURVIVABILITY_REG);
> -
>  #define COND (I915_READ(VLV_GTLC_SURVIVABILITY_REG) & VLV_GFX_CLK_STATUS_BIT)
> -	/* Wait for a previous force-off to settle */
> -	if (force_on && !IS_CHERRYVIEW(dev_priv->dev)) {
> -		/* WARN_ON only for the Valleyview */
> -		WARN_ON(!!(val & VLV_GFX_CLK_FORCE_ON_BIT) == force_on);
> -
> -		err = wait_for(!COND, 20);
> -		if (err) {
> -			DRM_ERROR("timeout waiting for GFX clock force-off (%08x)\n",
> -				  I915_READ(VLV_GTLC_SURVIVABILITY_REG));
> -			return err;
> -		}
> -	}

The reason I added this is that it's not clear what happens if you try
to force the clock on while the previous force-off operation is still
pending. That is if Punit will correctly cancel turning off the clock in
this case. Since the docs don't clarify this either I thought the above
is safer. Is it the WARN that triggers and only during resume (we also
call the function from vlv_set_rps_idle)? If so, then it's not a real
timeout but BIOS has left the force-on flag set and we could just skip
calling vlv_force_gfx_clock(true) in that case.

If the HW people can confirm that the above isn't needed then I'm also
ok to remove it.

>  
>  	val = I915_READ(VLV_GTLC_SURVIVABILITY_REG);
>  	val &= ~VLV_GFX_CLK_FORCE_ON_BIT;


_______________________________________________
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