SUMMARY This adds a wrapper for the DRM_IOCTL_I915_GEM_MMAP ioctl, which creates a mapping for a DRM buffer object in the client's address space. STEPS TO REPRODUCE 1. Run an OpenGL application with direct rendering enabled on an Intel GPU under valgrind OBSERVED RESULT Memory accesses to command and texture buffers are flagged as errors EXPECTED RESULT Command buffers can be written normally SOFTWARE/OS VERSIONS Linux: 4.19.37 ADDITIONAL INFORMATION There are two versions of this ioctl that are distinguished by different argument sizes.
Created attachment 123298 [details] Patch to update ioctl argument definition
Created attachment 123299 [details] Patch to handle ioctl
Created attachment 123300 [details] Patch to handle legacy ioctl
Committed as 57296eee72a6de284a9dee0864ffced884c3f350 (all 3 patches). Thanks for the patches.