minigbm: virtio_gpu: use resource create ioctl for rendering

In the virtio_gpu kernel driver, there is a flag for each BO indicating
if the buffer was made with the dumb buffer create ioctl. If that flag
is set, the kernel will request a transfer to host on page flip, even if
the dumb buffer is used in host side rendering. In the case of host side
rendering, the transfer will wipe out the rendering because the transfer
copies from guest side backing memory which was never used.

To prevent that issue, the virtgpu resource create ioctl is used to
prevent the dumb flag from being set. Simple mmap'ed framebuffers will
not display properly unless they use gbm's mmap/munmap which includes a
transfer to/from the host on mmap/munmap with this change.

TEST=null_platform_test;
     mmap_test -g renders correctly but we get ENOSYS
     (function not implemented) from DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST.
     (DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST succeeds though)

That'll have to be fixed ..
BUG=None

Change-Id: Id36080f597efd00a96e625ee4301ebf26d9f19af
Reviewed-on: https://chromium-review.googlesource.com/701354
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
diff --git a/presubmit.sh b/presubmit.sh
index 6d55f2a..1cfc59c 100755
--- a/presubmit.sh
+++ b/presubmit.sh
@@ -4,5 +4,5 @@
 # found in the LICENSE file.
 find \
 	'(' -name '*.[ch]' -or -name '*.cc' ')' \
-	-not -name 'gbm.h' \
+	-not -name 'gbm.h' -not -name 'virgl_hw.h' \
 	-exec clang-format -style=file -i {} +