i915: Fall back to GEM_MMAP_GTT if GEM_MMAP fails
DRM_IOCTL_I915_GEM_MMAP mmaps the underlying shm file and returns a
user space address directly, ie, doesn't go through mmap. If we try
that on a dma-buf that doesn't have a shm file, i915.ko returns ENXIO.
Fall through to DRM_IOCTL_I915_GEM_MMAP_GTT in that case, which will
mmap on the drm fd instead.
BUG=b:167236452
TEST=dmabuf_test from drm-tests passes
Change-Id: I41cd0b0150d2d489bd055e23f4495cd13624b831
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2561378
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
1 file changed