qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 1/8] vhost-user: add vhost_user_gpu_set_socke


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v7 1/8] vhost-user: add vhost_user_gpu_set_socket()
Date: Tue, 14 May 2019 13:20:31 +0200

Hi

On Tue, May 14, 2019 at 7:38 AM Gerd Hoffmann <address@hidden> wrote:
>
>   Hi,
>
> > +VhostUserGpuCursorUpdate
> > +^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > ++-----+-------+-------+--------+
> > +| pos | hot_x | hot_y | cursor |
> > ++-----+-------+-------+--------+
> > +
> > +:pos: a ``VhostUserGpuCursorPos``, the cursor location
> > +
> > +:hot_x/hot_y: ``u32``, the cursor hot location
> > +
> > +:cursor: ``[u32; 64 * 64]``, 64x64 RGBA cursor data
>
> Should clarify here what exactly RGBA is. (PIXMAN_a8r8g8b8 I guess).

ok

>
> > +VhostUserGpuUpdate
> > +^^^^^^^^^^^^^^^^^^
> > +
> > ++------------+---+---+---+---+------+
> > +| scanout-id | x | y | w | h | data |
> > ++------------+---+---+---+---+------+
> > +
> > +:scanout-id: ``u32``, the scanout content to update
> > +
> > +:x/y/w/h: ``u32``, region of the update
> > +
> > +:data: RGBA data (the size is computed based on the region size, and
> > +       the request type)
>
> Likewise.  Also: alpha channel for the framebuffer?

It is actually PIXMAN_x8r8g8b8, fixed

>
> > +C structure
> > +-----------
> > +
> > +In QEMU the vhost-user-gpu message is implemented with the following 
> > struct:
> > +
> > +.. code:: c
> > +
> > +  typedef struct VhostUserGpuMsg {
> > +      uint32_t request; /* VhostUserGpuRequest */
> > +      uint32_t flags;
> > +      uint32_t size; /* the following payload size */
>
> uint32_t padding;
>
> > +      union {
> > +          VhostUserGpuCursorPos cursor_pos;
> > +          VhostUserGpuCursorUpdate cursor_update;
> > +          VhostUserGpuScanout scanout;
> > +          VhostUserGpuUpdate update;
> > +          VhostUserGpuDMABUFScanout dmabuf_scanout;
> > +          struct virtio_gpu_resp_display_info display_info;
> > +          uint64_t u64;
>
> ... so this 64bit value will be aligned.

vhost-user didn't bother. Should we?


-- 
Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]