Re: DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)

2017-04-07 Thread Ville Syrjälä
On Fri, Apr 07, 2017 at 12:06:26PM +0200, Gerd Hoffmann wrote: > On Fr, 2017-04-07 at 11:45 +0300, Ville Syrjälä wrote: > > On Fri, Apr 07, 2017 at 10:29:00AM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > Hmm. Maybe it's still possible to salvage something by redefining the > > > >

Re: DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)

2017-04-07 Thread Gerd Hoffmann
On Fr, 2017-04-07 at 11:45 +0300, Ville Syrjälä wrote: > On Fri, Apr 07, 2017 at 10:29:00AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > Hmm. Maybe it's still possible to salvage something by redefining the > > > BIG_ENDIAN format bit to mean the "the other endianness". Ugly but it > > > might

Re: DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)

2017-04-07 Thread Ville Syrjälä
On Fri, Apr 07, 2017 at 10:29:00AM +0200, Gerd Hoffmann wrote: > Hi, > > > Hmm. Maybe it's still possible to salvage something by redefining the > > BIG_ENDIAN format bit to mean the "the other endianness". Ugly but it > > might still result in something usable. > > Also at least for the

Re: DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)

2017-04-07 Thread Gerd Hoffmann
Hi, > Hmm. Maybe it's still possible to salvage something by redefining the > BIG_ENDIAN format bit to mean the "the other endianness". Ugly but it > might still result in something usable. Also at least for the virtual machine use case this doesn't buy us much. The drm drivers (at least the

Re: DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)

2017-04-07 Thread Gerd Hoffmann
Hi, > > So, bigendian guests assume that DRM_FORMAT_XRGB is big endian not > > little endian. And given that the fourcc codes are used in the > > userspace/kernel API too (see DRM_IOCTL_MODE_ADDFB2) I think we can't > > change that any more ... > > Sigh. That makes mixed endian systems

Re: DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)

2017-04-06 Thread Ville Syrjälä
On Thu, Apr 06, 2017 at 08:27:47PM +0300, Ville Syrjälä wrote: > On Thu, Apr 06, 2017 at 10:29:43AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > static const uint32_t virtio_gpu_cursor_formats[] = { > > > > +#ifdef __BIG_ENDIAN > > > > + DRM_FORMAT_BGRA, > > > > +#else > > > >

Re: DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)

2017-04-06 Thread Ville Syrjälä
On Thu, Apr 06, 2017 at 10:29:43AM +0200, Gerd Hoffmann wrote: > Hi, > > > > static const uint32_t virtio_gpu_cursor_formats[] = { > > > +#ifdef __BIG_ENDIAN > > > + DRM_FORMAT_BGRA, > > > +#else > > > DRM_FORMAT_ARGB, > > > +#endif > > > > DRM formats are supposed to be little

Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats

2017-04-06 Thread Daniel Vetter
On Wed, Apr 05, 2017 at 08:11:25PM +0300, Ville Syrjälä wrote: > On Wed, Apr 05, 2017 at 10:09:15AM +0200, Laurent Vivier wrote: > > When we use virtio-vga with a big-endian guest, > > the mouse pointer disappears. > > > > To fix that, on big-endian use DRM_FORMAT_BGRA > > instead of

Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats

2017-04-06 Thread Laurent Vivier
On 05/04/2017 19:11, Ville Syrjälä wrote: > On Wed, Apr 05, 2017 at 10:09:15AM +0200, Laurent Vivier wrote: >> When we use virtio-vga with a big-endian guest, >> the mouse pointer disappears. >> >> To fix that, on big-endian use DRM_FORMAT_BGRA >> instead of DRM_FORMAT_ARGB. >> >>

Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats

2017-04-05 Thread Ville Syrjälä
On Wed, Apr 05, 2017 at 10:09:15AM +0200, Laurent Vivier wrote: > When we use virtio-vga with a big-endian guest, > the mouse pointer disappears. > > To fix that, on big-endian use DRM_FORMAT_BGRA > instead of DRM_FORMAT_ARGB. > > Signed-off-by: Laurent Vivier > ---

[PATCH] drm: virtio: fix virtio_gpu_cursor_formats

2017-04-05 Thread Laurent Vivier
When we use virtio-vga with a big-endian guest, the mouse pointer disappears. To fix that, on big-endian use DRM_FORMAT_BGRA instead of DRM_FORMAT_ARGB. Signed-off-by: Laurent Vivier --- drivers/gpu/drm/virtio/virtgpu_plane.c | 4 1 file changed, 4