In automotive systems, it is extremely common to have a single computer run both virtualized Linux and Android. These cooperatively render different portions of the content that appears on-screen.
Android is the flagship user interface on the IVI screens (and increasingly even on the instrument cluster screens too). But Linux still plays a prominent on-screen role too. Android never boots fast enough to satisfy the performance expectations or regulatory needs of things like the rear-view camera or the most crucial parts of the instrument cluster. In practice, what this means is that the Linux KMS driver and the Android HWComposer implementation feed a paravirtualized display interface. Some piece of software on the hypervisor backend does a final compositing to blend the two OSes' output framebuffers. This might happen during scanout using dedicated hardware layer mixing capabilities (the stuff a native Linux driver would model as a KMS plane) or it might happen using a dedicated memory-to-memory accelerator. Invariably, Android ends up stacked below Linux. This allows Linux to boot quickly and place its initial version of the safety and time-sensitive UIs onscreen. Then Android continues to initialize behind the scenes and, when its applications are finally confirmed on-screen, the Android applications will signal the Linux ones that it is safe to hide their surfaces. With the Linux surface unmapped, the corresponding Android app shows and takes over duties to present that portion of the UI. All of this requires that the output coming out of the Linux compositor is mostly transparent. Only parts of the screen with active content ought to contribute to the content seen on the glass by the user. Today Weston always enforces that the output is opaque. You can select a RGBA-enabled GBM buffer format for a KMS output, but the renderer doesn't retain the alpha channel content at the bottom end, and the shells anyway paint an opaque curtain behind all the explicit user surfaces. SOC makers already typically outfit their Android HWComposer implementations with some way to punch such transparent holes through its composited output. The idea here would be to make it possible to do the same on Linux. Would a feature to introduce a switch for treating the unused parts of the output as transparent be welcome? I don't think it would be terribly invasive. It would mainly require when this mode is activated: that the core renderer does an explicit clear of all the damaged areas of the framebuffer, and that the shells refrain from drawing an explicit opaque view behind all the client surfaces. I realize that feeding alpha-enabled framebuffers to a physical KMS layer would be undefined behavior; typically, the display controller treats pixels marked alpha=0 as black. This new config switch's documentation would be written to carry heavy warnings that it should not be used when Linux is directly feeding the physical scanout. -Matt ________________________________ CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.
