Skip to content
  • Joonas Lahtinen's avatar
    tests/gem_mmap_gtt: add huge BO test · e371b3fb
    Joonas Lahtinen authored
    
    
    Add a straightforward test that allocates a BO that is bigger than
    (by 1 page currently) the mappable aperture, tests mmap access to it
    by CPU directly and through GTT in sequence.
    
    Currently it is expected for the GTT access to gracefully fail as
    all objects are attempted to get pinned to GTT completely for mmap
    access. Once the partial view support is merged to kernel, the test
    should pass for all parts.
    
    v2:
    - Corrected BO domain handling (Chris Wilson)
    - Check again after GTT access for added paranoia (Chris Wilson)
    
    v3:
    - Avoid flush by using pread (Chris Wilson)
    - Free gtt_pattern buffer too.
    
    v4:
    - Add more comments (Tvrtko Ursulin)
    - Use igt_require (Tvrtko Ursulin)
    
    v5:
    - Remove wrong message from igt_require_f (Tvrtko Ursulin)
    - After digging deeper to it, just igt_assert that the CPU
      mapping needs to succeed.
    
    Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    [Thomas: remove unused label]
    Signed-off-by: default avatarThomas Wood <thomas.wood@intel.com>
    e371b3fb