diff mbox

Possible i915 regression with 4.4-rc

Message ID 20151204121640.GL27216@nuc-i3427.alporthouse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Dec. 4, 2015, 12:16 p.m. UTC
On Fri, Dec 04, 2015 at 12:06:59PM +0000, Chris Wilson wrote:
> > Could also be down to certain objects getting their contents
> > discarded when evicted (due to not being marked dirty), for which I
> > posted a fix "Always mark GEM objects as dirty when written by the
> > CPU" a few days ago?
> 
> Grasping at straws?

On reflection, rather than the object->dirty patch, you want

-Chris

Comments

Chris Wilson Dec. 4, 2015, 12:45 p.m. UTC | #1
On Fri, Dec 04, 2015 at 12:16:40PM +0000, Chris Wilson wrote:
> On Fri, Dec 04, 2015 at 12:06:59PM +0000, Chris Wilson wrote:
> > > Could also be down to certain objects getting their contents
> > > discarded when evicted (due to not being marked dirty), for which I
> > > posted a fix "Always mark GEM objects as dirty when written by the
> > > CPU" a few days ago?
> > 
> > Grasping at straws?
> 
> On reflection, rather than the object->dirty patch, you want
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem
> _gtt.c
> index 1f7e6b9df45d..033df035a066 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -346,6 +346,7 @@ static void cleanup_page_dma(struct drm_device *dev, struct 
> i915_page_dma *p)
>  
>  static void *kmap_page_dma(struct i915_page_dma *p)
>  {
> +       set_page_dirty(p->page);
>         return kmap_atomic(p->page);
>  }

Or not? These pages are not swappable and remain allocated, so I would
expect the hibernation process to also make a copy of them and restore
them. Besides we would get outright GPU hangs and massive memory
corruption if the PTE were absent.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem
_gtt.c
index 1f7e6b9df45d..033df035a066 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -346,6 +346,7 @@  static void cleanup_page_dma(struct drm_device *dev, struct 
i915_page_dma *p)
 
 static void *kmap_page_dma(struct i915_page_dma *p)
 {
+       set_page_dirty(p->page);
        return kmap_atomic(p->page);
 }