Message ID | 1360143081-12054-1-git-send-email-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Feb 06, 2013 at 09:31:20AM +0000, Chris Wilson wrote: > In order for the objects to be coherent in uncached memory (as they are > presumed to be on the unbound list) we need to clflush them because > experience dictates that the CPU caches will be dirtied across > hibernation. > > Cc: stable@vger.kernel.org > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> I think this change will freak out Jesse, since it'll kill resume time when we clflush a few GB of memory. So could you throw another patch on top of this series (maybe after the unbound dropping) which calls restore_gtt only when thawing from hibernate, but not when resuming? > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > index bdaca3f..368c821 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > @@ -404,6 +404,9 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev) > i915_gem_gtt_bind_object(obj, obj->cache_level); > } > > + list_for_each_entry(obj, &dev_priv->mm.unbound_list, gtt_list) > + i915_gem_clflush_object(obj); > + > i915_gem_chipset_flush(dev); > } > > -- > 1.7.10.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index bdaca3f..368c821 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -404,6 +404,9 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev) i915_gem_gtt_bind_object(obj, obj->cache_level); } + list_for_each_entry(obj, &dev_priv->mm.unbound_list, gtt_list) + i915_gem_clflush_object(obj); + i915_gem_chipset_flush(dev); }
In order for the objects to be coherent in uncached memory (as they are presumed to be on the unbound list) we need to clflush them because experience dictates that the CPU caches will be dirtied across hibernation. Cc: stable@vger.kernel.org Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +++ 1 file changed, 3 insertions(+)