Dear All,
We've a custom board based on mx53_ARD which uses R10.4 BSP. There're 3 display options - hdmi, vga and tve. Our requirement is to enable 3 displays dynamically ie without rebooting and giving different bootargs. Can it be managed using a blanking function?
We tried the method of dual display and succeeded in getting UI in hdmi and vga. But video playback happened only in one display at a time. Also the system performance deteriorated remarkably. Is there any patches to be applied to solve this issue?
Our aim is to solve the above 2 issues. Please share your thoughts.
Thank You,
Mathews Paul
Solved! Go to Solution.
hi,
For primary display, you can configure booting command (bootargs) with 'di1_primary' or 'di0_primary'.
(kernel/arch/arm/mach-mx5/early_setup.c)
For rw.SECOND_DISPLAY_CONNECTED, its behavior likes,
vga as 1st display, hdmi as 2nd display, i tried by MX53 SMD with R10.3.2 (Single video with dual UI).
1. hdmi is NOT connected, UI/Video on 1st display
2. hdmi is connected, UI on 1st display & 2nd display. Video on 2nd display
3. setprop rw.SECOND_DISPLAY_CONNECTED 0
4. UI on 1st display only, video on 1st display
5. setprop rw.SECOND_DISPLAY_CONNECTED 1
6. UI on 1st display & 2nd display. Video on 2nd display
Video can be switch between 1st display & 2nd display, but you may need to modify for UI switch.
Hi,
I performed the following inorder to switch between vga and hdmi.
Boot the board in dual display mode.
di0-hdmi, secondary display
di1-vga, primary display
check ro.SECOND_DISPLAY_CONNECTED to verify hdmi is connected or not.
if hdmi is connected,
hdmi -ON
vga -OFF
else
hdmi-OFF
vga-ON
Inorder to turn ON/OFF display, Is blanking framebuffer(fb) an option?
Is it possible to ON/OFF hdmi like this?
echo 0 >/sys/class/graphics/fb0
echo 1 >/sys/class/graphics/fb0
Is it possible to ON/OFF vga like this?
echo 0 >/sys/class/graphics/fb1
echo 1 >/sys/class/graphics/fb1
The system performance will be low if both displays are ON same time. From my tests the value of ro.SECONDARY_DISPLAY_CONNECTED is not changing dynamically when hdmi is connected. Please correct me if my approach is wrong.
Thank You
Mathews Paul
hi,
/sys/class/graphics/fbx is a directory, not a sysfs node.
you can make framebuffer enter sleep mode by
echo 1 > /sys/class/graphics/fb0/blank
Then wake up
echo 0 > /sys/class/graphics/fb0/blank
hi,
The BSP only supports these modes for dual display.
There should not be extra patches as I know.
Regards,
Max
Hi Max,
Thanks a lot for your reply.
What'll be a feasible method to be followed inorder to get UI and video playback in VGA and HDMI simultaneously?
Also is there any other method to enable switching between vga and hdmi ? ie without rebooting and giving bootargs?
Thank You
Mathews Paul
Hi Max,
Is the content in fb0 is displayed in primary display and content in fb1 displayed in second display?
Rgds
Mathews Paul
hi,
For primary display, you can configure booting command (bootargs) with 'di1_primary' or 'di0_primary'.
(kernel/arch/arm/mach-mx5/early_setup.c)
For rw.SECOND_DISPLAY_CONNECTED, its behavior likes,
vga as 1st display, hdmi as 2nd display, i tried by MX53 SMD with R10.3.2 (Single video with dual UI).
1. hdmi is NOT connected, UI/Video on 1st display
2. hdmi is connected, UI on 1st display & 2nd display. Video on 2nd display
3. setprop rw.SECOND_DISPLAY_CONNECTED 0
4. UI on 1st display only, video on 1st display
5. setprop rw.SECOND_DISPLAY_CONNECTED 1
6. UI on 1st display & 2nd display. Video on 2nd display
Video can be switch between 1st display & 2nd display, but you may need to modify for UI switch.
Hi Max,
Thanks a lot. This works the same way as I expected.
I gave the following bootargs-
setenv bootargs console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1280x720M@60 hdmi video=mxcdi1fb:GBR24,VGA-SVGA di1_primary vga ip=none pmem=128M,64M fbmem=28M gpu_memory=128M vmalloc=576M
The VGA worked fine. In hdmi display resolution detected as 720p but the UI is not using the complete display area. If the hdmi is set at 720p and booted in single display mode it uses the enire display area. what might be the reason for this?
hi,
When the second display(fb1) is connected, the UI and Video are output to the 2nd display. Or it's output to 1st display.
That may be a way to switch fb0/fb1. YOu can refer to "rw.SECOND_DISPLAY_CONNECTED" of "hardware/mx5x/libgralloc/framebuffer.cpp".
Hi Max,
We need to get same display in both vga and hdmi. It is slightly different from that of the dual display feature included in the bsp. In dual display UI is available in both displays but video playback happens only in the primary display. We need both UI and video playback available in either one of the displays at a time.
What is the significance of the rw.SECOND_DISPLAY_CONNECTED? Does it change dynamically or only at boot time? Can it be used to to enable the corresponding display out?
Is it possible to do like this…
1.boot the device in dual display mode, vga as first display and hdmi as second display
2.check the value of rw.SECOND_DISPLAY_CONNECTED inorder to identify whether hdmi display is connected or not.
3.if not, display through the vga display alone
4.if yes,display through the hdmi display alone.
In my tests the value of rw.SECOND_DISPLAY_CONNECTED changed randomly. Please verify.
I would also like to know whether display identification and configuration can be controlled during boot time using bootscripts.
Thanking you for the support,
Mathews Paul