qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 6/9] hw/display/sm501: QOM-alias 'dma-offset' property in chi


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 6/9] hw/display/sm501: QOM-alias 'dma-offset' property in chipset object
Date: Fri, 3 Feb 2023 15:11:45 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 3/2/23 14:50, BALATON Zoltan wrote:
On Fri, 3 Feb 2023, Philippe Mathieu-Daudé wrote:
On 3/2/23 14:05, BALATON Zoltan wrote:
On Fri, 3 Feb 2023, Philippe Mathieu-Daudé wrote:
No need to use an intermediate 'dma-offset' property in the
chipset object. Alias the property, so when the machine (here
r2d-plus) sets the value on the chipset, it is propagated to
the OHCI object.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/display/sm501.c | 22 +++++++++++-----------
hw/sh4/r2d.c       |  2 +-
2 files changed, 12 insertions(+), 12 deletions(-)

It does not seem to be any simpler by the number of lines but maybe a bit cleaner.

Well it also moves to the "Embed QOM objects" pattern which Peter prefers.
Note this device doesn't implement unrealize().

True. Maybe worth mentioning in the commit message to make this more explicit. I saw it in the patch but did not think about that.

I wonder if it would worth renaming the property to dma-offset to match that of ohci so it's less confusing what it refers to. It's only used by r2d and this patch already changing that so would be an easy change.

We can't because TYPE_PCI_SM501 is user-creatable, so we need to
go thru the whole deprecation process and we don't have any API to
deprecate QOM properties yet.

But the sm501 PCI device only creates the display part hence it has no base option only vram-size (see sm501_pci_properties) so only the sysbus version has this property. Is this still a problem in that case?

Oh you are right, I misread the PCI/sysbus functions. Lucky me, thanks!



reply via email to

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