All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix init_clock_gating for resume
@ 2017-11-13 14:50 Ville Syrjala
  2017-11-13 15:20 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Ville Syrjala @ 2017-11-13 14:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable, Chris Wilson

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Moving the init_clock_gating() call from intel_modeset_init_hw() to
intel_modeset_gem_init() had an unintended effect of not applying
some workarounds on resume. This, for example, cause some kind of
corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
screen after hibernation. Fix the problem by explicitly calling
init_clock_gating() from the resume path.

I really hope this doesn't break something else again...

Cc: stable@vger.kernel.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9df7b5d59a94..0023fb17899f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1707,6 +1707,7 @@ static int i915_drm_resume(struct drm_device *dev)
 
 	intel_guc_resume(dev_priv);
 
+	intel_init_clock_gating(dev_priv);
 	intel_modeset_init_hw(dev);
 
 	spin_lock_irq(&dev_priv->irq_lock);
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Fix init_clock_gating for resume
  2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
@ 2017-11-13 15:20 ` Patchwork
  2017-11-13 16:15 ` ✓ Fi.CI.IGT: " Patchwork
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2017-11-13 15:20 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix init_clock_gating for resume
URL   : https://patchwork.freedesktop.org/series/33718/
State : success

== Summary ==

Series 33718v1 drm/i915: Fix init_clock_gating for resume
https://patchwork.freedesktop.org/api/1.0/series/33718/revisions/1/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                fail       -> PASS       (fi-kbl-7500u) fdo#102514
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-kbl-7560u) fdo#103706
Test vgem_basic:
        Subgroup unload:
                notrun     -> INCOMPLETE (fi-kbl-7560u) fdo#103702

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#103706 https://bugs.freedesktop.org/show_bug.cgi?id=103706
fdo#103702 https://bugs.freedesktop.org/show_bug.cgi?id=103702

fi-bdw-5557u     total:285  pass:263  dwarn:0   dfail:1   fail:0   skip:20 
fi-bdw-gvtdvm    total:285  pass:260  dwarn:0   dfail:1   fail:0   skip:23 
fi-blb-e6850     total:285  pass:218  dwarn:1   dfail:1   fail:0   skip:64 
fi-bsw-n3050     total:285  pass:238  dwarn:0   dfail:1   fail:0   skip:45 
fi-bwr-2160      total:285  pass:178  dwarn:0   dfail:1   fail:0   skip:105
fi-bxt-dsi       total:285  pass:254  dwarn:0   dfail:1   fail:0   skip:29 
fi-bxt-j4205     total:285  pass:255  dwarn:0   dfail:1   fail:0   skip:28 
fi-byt-j1900     total:285  pass:249  dwarn:0   dfail:1   fail:0   skip:34 
fi-byt-n2820     total:285  pass:245  dwarn:0   dfail:1   fail:0   skip:38 
fi-elk-e7500     total:285  pass:224  dwarn:0   dfail:1   fail:0   skip:59 
fi-gdg-551       total:285  pass:174  dwarn:0   dfail:1   fail:1   skip:108
fi-glk-1         total:285  pass:256  dwarn:0   dfail:1   fail:0   skip:27 
fi-hsw-4770      total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-hsw-4770r     total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-ilk-650       total:285  pass:223  dwarn:0   dfail:1   fail:0   skip:60 
fi-ivb-3520m     total:285  pass:255  dwarn:0   dfail:1   fail:0   skip:28 
fi-ivb-3770      total:285  pass:255  dwarn:0   dfail:1   fail:0   skip:28 
fi-kbl-7500u     total:285  pass:259  dwarn:1   dfail:1   fail:0   skip:23 
fi-kbl-7560u     total:285  pass:265  dwarn:0   dfail:1   fail:0   skip:18 
fi-kbl-7567u     total:285  pass:264  dwarn:0   dfail:1   fail:0   skip:19 
fi-kbl-r         total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-pnv-d510      total:285  pass:217  dwarn:1   dfail:1   fail:0   skip:65 
fi-skl-6260u     total:285  pass:264  dwarn:0   dfail:1   fail:0   skip:19 
fi-skl-6600u     total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-skl-6700hq    total:285  pass:258  dwarn:0   dfail:1   fail:0   skip:25 
fi-skl-6700k     total:285  pass:260  dwarn:0   dfail:1   fail:0   skip:23 
fi-skl-6770hq    total:285  pass:264  dwarn:0   dfail:1   fail:0   skip:19 
fi-skl-gvtdvm    total:285  pass:261  dwarn:0   dfail:1   fail:0   skip:22 
fi-snb-2520m     total:246  pass:212  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:285  pass:244  dwarn:0   dfail:1   fail:0   skip:39 
Blacklisted hosts:
fi-cfl-s         total:285  pass:252  dwarn:0   dfail:1   fail:0   skip:31 
fi-glk-dsi       total:253  pass:146  dwarn:0   dfail:7   fail:1   skip:98 
fi-cnl-y failed to connect after reboot

9a81c142768eb620a24b02a136716a44c304563f drm-tip: 2017y-11m-13d-11h-44m-54s UTC integration manifest
101cf01c9ba4 drm/i915: Fix init_clock_gating for resume

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7093/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915: Fix init_clock_gating for resume
  2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
  2017-11-13 15:20 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-11-13 16:15 ` Patchwork
  2017-11-13 19:01   ` Rodrigo Vivi
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2017-11-13 16:15 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix init_clock_gating for resume
URL   : https://patchwork.freedesktop.org/series/33718/
State : success

== Summary ==

Test drv_module_reload:
        Subgroup basic-no-display:
                dmesg-warn -> PASS       (shard-hsw) fdo#102707
Test vgem_basic:
        Subgroup debugfs:
                dmesg-fail -> INCOMPLETE (shard-hsw) fdo#103703

fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#103703 https://bugs.freedesktop.org/show_bug.cgi?id=103703

shard-hsw        total:2513 pass:1435 dwarn:2   dfail:1   fail:8   skip:1066 time:9200s
Blacklisted hosts:
shard-apl        total:2514 pass:1581 dwarn:3   dfail:2   fail:21  skip:906 time:12878s
shard-kbl        total:2360 pass:1514 dwarn:43  dfail:11  fail:24  skip:765 time:9343s
shard-snb        total:2479 pass:1155 dwarn:2   dfail:2   fail:13  skip:1306 time:7164s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7093/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Fix init_clock_gating for resume
  2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
@ 2017-11-13 19:01   ` Rodrigo Vivi
  2017-11-13 16:15 ` ✓ Fi.CI.IGT: " Patchwork
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Rodrigo Vivi @ 2017-11-13 19:01 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx, stable

On Mon, Nov 13, 2017 at 02:50:28PM +0000, Ville Syrjala wrote:
> From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> 
> Moving the init_clock_gating() call from intel_modeset_init_hw() to
> intel_modeset_gem_init() had an unintended effect of not applying
> some workarounds on resume. This, for example, cause some kind of
> corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> screen after hibernation. Fix the problem by explicitly calling
> init_clock_gating() from the resume path.
> 
> I really hope this doesn't break something else again...
> 
> Cc: stable@vger.kernel.org
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> Signed-off-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 9df7b5d59a94..0023fb17899f 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1707,6 +1707,7 @@ static int i915_drm_resume(struct drm_device *dev)
>  
>  	intel_guc_resume(dev_priv);
>  
> +	intel_init_clock_gating(dev_priv);
>  	intel_modeset_init_hw(dev);

Few questions:

Any reason why here we have it before init_hw while on finish_reset
we have it after init_hw?

Also, what about the case on modeset_init? Do we need there?
If yes, shouldn't we move the call entirely to intel-modeset_init_hw?

Also, do we still need now the call on vlv_resume_prepare?
and on i915_gem_init?

Thanks,
Rodrigo.

>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -- 
> 2.13.6
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] drm/i915: Fix init_clock_gating for resume
@ 2017-11-13 19:01   ` Rodrigo Vivi
  0 siblings, 0 replies; 17+ messages in thread
From: Rodrigo Vivi @ 2017-11-13 19:01 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx, stable

On Mon, Nov 13, 2017 at 02:50:28PM +0000, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Moving the init_clock_gating() call from intel_modeset_init_hw() to
> intel_modeset_gem_init() had an unintended effect of not applying
> some workarounds on resume. This, for example, cause some kind of
> corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> screen after hibernation. Fix the problem by explicitly calling
> init_clock_gating() from the resume path.
> 
> I really hope this doesn't break something else again...
> 
> Cc: stable@vger.kernel.org
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 9df7b5d59a94..0023fb17899f 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1707,6 +1707,7 @@ static int i915_drm_resume(struct drm_device *dev)
>  
>  	intel_guc_resume(dev_priv);
>  
> +	intel_init_clock_gating(dev_priv);
>  	intel_modeset_init_hw(dev);

Few questions:

Any reason why here we have it before init_hw while on finish_reset
we have it after init_hw?

Also, what about the case on modeset_init? Do we need there?
If yes, shouldn't we move the call entirely to intel-modeset_init_hw?

Also, do we still need now the call on vlv_resume_prepare?
and on i915_gem_init?

Thanks,
Rodrigo.

>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -- 
> 2.13.6
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Fix init_clock_gating for resume
  2017-11-13 19:01   ` Rodrigo Vivi
@ 2017-11-13 20:46     ` Ville Syrjälä
  -1 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2017-11-13 20:46 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx, stable

On Mon, Nov 13, 2017 at 11:01:31AM -0800, Rodrigo Vivi wrote:
> On Mon, Nov 13, 2017 at 02:50:28PM +0000, Ville Syrjala wrote:
> > From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > 
> > Moving the init_clock_gating() call from intel_modeset_init_hw() to
> > intel_modeset_gem_init() had an unintended effect of not applying
> > some workarounds on resume. This, for example, cause some kind of
> > corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> > screen after hibernation. Fix the problem by explicitly calling
> > init_clock_gating() from the resume path.
> > 
> > I really hope this doesn't break something else again...
> > 
> > Cc: stable@vger.kernel.org
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> > Signed-off-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 9df7b5d59a94..0023fb17899f 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -1707,6 +1707,7 @@ static int i915_drm_resume(struct drm_device *dev)
> >  
> >  	intel_guc_resume(dev_priv);
> >  
> > +	intel_init_clock_gating(dev_priv);
> >  	intel_modeset_init_hw(dev);
> 
> Few questions:
> 
> Any reason why here we have it before init_hw while on finish_reset
> we have it after init_hw?

Just me being lazy and not checking where I put it in the display reset
path.

> 
> Also, what about the case on modeset_init? Do we need there?
> If yes, shouldn't we move the call entirely to intel-modeset_init_hw?

I moved it there in commit b7048ea12fbb ("drm/i915: Do
.init_clock_gating() earlier to avoid it clobbering watermarks")
but that broke some GT workarounds, hence I had to move it back to
somewhere later in commit 6ac43272768c ("drm/i915: Move init_clock_gating()
back to where it was"). And that in turn broke my IVB LVDS :(

It's rather hard to win here.

> 
> Also, do we still need now the call on vlv_resume_prepare?
> and on i915_gem_init?

gem_init() yes. The vlv_resume_prepare() not sure. The theory there
seems to be that on VLV the settings can get clobbered by a runtime
suspend. Whereas with other platforms we seem to be assuming that
they're preserved.

Whether that's what really happens I'm not 100% sure. I think it may
very well be that VLV does lose a bunch of things in S0ix. We even have
that vlv_{save,restore}_gunit_s0ix_state() thing to avoid some other
things getting lost. CHV added a save/restore engine of some sort
that should take care of more things automagically, so not sure if
it actually needs the init_clock_gating either. OTOH maybe we should
just start playing it safe an do the init_clock_gating() unconditionally
in runtime resume? We already seem to be doing that with init_swizzle().

-- 
Ville Syrj�l�
Intel OTC

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Fix init_clock_gating for resume
@ 2017-11-13 20:46     ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2017-11-13 20:46 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx, stable

On Mon, Nov 13, 2017 at 11:01:31AM -0800, Rodrigo Vivi wrote:
> On Mon, Nov 13, 2017 at 02:50:28PM +0000, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Moving the init_clock_gating() call from intel_modeset_init_hw() to
> > intel_modeset_gem_init() had an unintended effect of not applying
> > some workarounds on resume. This, for example, cause some kind of
> > corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> > screen after hibernation. Fix the problem by explicitly calling
> > init_clock_gating() from the resume path.
> > 
> > I really hope this doesn't break something else again...
> > 
> > Cc: stable@vger.kernel.org
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 9df7b5d59a94..0023fb17899f 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -1707,6 +1707,7 @@ static int i915_drm_resume(struct drm_device *dev)
> >  
> >  	intel_guc_resume(dev_priv);
> >  
> > +	intel_init_clock_gating(dev_priv);
> >  	intel_modeset_init_hw(dev);
> 
> Few questions:
> 
> Any reason why here we have it before init_hw while on finish_reset
> we have it after init_hw?

Just me being lazy and not checking where I put it in the display reset
path.

> 
> Also, what about the case on modeset_init? Do we need there?
> If yes, shouldn't we move the call entirely to intel-modeset_init_hw?

I moved it there in commit b7048ea12fbb ("drm/i915: Do
.init_clock_gating() earlier to avoid it clobbering watermarks")
but that broke some GT workarounds, hence I had to move it back to
somewhere later in commit 6ac43272768c ("drm/i915: Move init_clock_gating()
back to where it was"). And that in turn broke my IVB LVDS :(

It's rather hard to win here.

> 
> Also, do we still need now the call on vlv_resume_prepare?
> and on i915_gem_init?

gem_init() yes. The vlv_resume_prepare() not sure. The theory there
seems to be that on VLV the settings can get clobbered by a runtime
suspend. Whereas with other platforms we seem to be assuming that
they're preserved.

Whether that's what really happens I'm not 100% sure. I think it may
very well be that VLV does lose a bunch of things in S0ix. We even have
that vlv_{save,restore}_gunit_s0ix_state() thing to avoid some other
things getting lost. CHV added a save/restore engine of some sort
that should take care of more things automagically, so not sure if
it actually needs the init_clock_gating either. OTOH maybe we should
just start playing it safe an do the init_clock_gating() unconditionally
in runtime resume? We already seem to be doing that with init_swizzle().

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Fix init_clock_gating for resume
  2017-11-13 20:46     ` Ville Syrjälä
@ 2017-11-13 21:01       ` Rodrigo Vivi
  -1 siblings, 0 replies; 17+ messages in thread
From: Rodrigo Vivi @ 2017-11-13 21:01 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, stable

On Mon, Nov 13, 2017 at 08:46:10PM +0000, Ville Syrj�l� wrote:
> On Mon, Nov 13, 2017 at 11:01:31AM -0800, Rodrigo Vivi wrote:
> > On Mon, Nov 13, 2017 at 02:50:28PM +0000, Ville Syrjala wrote:
> > > From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > > 
> > > Moving the init_clock_gating() call from intel_modeset_init_hw() to
> > > intel_modeset_gem_init() had an unintended effect of not applying
> > > some workarounds on resume. This, for example, cause some kind of
> > > corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> > > screen after hibernation. Fix the problem by explicitly calling
> > > init_clock_gating() from the resume path.
> > > 
> > > I really hope this doesn't break something else again...
> > > 
> > > Cc: stable@vger.kernel.org
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> > > Signed-off-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > > index 9df7b5d59a94..0023fb17899f 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > @@ -1707,6 +1707,7 @@ static int i915_drm_resume(struct drm_device *dev)
> > >  
> > >  	intel_guc_resume(dev_priv);
> > >  
> > > +	intel_init_clock_gating(dev_priv);
> > >  	intel_modeset_init_hw(dev);
> > 
> > Few questions:
> > 
> > Any reason why here we have it before init_hw while on finish_reset
> > we have it after init_hw?
> 
> Just me being lazy and not checking where I put it in the display reset
> path.
> 
> > 
> > Also, what about the case on modeset_init? Do we need there?
> > If yes, shouldn't we move the call entirely to intel-modeset_init_hw?
> 
> I moved it there in commit b7048ea12fbb ("drm/i915: Do
> .init_clock_gating() earlier to avoid it clobbering watermarks")
> but that broke some GT workarounds, hence I had to move it back to
> somewhere later in commit 6ac43272768c ("drm/i915: Move init_clock_gating()
> back to where it was"). And that in turn broke my IVB LVDS :(
> 
> It's rather hard to win here.

yeap :(

> 
> > 
> > Also, do we still need now the call on vlv_resume_prepare?
> > and on i915_gem_init?
> 
> gem_init() yes. The vlv_resume_prepare() not sure. The theory there
> seems to be that on VLV the settings can get clobbered by a runtime
> suspend. Whereas with other platforms we seem to be assuming that
> they're preserved.
> 
> Whether that's what really happens I'm not 100% sure. I think it may
> very well be that VLV does lose a bunch of things in S0ix. We even have
> that vlv_{save,restore}_gunit_s0ix_state() thing to avoid some other
> things getting lost. CHV added a save/restore engine of some sort
> that should take care of more things automagically, so not sure if
> it actually needs the init_clock_gating either. OTOH maybe we should
> just start playing it safe an do the init_clock_gating() unconditionally
> in runtime resume? We already seem to be doing that with init_swizzle().

this seems a good idea...

But just in case you still want to go ahead with this patch for now feel
free to use:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks for all explanations.

> 
> -- 
> Ville Syrj�l�
> Intel OTC

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Fix init_clock_gating for resume
@ 2017-11-13 21:01       ` Rodrigo Vivi
  0 siblings, 0 replies; 17+ messages in thread
From: Rodrigo Vivi @ 2017-11-13 21:01 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, stable

On Mon, Nov 13, 2017 at 08:46:10PM +0000, Ville Syrjälä wrote:
> On Mon, Nov 13, 2017 at 11:01:31AM -0800, Rodrigo Vivi wrote:
> > On Mon, Nov 13, 2017 at 02:50:28PM +0000, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Moving the init_clock_gating() call from intel_modeset_init_hw() to
> > > intel_modeset_gem_init() had an unintended effect of not applying
> > > some workarounds on resume. This, for example, cause some kind of
> > > corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> > > screen after hibernation. Fix the problem by explicitly calling
> > > init_clock_gating() from the resume path.
> > > 
> > > I really hope this doesn't break something else again...
> > > 
> > > Cc: stable@vger.kernel.org
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > > index 9df7b5d59a94..0023fb17899f 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > @@ -1707,6 +1707,7 @@ static int i915_drm_resume(struct drm_device *dev)
> > >  
> > >  	intel_guc_resume(dev_priv);
> > >  
> > > +	intel_init_clock_gating(dev_priv);
> > >  	intel_modeset_init_hw(dev);
> > 
> > Few questions:
> > 
> > Any reason why here we have it before init_hw while on finish_reset
> > we have it after init_hw?
> 
> Just me being lazy and not checking where I put it in the display reset
> path.
> 
> > 
> > Also, what about the case on modeset_init? Do we need there?
> > If yes, shouldn't we move the call entirely to intel-modeset_init_hw?
> 
> I moved it there in commit b7048ea12fbb ("drm/i915: Do
> .init_clock_gating() earlier to avoid it clobbering watermarks")
> but that broke some GT workarounds, hence I had to move it back to
> somewhere later in commit 6ac43272768c ("drm/i915: Move init_clock_gating()
> back to where it was"). And that in turn broke my IVB LVDS :(
> 
> It's rather hard to win here.

yeap :(

> 
> > 
> > Also, do we still need now the call on vlv_resume_prepare?
> > and on i915_gem_init?
> 
> gem_init() yes. The vlv_resume_prepare() not sure. The theory there
> seems to be that on VLV the settings can get clobbered by a runtime
> suspend. Whereas with other platforms we seem to be assuming that
> they're preserved.
> 
> Whether that's what really happens I'm not 100% sure. I think it may
> very well be that VLV does lose a bunch of things in S0ix. We even have
> that vlv_{save,restore}_gunit_s0ix_state() thing to avoid some other
> things getting lost. CHV added a save/restore engine of some sort
> that should take care of more things automagically, so not sure if
> it actually needs the init_clock_gating either. OTOH maybe we should
> just start playing it safe an do the init_clock_gating() unconditionally
> in runtime resume? We already seem to be doing that with init_swizzle().

this seems a good idea...

But just in case you still want to go ahead with this patch for now feel
free to use:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks for all explanations.

> 
> -- 
> Ville Syrjälä
> Intel OTC

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2] drm/i915: Fix init_clock_gating for resume
  2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
@ 2017-11-16 16:02   ` Ville Syrjala
  2017-11-13 16:15 ` ✓ Fi.CI.IGT: " Patchwork
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjala @ 2017-11-16 16:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable, Chris Wilson, Rodrigo Vivi

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Moving the init_clock_gating() call from intel_modeset_init_hw() to
intel_modeset_gem_init() had an unintended effect of not applying
some workarounds on resume. This, for example, cause some kind of
corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
screen after hibernation. Fix the problem by explicitly calling
init_clock_gating() from the resume path.

I really hope this doesn't break something else again. At least
the problems reported at https://bugs.freedesktop.org/show_bug.cgi?id=103549
didn't make a comeback, even after a hibernate cycle.

v2: Reorder the init_clock_gating vs. modeset_init_hw to match
    the display reset path (Rodrigo)

Cc: stable@vger.kernel.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3423d873123a..fb584b821fb3 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1709,6 +1709,7 @@ static int i915_drm_resume(struct drm_device *dev)
 	i915_gem_resume(dev_priv);
 
 	intel_modeset_init_hw(dev);
+	intel_init_clock_gating(dev_priv);
 
 	spin_lock_irq(&dev_priv->irq_lock);
 	if (dev_priv->display.hpd_irq_setup)
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2] drm/i915: Fix init_clock_gating for resume
@ 2017-11-16 16:02   ` Ville Syrjala
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjala @ 2017-11-16 16:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi, stable

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Moving the init_clock_gating() call from intel_modeset_init_hw() to
intel_modeset_gem_init() had an unintended effect of not applying
some workarounds on resume. This, for example, cause some kind of
corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
screen after hibernation. Fix the problem by explicitly calling
init_clock_gating() from the resume path.

I really hope this doesn't break something else again. At least
the problems reported at https://bugs.freedesktop.org/show_bug.cgi?id=103549
didn't make a comeback, even after a hibernate cycle.

v2: Reorder the init_clock_gating vs. modeset_init_hw to match
    the display reset path (Rodrigo)

Cc: stable@vger.kernel.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3423d873123a..fb584b821fb3 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1709,6 +1709,7 @@ static int i915_drm_resume(struct drm_device *dev)
 	i915_gem_resume(dev_priv);
 
 	intel_modeset_init_hw(dev);
+	intel_init_clock_gating(dev_priv);
 
 	spin_lock_irq(&dev_priv->irq_lock);
 	if (dev_priv->display.hpd_irq_setup)
-- 
2.13.6

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] drm/i915: Fix init_clock_gating for resume
  2017-11-16 16:02   ` Ville Syrjala
  (?)
@ 2017-11-16 16:14   ` Chris Wilson
  2017-11-20 13:02       ` Ville Syrjälä
  -1 siblings, 1 reply; 17+ messages in thread
From: Chris Wilson @ 2017-11-16 16:14 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx; +Cc: stable, Rodrigo Vivi

Quoting Ville Syrjala (2017-11-16 16:02:15)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Moving the init_clock_gating() call from intel_modeset_init_hw() to
> intel_modeset_gem_init() had an unintended effect of not applying
> some workarounds on resume. This, for example, cause some kind of
> corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> screen after hibernation. Fix the problem by explicitly calling
> init_clock_gating() from the resume path.
> 
> I really hope this doesn't break something else again. At least
> the problems reported at https://bugs.freedesktop.org/show_bug.cgi?id=103549
> didn't make a comeback, even after a hibernate cycle.
> 
> v2: Reorder the init_clock_gating vs. modeset_init_hw to match
>     the display reset path (Rodrigo)
> 
> Cc: stable@vger.kernel.org
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 3423d873123a..fb584b821fb3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1709,6 +1709,7 @@ static int i915_drm_resume(struct drm_device *dev)
>         i915_gem_resume(dev_priv);
>  
>         intel_modeset_init_hw(dev);
> +       intel_init_clock_gating(dev_priv);

The repetition of GT stuff here shouldn't be a problem, since they
should match the values in the reloaded context. (If not, we have bigger
problems!) And the bits that aren't in the context do need to be
restored.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Fix init_clock_gating for resume (rev2)
  2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
                   ` (3 preceding siblings ...)
  2017-11-16 16:02   ` Ville Syrjala
@ 2017-11-16 16:22 ` Patchwork
  2017-11-16 17:08 ` ✗ Fi.CI.IGT: warning " Patchwork
  2017-11-17 19:11 ` ✓ Fi.CI.BAT: success " Patchwork
  6 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2017-11-16 16:22 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix init_clock_gating for resume (rev2)
URL   : https://patchwork.freedesktop.org/series/33718/
State : success

== Summary ==

Series 33718v2 drm/i915: Fix init_clock_gating for resume
https://patchwork.freedesktop.org/api/1.0/series/33718/revisions/2/mbox/

Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:444s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:384s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:541s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:279s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:510s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:512s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:502s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:496s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:435s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:268s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:541s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:432s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:442s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:432s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:480s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:469s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:481s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:529s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:480s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:537s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:589s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:460s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:549s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:524s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:503s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:467s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:565s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:426s
Blacklisted hosts:
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:557s

1fc4fe8ac97eee86a4fe2dc1239a350aa3f13371 drm-tip: 2017y-11m-16d-12h-57m-10s UTC integration manifest
cd58fee2b180 drm/i915: Fix init_clock_gating for resume

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7159/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✗ Fi.CI.IGT: warning for drm/i915: Fix init_clock_gating for resume (rev2)
  2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
                   ` (4 preceding siblings ...)
  2017-11-16 16:22 ` ✓ Fi.CI.BAT: success for drm/i915: Fix init_clock_gating for resume (rev2) Patchwork
@ 2017-11-16 17:08 ` Patchwork
  2017-11-17 19:11 ` ✓ Fi.CI.BAT: success " Patchwork
  6 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2017-11-16 17:08 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix init_clock_gating for resume (rev2)
URL   : https://patchwork.freedesktop.org/series/33718/
State : warning

== Summary ==

Test drv_selftest:
        Subgroup mock_sanitycheck:
                pass       -> DMESG-WARN (shard-snb) fdo#103717
Test kms_cursor_crc:
        Subgroup cursor-64x64-dpms:
                pass       -> SKIP       (shard-hsw)
Test kms_busy:
        Subgroup extended-modeset-hang-newfb-with-reset-render-c:
                pass       -> DMESG-WARN (shard-hsw) fdo#102249
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                fail       -> PASS       (shard-snb) fdo#101623

fdo#103717 https://bugs.freedesktop.org/show_bug.cgi?id=103717
fdo#102249 https://bugs.freedesktop.org/show_bug.cgi?id=102249
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hsw        total:2584 pass:1470 dwarn:3   dfail:1   fail:10  skip:1100 time:9486s
shard-snb        total:2584 pass:1258 dwarn:2   dfail:1   fail:12  skip:1311 time:8022s
Blacklisted hosts:
shard-apl        total:2550 pass:1597 dwarn:2   dfail:2   fail:24  skip:924 time:13192s
shard-kbl        total:2565 pass:1689 dwarn:17  dfail:2   fail:23  skip:833 time:10597s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7159/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Fix init_clock_gating for resume (rev2)
  2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
                   ` (5 preceding siblings ...)
  2017-11-16 17:08 ` ✗ Fi.CI.IGT: warning " Patchwork
@ 2017-11-17 19:11 ` Patchwork
  6 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2017-11-17 19:11 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix init_clock_gating for resume (rev2)
URL   : https://patchwork.freedesktop.org/series/33718/
State : success

== Summary ==

Series 33718v2 drm/i915: Fix init_clock_gating for resume
https://patchwork.freedesktop.org/api/1.0/series/33718/revisions/2/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                pass       -> FAIL       (fi-kbl-7500u) fdo#103163
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713

fdo#103163 https://bugs.freedesktop.org/show_bug.cgi?id=103163
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:443s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:454s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:381s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:540s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:277s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:507s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:509s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:508s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:489s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:435s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:267s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:541s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:427s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:438s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:427s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:490s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:459s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:0   fail:1   skip:24  time:476s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:542s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:473s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:535s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:457s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:547s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:565s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:517s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:493s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:468s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:563s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:423s
Blacklisted hosts:
fi-cfl-s2        total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:612s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:547s
fi-glk-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:501s
fi-pnv-d510 failed to collect. IGT log at Patchwork_7180/fi-pnv-d510/igt.log

74ae8acff97c1739330154fa34bf5a64e28d608f drm-tip: 2017y-11m-17d-17h-53m-01s UTC integration manifest
89e3a2006ae6 drm/i915: Fix init_clock_gating for resume

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7180/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] drm/i915: Fix init_clock_gating for resume
  2017-11-16 16:14   ` Chris Wilson
@ 2017-11-20 13:02       ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2017-11-20 13:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, stable, Rodrigo Vivi

On Thu, Nov 16, 2017 at 04:14:50PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2017-11-16 16:02:15)
> > From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > 
> > Moving the init_clock_gating() call from intel_modeset_init_hw() to
> > intel_modeset_gem_init() had an unintended effect of not applying
> > some workarounds on resume. This, for example, cause some kind of
> > corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> > screen after hibernation. Fix the problem by explicitly calling
> > init_clock_gating() from the resume path.
> > 
> > I really hope this doesn't break something else again. At least
> > the problems reported at https://bugs.freedesktop.org/show_bug.cgi?id=103549
> > didn't make a comeback, even after a hibernate cycle.
> > 
> > v2: Reorder the init_clock_gating vs. modeset_init_hw to match
> >     the display reset path (Rodrigo)
> > 
> > Cc: stable@vger.kernel.org
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> > Signed-off-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 3423d873123a..fb584b821fb3 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -1709,6 +1709,7 @@ static int i915_drm_resume(struct drm_device *dev)
> >         i915_gem_resume(dev_priv);
> >  
> >         intel_modeset_init_hw(dev);
> > +       intel_init_clock_gating(dev_priv);
> 
> The repetition of GT stuff here shouldn't be a problem, since they
> should match the values in the reloaded context. (If not, we have bigger
> problems!) And the bits that aren't in the context do need to be
> restored.
> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Pushed to dinq. Thanks for the reviews.

-- 
Ville Syrj�l�
Intel OTC

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] drm/i915: Fix init_clock_gating for resume
@ 2017-11-20 13:02       ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2017-11-20 13:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, stable, Rodrigo Vivi

On Thu, Nov 16, 2017 at 04:14:50PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2017-11-16 16:02:15)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Moving the init_clock_gating() call from intel_modeset_init_hw() to
> > intel_modeset_gem_init() had an unintended effect of not applying
> > some workarounds on resume. This, for example, cause some kind of
> > corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
> > screen after hibernation. Fix the problem by explicitly calling
> > init_clock_gating() from the resume path.
> > 
> > I really hope this doesn't break something else again. At least
> > the problems reported at https://bugs.freedesktop.org/show_bug.cgi?id=103549
> > didn't make a comeback, even after a hibernate cycle.
> > 
> > v2: Reorder the init_clock_gating vs. modeset_init_hw to match
> >     the display reset path (Rodrigo)
> > 
> > Cc: stable@vger.kernel.org
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 3423d873123a..fb584b821fb3 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -1709,6 +1709,7 @@ static int i915_drm_resume(struct drm_device *dev)
> >         i915_gem_resume(dev_priv);
> >  
> >         intel_modeset_init_hw(dev);
> > +       intel_init_clock_gating(dev_priv);
> 
> The repetition of GT stuff here shouldn't be a problem, since they
> should match the values in the reloaded context. (If not, we have bigger
> problems!) And the bits that aren't in the context do need to be
> restored.
> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Pushed to dinq. Thanks for the reviews.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-11-20 13:02 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 14:50 [PATCH] drm/i915: Fix init_clock_gating for resume Ville Syrjala
2017-11-13 15:20 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-13 16:15 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-13 19:01 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
2017-11-13 19:01   ` Rodrigo Vivi
2017-11-13 20:46   ` [Intel-gfx] " Ville Syrjälä
2017-11-13 20:46     ` Ville Syrjälä
2017-11-13 21:01     ` Rodrigo Vivi
2017-11-13 21:01       ` Rodrigo Vivi
2017-11-16 16:02 ` [PATCH v2] " Ville Syrjala
2017-11-16 16:02   ` Ville Syrjala
2017-11-16 16:14   ` Chris Wilson
2017-11-20 13:02     ` Ville Syrjälä
2017-11-20 13:02       ` Ville Syrjälä
2017-11-16 16:22 ` ✓ Fi.CI.BAT: success for drm/i915: Fix init_clock_gating for resume (rev2) Patchwork
2017-11-16 17:08 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-17 19:11 ` ✓ Fi.CI.BAT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.