public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH] drm: virtio: fix virtio_gpu_cursor_formats
@ 2017-04-05  8:09 Laurent Vivier
  2017-04-05 17:11 ` Ville Syrjälä
       [not found] ` <20170405171125.GT30290@intel.com>
  0 siblings, 2 replies; 12+ messages in thread
From: Laurent Vivier @ 2017-04-05  8:09 UTC (permalink / raw)
  To: dri-devel; +Cc: David Airlie, virtualization

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>
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 11288ff..3ed7174 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
 };
 
 static void virtio_gpu_plane_destroy(struct drm_plane *plane)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-04-07 12:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05  8:09 [PATCH] drm: virtio: fix virtio_gpu_cursor_formats Laurent Vivier
2017-04-05 17:11 ` Ville Syrjälä
     [not found] ` <20170405171125.GT30290@intel.com>
2017-04-06  7:20   ` Laurent Vivier
2017-04-06  8:25   ` Daniel Vetter
2017-04-06  8:29   ` DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats) Gerd Hoffmann
2017-04-06 17:27     ` Ville Syrjälä
2017-04-06 17:35       ` Ville Syrjälä
2017-04-07  8:13       ` Gerd Hoffmann
     [not found]       ` <20170406173514.GC30290@intel.com>
2017-04-07  8:29         ` Gerd Hoffmann
     [not found]         ` <1491553740.26308.26.camel@redhat.com>
2017-04-07  8:45           ` Ville Syrjälä
2017-04-07 10:06             ` Gerd Hoffmann
     [not found]             ` <1491559586.26308.39.camel@redhat.com>
2017-04-07 12:49               ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox