Hi On Thu, Oct 16, 2014 at 3:39 PM, Cheng, Yao <yao.cheng at intel.com> wrote: > Accepted :) I will update the patch to implement the mmap interface and > remove the legacy MMAP_IOCTL. > BTW I didn't see a field to get mmap_offset in struct drm_gem_open, I guess > something like a new "GET_MMAP_OFFSET_IOCTL" need be added to support > mapping flinked/primed BO, is it?
Yes. There is currently no generic interface to get mmap offsets for any gem bo (because some of them may not be mapped from user-space or require extra parameters). So, either support dumb-buffers (if you don't need any advanced parameters like tiling or cache constraints), or add an MMAP_OFFSET_IOCTL like you proposed (and most drivers do so). Thanks David