AnsweredAssumed Answered

IMX6 LVDS and HDMI display

Question asked by Jordan Bausmer on May 6, 2019
Latest reply on May 7, 2019 by Jordan Bausmer

Hi, I am using an IMX6 board with freescale linux built using buildroot. I am running the X11 windowing system and trying to run a c++ QT application on both an LVDS touch screen and external HDMI display. Ideally the end solution involves a QT application running on the LVDS screen, then the user plugs in the HDMI and we move the application over to the HDMI screen instead without killing the application (long startup times).

 

I am using a device tree to configure the frame buffers and IPUs. The problem I am having is I can find no way to display on both the touch screen panel and the HDMI screen at the same time. The only solution that has worked so far has been enabling "Xinerama" in the xorg.conf file to mirror the display. However with this solution opengl does not work at all and our QT application requires opengl. Even worse it appears Xinerama causes QT 5.10 applications to crash on startup and requires a patch to the QT source code (see QTBUG-64928). Seeing as Xinerama won't work I would like to show the application on both screens using xrandr commads. I.e. something like:

xrandr --output <HDMISCREEN> --same-as <LVDSSCREEN>

In order to use the above command both screens must appear in the xrandr query. For some reason I can only get one to show up at a time. I have read that perhaps only one device can use the vivante driver at a time but have not found any official documentation on limitations. My question is why does xrandr only show a single device at a time when both are configured in the xorg.conf? Below is my example xorg.conf file and the output from xrandr

 

 

cat /etc/X11/xorg.conf

Section "Device"
    Identifier "FrontPanel"
    Driver     "vivante"
    Option     "fbdev" "/dev/fb0"
    Option     "vivante_fbdev" "/dev/fb0"
EndSection

 

Section "Device"
    Identifier "HDMI"
    Driver     "vivante"
    Option     "fbdev" "/dev/fb2"
    Option     "vivante_fbdev" "/dev/fb2"
EndSection

 

Section "Monitor"
    Identifier "FrontMonitor"
EndSection

 

Section "Monitor"
    Identifier "HDMIMonitor"
EndSection

 

Section "Screen"
    Identifier "FrontScreen"
    Monitor    "FrontMonitor"
    Device     "FrontPanel"
    DefaultDepth 24
EndSection

 

Section "Screen"
    Identifier "HDMIScreen"
    Monitor    "HDMIMonitor"
    Device     "HDMI"
    DefaultDepth 24
EndSection


Section "ServerLayout"
    Identifier "Test1"
    Screen 0   "FrontScreen"
    Screen 1   "HDMIScreen"
EndSection

Section "ServerLayout"
    Identifier "Test2"
    Screen 0   "HDMIScreen"
    Screen 1   "FrontScreen"
EndSection

To try each server layout I just pass the identifier to the startx command and then look at the output of the xrandr query. In "Test1" the application runs on the LVDS and in "Test2" the application runs on HDMI, but never are both displays available, so the device tree is configured correctly.

 

startx -- -layout Test1

xrandr -q

Screen 0: minimum 240 x 240, current 1280 x 800, maximum 8192 x 8192
DISP3 BG connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
U:1280x800p-60 60.76*+

 

startx -- -layout Test2

xrandr -q

Screen 0: minimum 240 x 240, current 1920 x 1080, maximum 8192 x 8192
DISP4 BG - DI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
U:1920x1080p-60 60.00*+
S:1920x1080p-50 50.00
S:1920x1080p-30 30.00
S:1920x1080p-25 25.00
S:1920x1080p-24 24.00
S:1280x720p-60 60.00
S:1280x720p-50 50.00
S:720x576p-50 50.00
S:720x480p-60 59.94
V:640x480p-60 60.00

Outcomes