From: Laurent Vivier Date: Wed, 5 Apr 2017 08:09:15 +0000 (+0200) Subject: drm: virtio: fix virtio_gpu_cursor_formats X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99748ab64fcc857837acfd754b530487a490edb5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Link: http://patchwork.freedesktop.org/patch/msgid/20170405080915.823-1-lvivier@redhat.com Signed-off-by: Gerd Hoffmann --- 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)