Page MenuHomeFreeBSD

Add a simple-framebuffer vt driver
Needs ReviewPublic

Authored by andrew on May 4 2021, 4:41 PM.

Details

Reviewers
manu
Group Reviewers
arm64
Summary

This allows us to support this hardware and, in the future, use clocks
so they are enabled past the initial kernel boot process.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 39025
Build 35914: arc lint + arc unit

Event Timeline

andrew requested review of this revision.May 4 2021, 4:41 PM

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
90

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
5

@emaste Can I drop this? It's in all the vt drivers where the Foundation has a copyright statement.

90

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 can easily add more formats, although can't test the clocks as I don't have hardware that has the clocks property.

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
90

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.

andrew retitled this revision from Add an simple-framebuffer vt driver to Add a simple-framebuffer vt driver.May 5 2021, 8:58 AM

Add more formats found in local dts files

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.

Mhm right, I'll have to think about how to do this properly ...

sys/dev/vt/hw/simplefb/simplefb.c
5

Yes all FreeBSD Foundation copyrights can have All rights reserved. removed. I did a pass over the tree before but did not get everything.

124

Hrm, this is what we're using everywhere I suppose :(