Hi Alper, On Tue, 22 Aug 2023 at 06:10, Alper Nebi Yasak <alpernebiya...@gmail.com> wrote: > > QEMU firmware config drivers need to be probed to bind the ramfb device. > The ramfb driver needs to be bound before relocation to properly reserve > video memory for it, otherwise it cannot be probed after relocation. Add > the flag to probe QEMU firmware config drivers before relocation so that > ramfb can work as an initial vidconsole. > > Signed-off-by: Alper Nebi Yasak <alpernebiya...@gmail.com> > --- > Alternatively, I guess I could default VIDEO_PCI_DEFAULT_FB_SIZE to a > higher size with "if VIDEO_RAMFB". But it exists because "PCI drivers > cannot be bound before relocation unless they are mentioned in the > devicetree" and qfw is in the QEMU-generated devicetree unlike those, so > I assumed this would be the preferred way. > > Changes in v2: > - Add patch "qfw: Add flag to allow probing before relocation" > > drivers/misc/qfw.c | 1 + > drivers/misc/qfw_mmio.c | 1 + > drivers/misc/qfw_pio.c | 1 + > drivers/misc/qfw_sandbox.c | 1 + > 4 files changed, 4 insertions(+) > > diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c > index 4e4260982cce..265f45290011 100644 > --- a/drivers/misc/qfw.c > +++ b/drivers/misc/qfw.c > @@ -414,6 +414,7 @@ UCLASS_DRIVER(qfw) = { > .name = "qfw", > .post_bind = qfw_post_bind, > .per_device_auto = sizeof(struct qfw_dev), > + .flags = DM_FLAG_PRE_RELOC, > };
Should we add this to the DT instead? In the case where it isn't present it can return -EPERM. Regards, Simon