reference 1:
BSP version: 11.03 Multimedia Package version: 11.03
1. Install BSP and Multi Media package (11.03 release)
2. Avoid Display Timeout: append the following line to rootfs/etc/oprofile: echo -e -n '\033[9]' > /dev/tty0
3. Set VGA port as the primary display in the kernel command line: video=mxcdi1fb:GBR24,VGA-XGA di1_primary vga
4. Connect a VGA monitor and WVGA display to the MX53 Quick Start
5. Boot Linux on MX53 Quick Start board (NFS is used in this example)
6. Unblank WVGA display (fb1): $ echo 0 > /sys/class/graphics/fb1/blank
7. On the target enter into /dev/shm directory. If the following files are present:
vss_lock vss_shmem
,delete them.
8. On your host, edit the ltib/rootfs/usr/share/vssconfig as following:
- vss device definition
- Master=VGA, Slave=WVGA
- master display
[VGA] type = framebuffer format = RGBP fb_num = 2 main_fb_num = 0 vs_max = 4
- slave display
[WVGA] type = framebuffer format = RGBP fb_num = 1 vs_max = 4
9. Run the Gstreamer pipeline below:
gst-launch filesrc location=file.mp4 ! qtdemux ! mfw_vpudecoder ! mfw_isink display=VGA display-1=WVGA Video is played on the VGA and WVGA panels. A 720p file can be played at the same time.
【mark】关于echo 0 > /sys/class/graphics/fb1/blank,我认为此display只有一层。
如果是
[WVGA] type = framebuffer format = RGBP fb_num = 1 main_fb_num = 3 vs_max = 4
即有main有overlay,那么应该是要先将main的ground'的fb进行unblank。
即是:
echo 0 > /sys/class/graphics/fb3/blank,这样再进行非主display显示mfw_isink的video操作时才正常显示视频。
至于,每个display如何对应那两个fb,这个要看内核如何注册。
reference 2
You can try the following solution:
(Thanks to Sario and Fei Chen)
1. UBoot Configuration: (depending on the SoC platform)
bootargs_base=sete bootargs console=ttymxc0,115200
bootargs_comm=sete bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait
bootargs_video_hdmi=sete bootargs ${bootargs} video=mxcdi0fb:RGB24,1024x768M@60 hdmi
bootargs_video_lvds=sete bootargs ${bootargs} video=mxcdi1fb:RGB666,XGA ldb=di1 di1_primary
bootcmd_phil=run setvol; run bootargs_base bootargs_comm bootargs_video_hdmi bootargs_video_lvds; run loadk; bootm
2. Check if display device is ok or not:
dmesg | grep sii
more /sys/class/graphics/fb1/modes
3. Modify vssconfig under /usr/share directory, like below:
[WVGA]
type = framebuffer
format = RGBP
fb_num = 1
vs_max = 4
[DVI]
type = framebuffer
format = RGBP
fb_num = 2
vs_max = 4
Note:
- The names in [] will be used for mfw_isink's display and/or display-1 parameters.
- Make sure to delete /dev/shm/sem.vss_lock and /dev/shm/vss_shmem after modification.
- The format is fourcc of framebuffer format. For 2 display device, there should only be one support color space conversion, so the other device should only support yuv or rgb.
- The fb_num is the framebuffer number for target display device, typical configuration is fb0(GUI) and fb2(Video) on Master device, fb1(Video) on Slave display.
4. Play same video on 2 displays:
gst-launch filesrc location=a.avi typefind=true ! aiurdemux name=d ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_mp3decoder ! alsasink d. ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_vpudecoder ! mfw_isink display=WVGA disp-width=640 disp-height=480 display-1=DVI disp-width-1=640 disp-height-1=480
5. Play different videos on 2 displays:
gst-launch filesrc location=a1.avi typefind=true ! aiurdemux name=d ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_mp3decoder ! alsasink d. ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_vpudecoder ! mfw_isink display=WVGA disp-width=640 disp-height=480 filesrc location=a2.avi typefind=true ! aiurdemux name=d ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_mp3decoder ! alsasink d. ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_vpudecoder ! mfw_isink display=DVI disp-width=640 disp-height=480