Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: graphic drivers and simplefb



There is a more specific compatible string on /chosen/framebuffer that you can match on ("allwinner,simple-framebuffer"). If your driver claims that node, you won't have to worry about handoff at all...

https://www.kernel.org/doc/Documentation/devicetree/bindings/display/simple-framebuffer-sunxi.txt

You'll want to add FDT_CONSOLE support to your DE driver as well.

Cheers,
Jared


On Wed, 4 Apr 2018, Manuel Bouyer wrote:

Hello,
What's missing from the sunxi video drivers is console handling.
I got this working, but this needs some change to the simplefb driver.

the /chosen/framebuffer node is (if I understood is properly) set up by
the firmware/bootloader and will always exists if a framebuffer has been
set up. Or, we can't have a framebuffer in the firmware/bootloader without
a valid /chosen/framebuffer node (if I understood it properly).
Our simplefb driver will attach to it.
In addition, if this is going to be the OS's console, our simplefb
driver will match it very early.

Now if we attach and configure the display hardware in the OS, the
simplefb won't be functional as the display driver. Also, the
display drivers needs to know if they will be the console, and the simplefb
driver knows this.

So I propose to add 2 public functions to dev/fdt/simplefb.c, for use
by display drivers:
- int fdt_simplefb_get_console(void) which returns the phandle of
 the /chosen/framebuffer node, if it has been selected as console.
 The display driver may need more information from here
 (like the content of allwinner,pipeline in my case).
- void fdt_simplefb_disable(void) which, once called, will prevent the
 simplefb from matching.

The attached patch implements this, as well as console handling the
the sunxi drivers. In addition to 'console=fb', console=fb0 or fb1 is
supported to select a specific pipeline, which may not have been set up
by the bootloader.

For this to work, the display pipelines have to be fully configured before
simplefb could be matched. So I has to move
sunxidep*      at fdt?
to pass 5.

I believe that with this, the display drivers could be enabled by default
in the sunxi kernel.

--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
    NetBSD: 26 ans d'experience feront toujours la difference
--



Home | Main Index | Thread Index | Old Index