[Intel-gfx] [PATCH v2] drm/i915: Avoid writing relocs with addresses in non-canonical form

Winiarski, Michal michal.winiarski at intel.com
Fri Dec 4 09:41:11 PST 2015


On Fri, 2015-12-04 at 17:18 +0100, Daniel Vetter wrote:
> On Fri, Dec 04, 2015 at 04:20:43PM +0100, Michał Winiarski wrote:
> > According to bspec, some parts of HW expect the addresses to be in
> > a canonical form, where bits [63:48] == [47]. Let's convert
> > addresses to
> > canonical form prior to relocating and return converted offsets to
> > userspace.
> > 
> > v2: Whitespace fixup, gen8_canonical_addr description (Chris,
> > Ville)
> > 
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Michel Thierry <michel.thierry at intel.com>
> > Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
> 
> Can we igt this? Maybe with softpin or whatever ... For cpu address
> space
> negative addresses are for the kernel, but I think on the gpu we can
> do
> them.

Yup - would definitely be useful, I can add something to one of the
existing reloc tests, but without softpin it's tricky to cover this in
a reliable way (not to mention corner cases).

-Michał

> -Daniel
> 
> > ---
> >  drivers/gpu/drm/i915/i915_gem_execbuffer.c |  8 +++++---
> >  drivers/gpu/drm/i915/i915_gem_gtt.h        | 12 ++++++++++++
> >  2 files changed, 17 insertions(+), 3 deletions(-)


More information about the Intel-gfx mailing list