aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-02-08 13:56:51 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-02-08 13:56:51 +0100
commit4bda12f56b59459f84d5ea7dabb3647dc9e0023b (patch)
tree4bc54293121f77f6dc64e1c4e085e8af327610eb
parenta51f16a108c083eacc216b1c7f4e67c7245189ae (diff)
downloaddrminfo-4bda12f56b59459f84d5ea7dabb3647dc9e0023b.tar.gz
virtio fixes
-rw-r--r--virtiotest.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/virtiotest.c b/virtiotest.c
index 1c35655..90e2134 100644
--- a/virtiotest.c
+++ b/virtiotest.c
@@ -112,10 +112,15 @@ static void virtio_init_fb(void)
/* create framebuffer */
memset(&create, 0, sizeof(create));
- create.target = 2; /* ??? */
create.format = fmt->virtio;
create.width = mode->hdisplay;
create.height = mode->vdisplay;
+
+ create.target = 2; /* ??? */
+ create.bind = (1 << 1); /* ??? */
+ create.depth = 1;
+ create.array_size = 1;
+
stride = create.width * fmt->bpp / 8;
create.size = stride * create.height;
rc = drmIoctl(fd, DRM_IOCTL_VIRTGPU_RESOURCE_CREATE, &create);
@@ -193,6 +198,7 @@ static void virtio_transfer(void)
xfer.bo_handle = create.bo_handle;
xfer.box.w = mode->hdisplay;
xfer.box.h = mode->vdisplay;
+ xfer.box.d = 1;
rc = drmIoctl(fd, DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST, &xfer);
if (rc < 0) {
fprintf(stderr, "DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST: %s\n",