Port-arm archive

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

Re: ukbd_cnattach() called unconditionally



On Sep 23, 2018, at 3:16 PM, Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:


shouldn't ukbd_cnattach() be called from simplefb_console_consinit()
instead ?

That will only ever be called if console=fb is present in bootargs, and none
of our boot scripts do this.

it's not called in the WSDISPLAY_MULTICONS case ?

It is only called for the device matching /chosen stdout-path. On all of our sunxi boards to date, this points to the debug UART.

The “console=fb” code replaces the value of this property with the path to the frame buffer, which would cause it to be called.

However...

armv7/arm64.img don’t set console=fb because we need a config that works on all devices. WSDISPLAY_MULTICONS attempts to solve the “work everywhere" problem by saying ok, lets use the stdout-path device as console, and if a wsdisplay device attaches, use it too. Downside is that you don’t get _early_ fb console on things like Pinebook, but what can you do..

So in the general case of “no console= passed on the kernel cmdline”, console_consinit will happen for the UART driver, and simplefb_attach will take over from there.

We could probably call ukbd_cnattach from both simplefb_console_consinit and simplefb_attach, but then all display drivers need to start adopting this hack. Maybe we can do it in fdt_device_register instead? Something like this:

#if NUKBD > 0
        if (device_is_a(self, "wsdisplay")) {
                struct wsdisplay_softc *sc = device_private(self);
                if (sc->sc_isconsole)
                        ukbd_cnattach();
        }
#endif



Home | Main Index | Thread Index | Old Index