[igt-dev] [RFC PATCH i-g-t v2 1/2] lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 21 14:18:44 UTC 2020


Quoting Janusz Krzysztofik (2020-02-21 11:17:00)
> Commit b0da8bb705c0 ("lib/i915: for_each_mmap_offset_type()")
> introduced a macro that makes it easy to repeat a test body within a
> loop for each mmap-offset mapping type supported by v4 of i915 MMAP_GTT
> API. However, when run on an older version of the driver, those
> subtests are believed to be still repeated for each known mmap-offset
> mapping type while effectively exercising GTT mapping type only.  As
> that may be confusing, fix it.
> 
> It has been assumed that the modified macro is still suitable for use
> inside gem_mmap_offset test itself.  Would that not be case,
> gem_mmap_offset could redefine the macro back to its initial form for
> internal use.
> 
> v2: Move extra condition to a separate function and call it via
>     for_each_if(), in case we need to fix it again in future (Chris)
> v3: Fix blind copy-paste
> 
> Suggested-by: Michał Winiarski <michal.winiarski at intel.com>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
[I was just waiting for the previous send to hit the shards as I was too
lazy to check myself]
-Chris


More information about the igt-dev mailing list