From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: kraxel@redhat.com
Subject: Re: [PATCH v2 03/20] vhost-user-gpu: use an extandable state enum for commands
Date: Thu, 4 Feb 2021 14:43:19 +0100 [thread overview]
Message-ID: <c3ae91d7-5f39-b706-12e2-4e0bbc46e143@redhat.com> (raw)
In-Reply-To: <b820bcfc-4e98-8a33-23ab-f76548443a51@redhat.com>
On 2/4/21 12:26 PM, Philippe Mathieu-Daudé wrote:
> On 2/4/21 11:52 AM, marcandre.lureau@redhat.com wrote:
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> Introduce a pending state for commands which aren't finished yet, but
>> are being handled. See following patch.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>> contrib/vhost-user-gpu/vugpu.h | 8 +++++++-
>> contrib/vhost-user-gpu/vhost-user-gpu.c | 8 ++++----
>> contrib/vhost-user-gpu/virgl.c | 2 +-
>> 3 files changed, 12 insertions(+), 6 deletions(-)
>>
>> diff --git a/contrib/vhost-user-gpu/vugpu.h b/contrib/vhost-user-gpu/vugpu.h
>> index 86f3ac86aa..04d5615812 100644
>> --- a/contrib/vhost-user-gpu/vugpu.h
>> +++ b/contrib/vhost-user-gpu/vugpu.h
>> @@ -129,12 +129,18 @@ typedef struct VuGpu {
>> QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq;
>> } VuGpu;
>>
>> +enum {
>> + VG_CMD_STATE_NEW,
>
> Maybe VG_CMD_STATE_STARTING?
>
>> + VG_CMD_STATE_PENDING,
>
> Maybe introduce VG_CMD_STATE_PENDING in the
> patch using it.
>
>> + VG_CMD_STATE_FINISHED,
>> +};
>
> Can we use a typedef ...
>
>> +
>> struct virtio_gpu_ctrl_command {
>> VuVirtqElement elem;
>> VuVirtq *vq;
>> struct virtio_gpu_ctrl_hdr cmd_hdr;
>> uint32_t error;
>> - bool finished;
>> + int state;
>
> ... and use it here?
>
> Or directly declare in place:
>
> enum {
> VG_CMD_STATE_STARTING,
> VG_CMD_STATE_PENDING,
> VG_CMD_STATE_FINISHED,
> } state;
>
>> QTAILQ_ENTRY(virtio_gpu_ctrl_command) next;
>> };
>>
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Since Gerd was willing to queue v1, feel free to ignore my
comments at this point. R-b stands.
next prev parent reply other threads:[~2021-02-04 13:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 10:52 [PATCH v2 00/20] Various vhost-user-gpu & UI fixes marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 01/20] vhost-user-gpu: check backend for EDID support marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 02/20] vhost-user-gpu: handle vhost-user-gpu features in a callback marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 03/20] vhost-user-gpu: use an extandable state enum for commands marcandre.lureau
2021-02-04 11:26 ` Philippe Mathieu-Daudé
2021-02-04 13:43 ` Philippe Mathieu-Daudé [this message]
2021-02-04 10:52 ` [PATCH v2 04/20] vhost-user-gpu: handle display-info in a callback marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 05/20] ui: remove extra #ifdef CONFIG_OPENGL marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 06/20] ui: remove gl_ctx_get_current marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 07/20] ui: add gd_gl_area_scanout_disable marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 08/20] ui: annotate DCLOps callback requirements marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 09/20] ui: remove console_has_gl_dmabuf() marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 10/20] vhost-user-gpu: add a configuration flag for dmabuf usage marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 11/20] ui: add an optional get_flags callback to GraphicHwOps marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 12/20] ui: add a DCLOps callback to check dmabuf support marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 13/20] ui: check hw requirements during DCL registration marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 14/20] ui: add qemu_egl_has_dmabuf helper marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 15/20] ui: check gtk-egl dmabuf support marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 16/20] ui: add egl dmabuf import to gtkglarea marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 17/20] virtio-gpu: avoid re-entering cmdq processing marcandre.lureau
2021-02-05 8:09 ` Alexander Bulekov
2021-02-04 10:52 ` [PATCH v2 18/20] display/ui: add a callback to indicate GL state is flushed marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 19/20] chardev: check if the chardev is registered for yanking marcandre.lureau
2021-02-04 10:52 ` [PATCH v2 20/20] tests: add some virtio-gpu & vhost-user-gpu acceptance test marcandre.lureau
2021-02-16 16:34 ` Alex Bennée
2021-02-16 17:43 ` Cleber Rosa
2021-02-17 8:27 ` Marc-André Lureau
2021-02-17 12:12 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3ae91d7-5f39-b706-12e2-4e0bbc46e143@redhat.com \
--to=philmd@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).