Multi-LCD

Started by martenjacobs, March 10, 2014, 09:37:42 PM

Previous topic - Next topic

martenjacobs

Hi all,

I'm currently looking into using an A20-OLinuXino in a product I'm developing. I'd like to fit the board into a single enclosure with two displays. If possible, I'd like the displays to be the same, with the exception of one of them being touch-enabled. Anyway, I was wondering whether it's possible to connect two A13-LCD10(TS)'s to a single board, possibly with some sort of adapter or by configuring a set of GPIO-pins to be used for the second LCD. While looking through the fex, I found an lcd1 section that seems to provide this, so this seems possible to me, but I didn't find any further references.

Furthermore (on a related note), I was wondering if it's possible to replace the backlight of the A13-LCD10(TS) with a brighter one (to make the display readable outside on bright days, so something like 400cd/m^2). External power is not a problem.

Thanks,
Marten

dave-at-axon

Hi Marten,

Couple of things.

Adding a second LCD would work if you had all of the GPIO pins free on port PH to use for the LCD signals but sadly without creating your own custom board and re-allocating the used pins this is not possible with the current board because Olimex have used a number of the PH pins to driver USB, LCD power etc. You need 28 pins to connect to an LCD.

Another option you might be able to consider is adding an LCD with an HDMI input. This would certainly work as I have both a 7" LCD and a HDMI TV connected at the same time but they both show the same display. Although I have not looked at how to have the HDMI run from a separate buffer, this could be possible. I'd need to look at the datasheet to see if this is the case and maybe try some settings. The issue will be suitable drivers for Linux and or Android.

The sunlight issue is going to need a new LCD. This one has the backlight at full as far as I can tell from the specs and the driving circuit so it is not going to get any brighter. Sunlight LCD's tend to be either VERY high brightness LED drivers or transflective types.

martenjacobs

#2
@dave-at-axon: But wouldn't it be possible to reassign these pins in the fex as well? Or are they physically linked on the board?
I currently own a PhoenixA20 board, and have (with some work) got two screens (vga and hdmi) to work from separate framebuffers, using (among other things) instructions I've found specifically for the OLinuXino board, so I'm pretty sure I can get the two screens working separately.

dave-at-axon

The tracks are not brought out to any connectors so physically you would not be able to do this even if you could remap in the fex file.

I wonder if configuring the 2 displays, LCD and HDMI to use 2 different frame buffers might work. I'll see if I can try this out on my Android system here in the next day or 2. Not sure if Android supports dual frame buffers but no harm in trying :)

martenjacobs

Here's the fex I used for my PhoenixA20, it may help you with setting up your board.

https://www.dropbox.com/s/kcvsuhya7pe67cx/phoenix_a20.fex
Note to any passers-by: This fex will probably not work as-is for any OLinuXino boards

dave-at-axon

Hi Marten,

I've tried a few combinations but each time the Android Linux boots, it crashes. It would appear that it does not support the dual independent screens. I may have to look into how to do this a rebuild the kernel to support it.

dave-at-axon

Ah wait. The error was the changes for the CTP I am developing. Oops.!

Doesn't seem to make any difference with Android OS. I used disp_mode = 2 and set screen1 as HDMI with screen0 as LCD but it came up with the same display on both screens.

Tried disp_mod = 4 and the LCD was vertically not right. I could not see the top of the screen. It was as if it was 720 instead of 480.

disp_mode=4 was not encouraging either. Nothing on the HDMI output.

It would appear that the Android Kernel needs changes to support a dual type display. For now the same is good enough for my clients project.

:(


kylebassett

Hi,

Let's try this again.  The forum just deleted my post because I took too long!   >:(

On the bright side, LCD + HDMI is working, with different resolutions, and with Xinerama!   :D


Hardware:
-A20-OLinuXino-MICRO-4GB
-A13-LCD7-TS
-HDMI 1080p Monitor
-Serial Debug Cable for Uart0 ( <-- Highly recommended!)
-DC Power, 12v


Software:
-Debian Ultimate Image
-set correct date/time
-apt-get update && apt-get upgrade
-install mali/cedarX (and tested!)
-modify script.bin
-create xorg.conf



/dev/mmcblk0p1/script.bin (mounted and bin2fex'd)
https://www.olimex.com/forum/index.php?topic=2291.0
http://linux-sunxi.org/Fex_Guide#disp_init_configuration
====================================================
[disp_init]
disp_init_enable = 1
disp_mode = 2
screen0_output_type = 1
screen0_output_mode = 5
screen1_output_type = 3
screen1_output_mode = 10
fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 0
fb0_width = 0
fb0_height = 0
fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 0
fb1_width = 0
fb1_height = 0






/etc/X11/xorg.conf
====================================================
Section "Device"
        Identifier      "A20FBDEV0"
        Driver          "fbdev"
        Option          "fbdev" "/dev/fb0"
        Option          "SwapbuffersWait" "true"
EndSection


Section "Device"
        Identifier      "A20FBDEV1"
        Driver          "fbdev"
        Option          "fbdev" "/dev/fb1"
        Option          "SwapbuffersWait" "true"
EndSection


Section "Monitor"
Identifier "Monitor0"
EndSection

Section "Monitor"
Identifier "Monitor1"
EndSection


Section "Screen"
    Identifier "Screen0"
    Device     "A20FBDEV0"
    Monitor    "Monitor0"
EndSection

Section "Screen"
    Identifier "Screen1"
    Device     "A20FBDEV1"
    Monitor    "Monitor1"
    SubSection "Display"
        Depth   24
        Modes   "1920x1080"
    EndSubSection
EndSection


Section "ServerLayout"
        Identifier "a20-lcd-hdmi"
        Screen 0 "Screen0" 0 0
        Screen 1 "Screen1" RightOf "Screen0"
        # USE THIS OPTION TO ENABLE MULTI-HEAD SINGLESESSION
        Option "Xinerama" "true"
EndSection
====================================================




mplayer test:
$ mplayer -fs -vo vdpau -vc ffh264vdpau h264.mkv


I can confirm cedarX hardware accelerates h264 decoding thru HDMI, although CPU usage is double (~80%) when compared to hardware h264 decoding of the same file on the LCD (~40%).  If hardware acceleration was not functioning, CPU usage would be ~180% (not able to render).


Xinerama enabled:
-touchscreen does not work; X crashes when ts is pressed
-mplayer does not play on LCD; defaults to HDMI (how to change default?)
-mplayer shows black screen on HDMI, no video (but [DISP] layer allocated)


Xinerama disabled:
-touchscreen works; but currently attached to screen1 (HDMI)
-mplayer renders on LCD properly (thru cedarX)
-mplayer shows black screen on HDMI, no video (but [DISP] layer allocated)



My goal is to get Xinerama working properly with the touchscreen on LCD.  I think this is a good start, hope it helps!