On Wed, 2017-09-13 at 11:53 -0400, Farhan Ali wrote:
>
> On 09/13/2017 04:13 AM, Gerd Hoffmann wrote:
> > Please move this to a helper function, maybe by updating the
> > VIRTIO_GPU_FILL_CMD macro.
> >
> > The header fields should be byteswapped too. As most structs have
> > 32bit fields only
On 09/13/2017 04:13 AM, Gerd Hoffmann wrote:
Please move this to a helper function, maybe by updating the
VIRTIO_GPU_FILL_CMD macro.
The header fields should be byteswapped too. As most structs have
32bit fields only (with the exception of hdr.fence_id) you should be
able to create a generic
Hi,
> @@ -287,6 +287,12 @@ static void
> virtio_gpu_resource_create_2d(VirtIOGPU *g,
> struct virtio_gpu_resource_create_2d c2d;
>
> VIRTIO_GPU_FILL_CMD(c2d);
> +
> +c2d.resource_id = le32_to_cpu(c2d.resource_id);
> +c2d.format = le32_to_cpu(c2d.format);
> +c2d.width =
Virtio GPU code currently only supports litte endian format,
and so using the Virtio GPU device on a big endian machine
does not work.
Let's fix it by supporting the correct host cpu byte order.
Signed-off-by: Farhan Ali
---
hw/display/virtio-gpu.c | 53