CHROMIUM: drm/vgem: add DRM_IOCTL_VGEM_MODE_MAP_DUMB for render nodes

DRM_IOCTL_MODE_MAP_DUMB is not allowable for use by render nodes.
However, swrast requires dumb mmaps and uses render nodes for security
reasons. This patch adds DRM_IOCTL_VGEM_MODE_MAP_DUMB, which behaves
exactly the same as DRM_IOCTL_MODE_MAP_DUMB by calling the exact same
DRM function, but the VGEM version only works with VGEM and allows
render nodes to call it.

This patch also enables render node creation for VGEM.

BUG=chromium:469666
TEST=check that VGEM has a render node under /dev/dri

Change-Id: I8ca23c8664f89296d819a94ef3df0038ded0c4f5
Signed-off-by: Zach Reizner <zachr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/263990
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2 files changed