[PATCH v1 1/3] hw/display/virtio-gpu.c: use reset_bh class method

Manos Pitsidianakis posted 3 patches 10 months ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
There is a newer version of this series
[PATCH v1 1/3] hw/display/virtio-gpu.c: use reset_bh class method
Posted by Manos Pitsidianakis 10 months ago
While the VirtioGPU type has a reset_bh field to specify a reset
callback, it's never used. virtio_gpu_reset() calls the general
virtio_gpu_reset_bh() function for all devices that inherit from
VirtioGPU.

While no devices override reset_bh at the moment, a device reset might
require special logic for implementations in the future.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/display/virtio-gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index f8a675eb30..2b73ae585b 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1515,7 +1515,7 @@ void virtio_gpu_reset(VirtIODevice *vdev)
             qemu_cond_wait_bql(&g->reset_cond);
         }
     } else {
-        virtio_gpu_reset_bh(g);
+        aio_bh_call(g->reset_bh);
     }
 
     while (!QTAILQ_EMPTY(&g->cmdq)) {
-- 
γαῖα πυρί μιχθήτω


Re: [PATCH v1 1/3] hw/display/virtio-gpu.c: use reset_bh class method
Posted by Marc-André Lureau 10 months ago
On Fri, Jan 26, 2024 at 7:43 PM Manos Pitsidianakis
<manos.pitsidianakis@linaro.org> wrote:
>
> While the VirtioGPU type has a reset_bh field to specify a reset
> callback, it's never used. virtio_gpu_reset() calls the general
> virtio_gpu_reset_bh() function for all devices that inherit from
> VirtioGPU.
>
> While no devices override reset_bh at the moment, a device reset might
> require special logic for implementations in the future.
>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  hw/display/virtio-gpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index f8a675eb30..2b73ae585b 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1515,7 +1515,7 @@ void virtio_gpu_reset(VirtIODevice *vdev)
>              qemu_cond_wait_bql(&g->reset_cond);
>          }
>      } else {
> -        virtio_gpu_reset_bh(g);
> +        aio_bh_call(g->reset_bh);
>      }
>
>      while (!QTAILQ_EMPTY(&g->cmdq)) {
> --
> γαῖα πυρί μιχθήτω
>
>


-- 
Marc-André Lureau