Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F173790727
D60085.id187860.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
876 B
Referenced Files
None
Subscribers
None
D60085.id187860.diff
View Options
diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c
--- a/sys/dev/virtio/gpu/virtio_gpu.c
+++ b/sys/dev/virtio/gpu/virtio_gpu.c
@@ -61,6 +61,12 @@
/* The guest can allocate resource IDs, we only need one */
#define VTGPU_RESOURCE_ID 1
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define VTGPU_FORMAT VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM
+#else
+#define VTGPU_FORMAT VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM
+#endif
+
struct vtgpu_softc {
/* Must be first so we can cast from info -> softc */
struct fb_info vtgpu_fb_info;
@@ -556,7 +562,7 @@
atomic_fetchadd_64(&sc->vtgpu_next_fence, 1));
s.req.resource_id = htole32(VTGPU_RESOURCE_ID);
- s.req.format = htole32(VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM);
+ s.req.format = htole32(VTGPU_FORMAT);
s.req.width = htole32(sc->vtgpu_fb_info.fb_width);
s.req.height = htole32(sc->vtgpu_fb_info.fb_height);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 29, 11:00 AM (13 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39869132
Default Alt Text
D60085.id187860.diff (876 B)
Attached To
Mode
D60085: virtio_gpu: use an X8R8G8B8 resource on big-endian guests
Attached
Detach File
Event Timeline
Log In to Comment