This allows us to support this hardware and, in the future, use clocks
so they are enabled past the initial kernel boot process.
Details
- Reviewers
manu ray - Group Reviewers
arm64 - Commits
- rGd5035d913cc6: Add a simple-framebuffer vt driver
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I don't think it make much sense to commit that without all formats supported and clocks, efifb should be good enough instead. (and yes I know that it's not on the mac blah that you're working on :P )
sys/dev/vt/hw/simplefb/simplefb.c | ||
---|---|---|
91 | I only see a8r8g8b8 and r5g6b5 as supported format currently : https://cgit.freebsd.org/src/tree/sys/contrib/device-tree/Bindings/display/simple-framebuffer.yaml#n82 |
I can easily add more formats, although can't test the clocks as I don't have hardware that has the clocks property.
sys/dev/vt/hw/simplefb/simplefb.c | ||
---|---|---|
6 | @emaste Can I drop this? It's in all the vt drivers where the Foundation has a copyright statement. | |
91 | Most of them are missing from the bindings. This seems to be a full list of the currently supported formats: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/platform_data/simplefb.h?id=d665ea6ea86c785760ee4bad4543dab3267ad074#n16 I can easily add the other formats. It looks like a8r8g8b8, r5g6b5, and r8g8b8 are used in the in-tree dts files. Many of the simple-framebuffer nodes lack a format so I guess the firmware fills this property in. |
I'll handle the clock part if you want but it's something like
clk_t clk;
int err;
for (int idx = 0; ; idx++) {
err = clk_get_by_ofw_index(dev, 0, idx, &clk);
if (err == 0)
clk_enable(clk);
else
break;
}
sys/dev/vt/hw/simplefb/simplefb.c | ||
---|---|---|
91 | I'll boot a few board this weekend to check if there is other format added by bootloader. |
We don't have a device_t to use this early so would need to create a driver to attach to the same node later in the boot. One of the problems is it's a child of /chosen so doesn't get probed. For testing I created a chosen driver we could use that attaches to the chosen node and adds any children it finds.
sys/dev/vt/hw/simplefb/simplefb.c | ||
---|---|---|
87 | I think, if I understand the notation correctly? |
Looks good to me.
Thanks!
sys/dev/vt/hw/simplefb/simplefb.c | ||
---|---|---|
87 | Yes. All I saw defined from higher to lower. So "b5" is lower 5 bits. |
sys/dev/vt/hw/simplefb/simplefb.c | ||
---|---|---|
8–9 | You could change this to "Portions of this software were..." |