[igt-dev] [PATCH i-g-t] i915: Mark up a few more tests that only target GGTT

Antonio Argenziano antonio.argenziano at intel.com
Tue Nov 12 18:23:31 UTC 2019



On 12/11/19 10:21, Chris Wilson wrote:
> Quoting Antonio Argenziano (2019-11-12 18:17:41)
>>
>>
>> On 12/11/19 07:47, Chris Wilson wrote:
>>> If a test is only targeting the GGTT API and its corner cases, it can
>>> only run if we have a mappable aperture.
>>>
>>> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>>> Cc: Antonio Argenziano <antonio.argenziano at intel.com>
>>> ---
>>>    lib/i915/gem_mman.c             | 19 +++++++++++++++++++
>>>    lib/i915/gem_mman.h             |  3 +++
>>>    tests/i915/gem_gtt_cpu_tlb.c    |  1 +
>>>    tests/i915/gem_gtt_hog.c        |  1 +
>>>    tests/i915/gem_gtt_speed.c      |  2 ++
>>>    tests/i915/gem_mmap_gtt.c       |  5 +----
>>>    tests/i915/gem_tiled_swapping.c |  1 +
>>>    7 files changed, 28 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/lib/i915/gem_mman.c b/lib/i915/gem_mman.c
>>> index 3cf9a6bbd..76d0be82e 100644
>>> --- a/lib/i915/gem_mman.c
>>> +++ b/lib/i915/gem_mman.c
>>> @@ -252,3 +252,22 @@ void *gem_mmap__cpu(int fd, uint32_t handle, uint64_t offset, uint64_t size, uns
>>>        igt_assert(ptr);
>>>        return ptr;
>>>    }
>>> +
>>> +bool gem_has_ggtt(int i915)
>>
>> nit: I would put mapping or map or something in the name to make it
>> clear that the mapping is not accessible but, your call :).
> 
> I could go with has_ggtt_aperture()? Or has_mappable_ggtt()?
> Both have their merits. Leaning towards has_mappable_ggtt.

+1 has_mappable_ggtt.

> -Chris
> 


More information about the igt-dev mailing list