[PATCH] drm/virtio: Use XRGB8888 also for big endian systems

Jocelyn Falempe jfalempe at redhat.com
Mon Aug 19 18:29:52 UTC 2024


On 19/08/2024 17:58, Javier Martinez Canillas wrote:
> Jocelyn Falempe <jfalempe at redhat.com> writes:
> 
> Helo Jocelyn,
> 
> AFAICT your patch is doing two things:
> 
>> Mesa doesn't support BGRX8888, that means most wayland compositors
>> doesn't work on big endian guests.
>>
> 
> 1) Dropping the BGR{A,X}8888 support.
> 
>> Also the colors are inverted when testing a s390x VM on a s390x host.
>> So I fixed the DRM_FORMAT -> VIRTIO_GPU_FORMAT on big endian guests.
>> It may break big-endian guest on little-endian host, but then the
>> fix should be in qemu, because we don't know the host endianess in
>> the guest VM.
>>
> 
> 2) Fix the format translation to take into account the guest endianess.
> 
> Maybe is better to split the changes in two separate patches ?

Yes, I will send a v2 with 2 patches, that would be better.
> 
>> Signed-off-by: Jocelyn Falempe <jfalempe at redhat.com>
>> ---
> 
> The patch makes sense to me though from your explanations.
> 
> Acked-by: Javier Martinez Canillas <javierm at redhat.com>
> 

Thanks for the review.

-- 

Jocelyn



More information about the dri-devel mailing list