提交 99748ab6 编写于 作者: L Laurent Vivier 提交者: Gerd Hoffmann

drm: virtio: fix virtio_gpu_cursor_formats

When we use virtio-vga with a big-endian guest,
the mouse pointer disappears.

To fix that, on big-endian use DRM_FORMAT_BGRA8888
instead of DRM_FORMAT_ARGB8888.
Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170405080915.823-1-lvivier@redhat.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 f40d6560
...@@ -39,7 +39,11 @@ static const uint32_t virtio_gpu_formats[] = { ...@@ -39,7 +39,11 @@ static const uint32_t virtio_gpu_formats[] = {
}; };
static const uint32_t virtio_gpu_cursor_formats[] = { static const uint32_t virtio_gpu_cursor_formats[] = {
#ifdef __BIG_ENDIAN
DRM_FORMAT_BGRA8888,
#else
DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB8888,
#endif
}; };
uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc) uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册