On Fri, Nov 25, 2016 at 09:23:01AM +0000, Chris Wilson wrote:
> On Thu, Nov 24, 2016 at 05:32:59PM +0200, Imre Deak wrote:
> > commit 848496e5902833600f7992f4faa82dc1546051ba
> > Author: Ville Syrjälä <ville.syrj...@linux.intel.com>
> > Date:   Wed Jul 13 16:32:03 2016 +0300
> > 
> >     drm/i915: Wait up to 3ms for the pcu to ack the cdclk change request on 
> > SKL
> > 
> > increased the timeout to match the spec, but we still see a timeout on
> > at least one SKL. A CDCLK change request following the failed one will
> > succeed nevertheless, so let's try to increase the timeout to 10ms.
> > 
> > Cc: Ville Syrjälä <ville.syrj...@linux.intel.com>
> > Reference: https://bugs.freedesktop.org/show_bug.cgi?id=97929
> > Signed-off-by: Imre Deak <imre.d...@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c 
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 5d11002..3b711f4 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -6261,7 +6261,7 @@ static bool skl_cdclk_pcu_ready(struct 
> > drm_i915_private *dev_priv)
> >  
> >  static bool skl_cdclk_wait_for_pcu_ready(struct drm_i915_private *dev_priv)
> >  {
> > -   return _wait_for(skl_cdclk_pcu_ready(dev_priv), 3000, 10) == 0;
> > +   return _wait_for(skl_cdclk_pcu_ready(dev_priv), 10000, 10) == 0;
> >  }
> 
> I can't think of a better approach to kick the pcu. But that is a wakeup
> every 10us for 10ms.
> 
> {
>       int ret;
> 
>       ret = wait_for_us(skl_cdclk_pcu_ready(dev_priv), 10);
>       if (ret)
>               ret = wait_for(skl_cdclk_pcu_ready(dev_priv), 10);
> 
>       return ret;
> }
> 
> would spin for the first 10us then do a more gentle probe for the next
> 10ms.

Otoh, talking to the pcu also includes such spinners within itself, so
probably overkill to spin on top as well.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to