[PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console

dongwon.kim@intel.com posted 3 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240320205018.3351984-1-dongwon.kim@intel.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, "Cédric Le Goater" <clg@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>
There is a newer version of this series
hw/display/virtio-gpu-udmabuf.c | 27 +++++++---------
hw/vfio/display.c               | 35 ++++++++++++---------
include/hw/vfio/vfio-common.h   |  2 +-
include/hw/virtio/virtio-gpu.h  |  2 +-
include/ui/console.h            | 10 ++++++
ui/console.c                    | 55 +++++++++++++++++++++++++++++++++
6 files changed, 98 insertions(+), 33 deletions(-)
[PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console
Posted by dongwon.kim@intel.com 1 month, 1 week ago
From: Dongwon Kim <dongwon.kim@intel.com>

QemuDmaBuf struct is defined and primarily used by ui/console/gl so it is
better to handle its creation, initialization and access within ui/console
rather than within hw modules such as hw/display/virtio-gpu and
hw/vfio/display.

To achieve this, new methods for allocating, initializing the struct, and
accessing certain fields necessary for hardware modules have been introduced
in ui/console.c.
(3rd patch)

Furthermore, modifications have been made to hw/display/virtio-gpu and
hw/vfio/display to utilize these new methods instead of setting up the struct
independently.
(1st and 2nd patches)

Dongwon Kim (3):
  hw/virtio: intialize QemuDmaBuf using the function from ui/console
  hw/vfio: intialize QemuDmaBuf using the function from ui/console
  ui/console: add methods for allocating, intializing and accessing
    QemuDmaBuf

 hw/display/virtio-gpu-udmabuf.c | 27 +++++++---------
 hw/vfio/display.c               | 35 ++++++++++++---------
 include/hw/vfio/vfio-common.h   |  2 +-
 include/hw/virtio/virtio-gpu.h  |  2 +-
 include/ui/console.h            | 10 ++++++
 ui/console.c                    | 55 +++++++++++++++++++++++++++++++++
 6 files changed, 98 insertions(+), 33 deletions(-)

-- 
2.34.1
Re: [PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console
Posted by Philippe Mathieu-Daudé 1 month, 1 week ago
On 20/3/24 21:50, dongwon.kim@intel.com wrote:
> From: Dongwon Kim <dongwon.kim@intel.com>
> 
> QemuDmaBuf struct is defined and primarily used by ui/console/gl so it is
> better to handle its creation, initialization and access within ui/console
> rather than within hw modules such as hw/display/virtio-gpu and
> hw/vfio/display.
> 
> To achieve this, new methods for allocating, initializing the struct, and
> accessing certain fields necessary for hardware modules have been introduced
> in ui/console.c.
> (3rd patch)
> 
> Furthermore, modifications have been made to hw/display/virtio-gpu and
> hw/vfio/display to utilize these new methods instead of setting up the struct
> independently.
> (1st and 2nd patches)

What about dbus_scanout_texture(), should it use dpy_gl_create_dmabuf()?

> Dongwon Kim (3):
>    hw/virtio: intialize QemuDmaBuf using the function from ui/console
>    hw/vfio: intialize QemuDmaBuf using the function from ui/console
>    ui/console: add methods for allocating, intializing and accessing
>      QemuDmaBuf
Re: [PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console
Posted by Philippe Mathieu-Daudé 1 month, 1 week ago
Hi Dongwon,

On 20/3/24 21:50, dongwon.kim@intel.com wrote:
> From: Dongwon Kim <dongwon.kim@intel.com>
> 
> QemuDmaBuf struct is defined and primarily used by ui/console/gl so it is
> better to handle its creation, initialization and access within ui/console
> rather than within hw modules such as hw/display/virtio-gpu and
> hw/vfio/display.
> 
> To achieve this, new methods for allocating, initializing the struct, and
> accessing certain fields necessary for hardware modules have been introduced
> in ui/console.c.
> (3rd patch)
> 
> Furthermore, modifications have been made to hw/display/virtio-gpu and
> hw/vfio/display to utilize these new methods instead of setting up the struct
> independently.
> (1st and 2nd patches)

Thanks for splitting, unfortunately the series isn't buildable /
bisectable since the methods use in patches 1&2 are only introduced
in patch 3 :/

> Dongwon Kim (3):
>    hw/virtio: intialize QemuDmaBuf using the function from ui/console
>    hw/vfio: intialize QemuDmaBuf using the function from ui/console
>    ui/console: add methods for allocating, intializing and accessing
>      QemuDmaBuf
RE: [PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console
Posted by Kim, Dongwon 1 month, 1 week ago
Hi Phlippe,

> -----Original Message-----
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Sent: Wednesday, March 20, 2024 11:57 PM
> To: Kim, Dongwon <dongwon.kim@intel.com>; qemu-devel@nongnu.org
> Cc: marcandre.lureau@redhat.com
> Subject: Re: [PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console
> 
> Hi Dongwon,
> 
> On 20/3/24 21:50, dongwon.kim@intel.com wrote:
> > From: Dongwon Kim <dongwon.kim@intel.com>
> >
> > QemuDmaBuf struct is defined and primarily used by ui/console/gl so it
> > is better to handle its creation, initialization and access within
> > ui/console rather than within hw modules such as hw/display/virtio-gpu
> > and hw/vfio/display.
> >
> > To achieve this, new methods for allocating, initializing the struct,
> > and accessing certain fields necessary for hardware modules have been
> > introduced in ui/console.c.
> > (3rd patch)
> >
> > Furthermore, modifications have been made to hw/display/virtio-gpu and
> > hw/vfio/display to utilize these new methods instead of setting up the
> > struct independently.
> > (1st and 2nd patches)
> 
> Thanks for splitting, unfortunately the series isn't buildable / bisectable since the
> methods use in patches 1&2 are only introduced in patch 3 :/
[Kim, Dongwon]  Maybe changing order of patches like 3-1-2 would be acceptable?

> 
> > Dongwon Kim (3):
> >    hw/virtio: intialize QemuDmaBuf using the function from ui/console
> >    hw/vfio: intialize QemuDmaBuf using the function from ui/console
> >    ui/console: add methods for allocating, intializing and accessing
> >      QemuDmaBuf

Re: [PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console
Posted by Philippe Mathieu-Daudé 1 month, 1 week ago
On 21/3/24 08:01, Kim, Dongwon wrote:
> Hi Phlippe,
> 
>> -----Original Message-----
>> From: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Sent: Wednesday, March 20, 2024 11:57 PM
>> To: Kim, Dongwon <dongwon.kim@intel.com>; qemu-devel@nongnu.org
>> Cc: marcandre.lureau@redhat.com
>> Subject: Re: [PATCH 0/3] ui/console: initialize QemuDmaBuf in ui/console
>>
>> Hi Dongwon,
>>
>> On 20/3/24 21:50, dongwon.kim@intel.com wrote:
>>> From: Dongwon Kim <dongwon.kim@intel.com>
>>>
>>> QemuDmaBuf struct is defined and primarily used by ui/console/gl so it
>>> is better to handle its creation, initialization and access within
>>> ui/console rather than within hw modules such as hw/display/virtio-gpu
>>> and hw/vfio/display.
>>>
>>> To achieve this, new methods for allocating, initializing the struct,
>>> and accessing certain fields necessary for hardware modules have been
>>> introduced in ui/console.c.
>>> (3rd patch)
>>>
>>> Furthermore, modifications have been made to hw/display/virtio-gpu and
>>> hw/vfio/display to utilize these new methods instead of setting up the
>>> struct independently.
>>> (1st and 2nd patches)
>>
>> Thanks for splitting, unfortunately the series isn't buildable / bisectable since the
>> methods use in patches 1&2 are only introduced in patch 3 :/
> [Kim, Dongwon]  Maybe changing order of patches like 3-1-2 would be acceptable?

No, because of the g_free() call in dpy_gl_release_dmabuf().

Maybe Marc-André is OK with the previous version...

> 
>>
>>> Dongwon Kim (3):
>>>     hw/virtio: intialize QemuDmaBuf using the function from ui/console
>>>     hw/vfio: intialize QemuDmaBuf using the function from ui/console
>>>     ui/console: add methods for allocating, intializing and accessing
>>>       QemuDmaBuf
>