[Intel-gfx] [PATCH] drm/i915: Always convert incoming exec offsets to non-canonical

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 7 20:42:01 UTC 2017


On Tue, Feb 07, 2017 at 08:55:59PM +0100, Michał Winiarski wrote:
> We're using non-canonical addresses in drm_mm, and we're making sure that
> userspace is using canonical addressing - both in case of softpin
> (verifying incoming offset) and when relocating (converting to canonical
> when updating offset returned to userspace).
> Unfortunately when considering the need for relocations, we're comparing
> offset from userspace (in canonical form) with drm_mm node (in
> non-canonical form), and as a result, we end up always relocating if our
> offsets are in the "problematic" range.
> Let's always convert the offsets to avoid the performance impact of
> relocations.
> 
> Fixes: a5f0edf63bdf ("drm/i915: Avoid writing relocs with addresses in non-canonical form")
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry at intel.com>
> Reported-by: Michał Pyrzowski <michal.pyrzowski at intel.com>
> Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>

Matches what I have in my tree. Continual hint for review.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list