[Intel-gfx] [PATCH] drm/i915/gt: Poison GTT scratch pages
Chris Wilson
chris at chris-wilson.co.uk
Thu Jan 23 09:55:07 UTC 2020
Quoting Matthew Auld (2020-01-23 09:38:02)
> On Thu, 23 Jan 2020 at 08:51, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> >
> > Using a clear page for scratch means that we have relatively benign
> > errors in case it is accidentally used, but that can be rather too
> > benign for debugging. If we poison the scratch, ideally it quickly
> > results in an obvious error.
> >
> > Suggested-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
>
> [snip]
>
> >
> > +static void poison_scratch_page(struct page *page, unsigned long size)
> > +{
> > + if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
> > + return;
> > +
> > + kunmap_atomic(memset(kmap_atomic(page), POISON_FREE, size));
>
> kmap works for !order-zero?
Definitely works if not highmem :)
But needs a page by page approach just in case, fine.
-Chris
More information about the Intel-gfx
mailing list