diff options
author | Laurent Vivier <lvivier@redhat.com> | 2017-04-05 11:09:15 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-06 16:23:57 +0300 |
commit | 99748ab64fcc857837acfd754b530487a490edb5 (patch) | |
tree | 43c0763e7556e10f8b4cc532da8700efebb4acff /drivers/gpu/drm/virtio | |
parent | f40d6560eba65b2a2b84805d2927fed96978669a (diff) | |
download | linux-99748ab64fcc857837acfd754b530487a490edb5.tar.xz |
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: Laurent Vivier <lvivier@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170405080915.823-1-lvivier@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_plane.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index 372c91cc8533..adcdbd0abef6 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -39,7 +39,11 @@ static const uint32_t virtio_gpu_formats[] = { }; static const uint32_t virtio_gpu_cursor_formats[] = { +#ifdef __BIG_ENDIAN + DRM_FORMAT_BGRA8888, +#else DRM_FORMAT_ARGB8888, +#endif }; uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc) |