rotwang wrote:I thought this might be a can of worms, instead of which it's turning into a cauldron full of serpents. I did some more investigating (most of which was wasted effort due to a dodgy HDMI lead) but further tests this morning confirm that the display which is going to be the console is chosen by either the ROM bootloader in the broadcom chip or bootcode.bin whichever generates the big rainbow square. This happens long before the kernel gets control. If I have both the touch screen and an HDMI display connected at poweron then the big rainbow will only appear on the touchscreen which will become the console.
The HDMI output is being initialised (because the monitor shows a black screen, rather than a "no signal" message).
The upshot of all this is that when the kernel gets control, it can only see one video device, which the GPU has chosen already.
To conform to the general arrangement, the GPU needs to advise the kernel of how many video devices it has dicovered (this also has to work with the compute module, which may have two DSI displays plus HDMI). The kernel then needs to iterate through this list, creating frame buffers and corresponding /dev/fb<n> devices and establishing the link between framebuffer memory ares and the GPU.
Well, thats the thought for today, anything to do with firmware I can obviously do nothing about, but I can make time for testing things if/when anyone has anything to test.
<postscript>
Xorg should take care of itself, given an xorg.conf which tells it which framebuffer devices to use.
What's the next step up from a cauldron of serpents, an ocean basin full of kraaken?
It certainly looks to be the case that the firmware sets up a SINGLE video device, DSI takes priority over HDMI and if all else fails composite. This is all done well before the kernel is started, all that the kernel appears to do is to take the one device it has been given, it appears to have no knowledge of any other.
To confuse me even further, invoking "sudo Xorg -configure" from the CLI which SHOULD write out an xorg.conf file based on the hardware it is running on, proceeds to load fbdev and fbturbo, then exits saying "no devices to configure". In order to even begin to produce a framebuffer device for the touchscreen, you need to know it's there, which the current firmware seems to determined not to admit to.
Still, onwards and upwards, I now know an increasing list of things it isn't.