intel/sanitize_gpu: add debug message on mmap fail
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 29 Oct 2018 18:14:47 +0000 (18:14 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 5 Nov 2018 15:45:08 +0000 (15:45 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/intel/tools/intel_sanitize_gpu.c

index 4f1a2d2ead58eb393d603f414f9acd8e9baa916d..8f4f2ff8ec6295e9505aefd52362620eea0dec6b 100644 (file)
@@ -226,8 +226,10 @@ create_with_padding(int fd, struct drm_i915_gem_create *create)
    };
 
    ret = libc_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap_arg);
-   if (ret != 0)
+   if (ret != 0) {
+      intel_logd("Unable to map buffer %d for pad creation.\n", create->handle);
       return 0;
+   }
 
    noise_values = (uint8_t*) (uintptr_t) mmap_arg.addr_ptr;
    fill_noise_buffer(noise_values, create->handle & 0xFF,