[Intel-gfx] [PATCH 1/2] drm/i915: Check for scratch page scribbling
Chris Wilson
chris at chris-wilson.co.uk
Wed Feb 10 11:09:47 UTC 2021
Quoting Mika Kuoppala (2021-02-10 10:49:55)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c
> > index d34770ae4c9a..5ac9eb4a3a92 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_gtt.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
> > @@ -158,10 +158,49 @@ static void poison_scratch_page(struct drm_i915_gem_object *scratch)
> >
> > vaddr = kmap(page);
> > memset(vaddr, val, PAGE_SIZE);
> > + set_page_dirty(page); /* keep the poisoned contents */
>
> Should we use locked version in here?
We don't hold the page-lock here, so no. If this is not an anonymous
page, something is very wrong :p
-Chris
More information about the Intel-gfx
mailing list