Quoting Ville Syrjala (2017-11-16 16:02:15) > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > 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@xxxxxxxxxxxxxxx > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was") > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > --- > 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@xxxxxxxxxxxxxxxxxx> -Chris