qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH 02/24] display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-


From: Peter Maydell
Subject: Re: [PATCH 02/24] display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge"
Date: Mon, 18 May 2020 11:30:40 +0100

On Mon, 18 May 2020 at 06:04, Markus Armbruster <address@hidden> wrote:
>
> xlnx_dp_init() creates these two devices, but they're never realized.
> Affects machine xlnx-zcu102.
>
> I wonder how this ever worked.  If the "device becomes real only on
> realize" thing actually works, then we've always been missing these
> two devices, yet nobody noticed.

It depends entirely on the implementation of the device.
If it happens to do nothing in the realize method that
matters (eg i2c-ddc has no realize method and does the limited
amount of initialization it needs in instance_init) then the
device will (by lucky accident) work just fine.

We should really ideally have an assert() in the DeviceClass
reset that the device was realized, so we can keep this kind
of bug out of the codebase. (Last time I looked it wasn't obvious
exactly where to put the assert now that we have both legacy-reset
and three-phase-reset, unfortunately.)

thanks
-- PMM



reply via email to

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