Hi

Am 13.01.26 um 23:32 schrieb Julius Werner:
Another question I have is why there's a separate device for the
coreboot-table? Couldn't the kernel just create the coreboot bus and
then populate it with the table entries? DT does that. If the
coreboot-table device is really just the parent for the other deivce,
that is incorrect, as I describe above.
To be honest I didn't write this code and probably don't understand it
well enough to answer that question (we should probably CC +Samuel,
who did). I assume that it was done to get the automatic matching of
the ACPI/DT entry that tells the kernel that a coreboot table exists.
If there's a better way to achieve that, feel free to change it.

IDK. My take would have been to provide the coreboot table under /sys/firmware; similar to DT. And then walk over it and create devices for the known entries.


* the check on whether the CB_TAG_FRAMEBUFFER should be used or not by the
   kernel should also be there (what Thomas did in patch 1/8) but instead
   of omiting registering the coreboot device in the bus, the device could
   be marked as "unused" or "disabled" (by adding a field to coreboot_device).
This sounds like a reasonable compromise. It still feels a bit odd to
me that the check whether other framebuffers exist happens during
parsing of the table rather than at the point where the table entry is
actually used by something, but if that's the easiest way to make it
work, I guess there's no harm in doing it there. (I'm still curious,
though, why can't you just do the check in corebootdrm_probe(), and
return -ENODEV if the other framebuffer is used? Wouldn't that be
equivalent to what the old driver did?)

I have a new iteration of the series that creates a coreboot-framebuffer platform device for at the same place that currently creates the simple-framebuffer device (in framebuffer_probe()). So we can leave most of the code it as. There are also a number of bugs that this is going to fix. I'll post it soon.

Best regards
Thomas



* the coreboot_bus_match() function then can take this new field into
   account and only match if (device->entry.tag == id->tag && !device->unused)
   or something like that.

That way no device will be removed from the bus and the corebootdrm driver
will only be probed when the device has to actually be used by the kernel.

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)


Reply via email to