Skip to content
  • Chris Wilson's avatar
    igt/gem_userptr: Check read-only mappings · caea9c5b
    Chris Wilson authored
    
    
    Setup a userptr object that only has a read-only mapping back to a file
    store (memfd). Then attempt to write into that mapping using the GPU and
    assert that those writes do not land (while also writing via a writable
    userptr mapping into the same memfd to verify that the GPU is working!)
    
    v2: Pull the random batch construction into a routine to avoid
    duplication.
    
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    caea9c5b