virgl/gbm: exported read/writable buffers
With old DRM implementations, drmPrimeHandleToFD always returned a fd that could be mapped read/write. However, new kernels require the DRM_RDWR flag to be specified to create read/write mappings.
Try passing the DRM_RDWR flag but fall back to the old way if that fails.
Signed-off-by: David Stevens stevensd@chromium.org
Edited by David Stevens