Re: [PATCH 3/5] update virtio gpu driver: add 3d/virgl support

From
Dave Airlie <airlied@gmail.com>
Date
2015-09-10 10:32:32
Also in
dri-devel
Reply to
Emil Velikov, 2015-09-10
quoted
--- /dev/null
+++ b/include/uapi/drm/virtgpu_drm.h
@@ -0,0 +1,163 @@
quoted
+
+struct drm_virtgpu_3d_box {
+       uint32_t x, y, z;
+       uint32_t w, h, d;
+};
+
There was a similar case (multiple variables declared on a single
line) in drm core that caused confusion and we broke the 32bit compat.
I thought I mention it - not advocating for/against the above declaration.

probably should put some newlines alright,
quoted
+struct drm_virtgpu_3d_transfer_to_host {
+       uint32_t bo_handle;
+       struct drm_virtgpu_3d_box box;
+       uint32_t level;
+       uint32_t offset;
+};
+
+struct drm_virtgpu_3d_transfer_from_host {
+       uint32_t bo_handle;
+       struct drm_virtgpu_3d_box box;
+       uint32_t level;
+       uint32_t offset;
+};
+
Afaics these seems to be used by the ioctls. If so the current
declarations are not 32bit compat safe. Things will also go badly if
you consider expanding struct drm_virtgpu_3d_box in the distant
future. A u32 pad after bo_handle and a 'pointer' to struct
I'm curious what you think we can add to a 3d box.

So this one is fine, no need to align it either I don't think, though I
should confirm that.

Maybe for safety we can pull the other uint32_t above the box.

Dave.
Thread (5 messages) 5 messages, 3 authors, last reply 2015-09-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help