[Mesa-dev] [PATCH 4/4] intel/sanitize_gpu: add debug message on mmap fail

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Oct 29 18:14:47 UTC 2018


Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/intel/tools/intel_sanitize_gpu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/intel/tools/intel_sanitize_gpu.c b/src/intel/tools/intel_sanitize_gpu.c
index 4f1a2d2ead5..8f4f2ff8ec6 100644
--- a/src/intel/tools/intel_sanitize_gpu.c
+++ b/src/intel/tools/intel_sanitize_gpu.c
@@ -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,
-- 
2.19.1



More information about the mesa-dev mailing list