mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
vhost-user-gpu: use an extandable state enum for commands
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> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210204105232.834642-4-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
1f83ea8dbd
commit
72e631c6ac
3 changed files with 12 additions and 6 deletions
|
@ -129,12 +129,18 @@ typedef struct VuGpu {
|
|||
QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq;
|
||||
} VuGpu;
|
||||
|
||||
enum {
|
||||
VG_CMD_STATE_NEW,
|
||||
VG_CMD_STATE_PENDING,
|
||||
VG_CMD_STATE_FINISHED,
|
||||
};
|
||||
|
||||
struct virtio_gpu_ctrl_command {
|
||||
VuVirtqElement elem;
|
||||
VuVirtq *vq;
|
||||
struct virtio_gpu_ctrl_hdr cmd_hdr;
|
||||
uint32_t error;
|
||||
bool finished;
|
||||
int state;
|
||||
QTAILQ_ENTRY(virtio_gpu_ctrl_command) next;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue