Thomas Zimmermann <[email protected]> writes:

Hello Thomas and Julius,

> Hi
>
> Am 08.01.26 um 17:55 schrieb Julius Werner:
>> This seems less consistent to me, although tbh I don't understand the
>> Linux device and driver framework that well. I think the original idea
>> here was that the coreboot bus represents the coreboot table, and each
>> entry is represented as one device (regardless of whether any driver
>> actually wants to do anything with that entry). That's why we're
>> creating a device for all the tags even though most of them aren't
>> really interesting for kernel drivers. This also helps with inspecting
>> things in sysfs.
>
> We need to distinguish between coreboot and sysfb. Only one of these 
> subsystems can handle the framebuffer. Having a framebuffer device on 
> the coreboot bus, if the underlying framebuffer is managed by a 
> different device seems even more incorrect.
>

I'm not familiar with coreboot so please forgive me if something that I
say makes no sense but IMO what should be done is the following:

* coreboot_table_populate() should populate the bus and devices for all
  devices. That way the complete device hierarchy will be exposed in the
  sysfs entries as Julius mentioned.

* 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).

* 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

Reply via email to