AlanZhang

How to output 4 x video + 1 x 3D demo + 1 x UI simultaneously on i.MX6Q ARM2 board running BSP 120501 release -blog archive

Discussion created by AlanZhang Employee on Jul 20, 2012
Latest reply on Jan 24, 2013 by John Turnur

Recently, some requirements of demo multi-video decoding output + multi-UI on i.MX6Q ARM2 board are come up to desk, so I tried several days on this subject, and finished the test. Following are the summary.

1. Configurations

1.1 Hardware configuration

    * i.MX6Q ARM2 board w/ 2 x LVDS panel, 1 x HDMI TV, and 1 x LCD panel.

1.2. Software configuration

    * board-mx6q_arm2.c

static struct fsl_mxc_hdmi_core_platform_data hdmi_core_data = {
    .ipu_id        = 1,
    .disp_id    = 1,
};

static struct fsl_mxc_lcd_platform_data lcdif_data = {
    .ipu_id        = 0,
    .disp_id    = 0,
    .default_ifmt    = IPU_PIX_FMT_RGB565,
};

static struct fsl_mxc_ldb_platform_data ldb_data = {
    .ipu_id        = 1,
    .disp_id    = 0,
    .ext_ref    = 1,
    .mode        = LDB_SEP0,
    .sec_ipu_id    = 0,
    .sec_disp_id    = 1,
};
static struct mipi_dsi_platform_data mipi_dsi_pdata = {
    .ipu_id        = 1,
    .disp_id    = 1,
    .lcd_panel    = "TRULY-WVGA",
    .reset        = mx6_arm2_reset_mipi_dsi,
};

static struct ipuv3_fb_platform_data sabr_fb_data[] = {
    { /*fb0*/
    .disp_dev        = "ldb",
    .interface_pix_fmt    = IPU_PIX_FMT_RGB666,
    .mode_str        = "LDB-XGA",
    .default_bpp        = 16,
    .int_clk        = false,
    }, {
    .disp_dev        = "mipi_dsi",
    .interface_pix_fmt    = IPU_PIX_FMT_RGB24,
    .mode_str        = "TRULY-WVGA",
    .default_bpp        = 24,
    .int_clk        = false,
    }, {
    .disp_dev        = "ldb",
    .interface_pix_fmt    = IPU_PIX_FMT_RGB666,
    .mode_str        = "LDB-XGA",
    .default_bpp        = 16,
    .int_clk        = false,
    }, {
    .disp_dev        = "lcd",
    .interface_pix_fmt    = IPU_PIX_FMT_RGB565,
    .mode_str        = "CLAA-WVGA",
    .default_bpp        = 16,
    .int_clk        = false,
    }
};

The above board configuration will result in :

                          +--------> IPU1 DP-BG : /dev/fb0 <----> /dev/video16

LVDS #0  -------+

                          +--------> IPU1 DP-FG : /dev/fb1 <-----> /dev/video17


HDMI       --------- IPU1 DC : /dev/fb2 <-----> /dev/video18

 

                          +--------> IPU0 DP-BG : /dev/fb3 <----> /dev/video19

LVDS #1  -------+

                          +--------> IPU0 DP-FG : /dev/fb4 <-----> /dev/video20

 

LCD         --------- IPU0 DC : /dev/fb5 <-----> /dev/video21

 

1.3. U-BOOT kernel configuration parameter

    * In my test environment, I uses NFS, so the setting is :

setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24'

NOTE: Only HDMI is set, no need to set other video devices.

 

2. Runtime setting

    Execute the following shell commands will show up 4 x Video, 1 x 3D demo, and 1 x UI.

#!/bin/bash

# df_andi --dfb:mode=1024x768 --dfb:fbdev=/dev/fb0,session=0 &
# df_dok  --dfb:mode=1024x768 --dfb:fbdev=/dev/fb3,session=1 --dfb:no-vt --dfb:no-cursor &

# LVDS #0
insmod /lib/modules/3.0.15-1453-g5ac8a7a/kernel/drivers/mxc/gpu-viv/galcore.ko ; /opt/viv_samples/es20/vv_launcher/vv_launcher &
gst-launch filesrc location=/unit_tests/ts_test.mp4 typefind=true ! aiurdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! mfw_v4lsink device="/dev/video17" axis-top=100 axis-left=100 disp-width=500 disp-height=400 demux. ! queue max-size-buffers=0 max-size-time=0 ! beepdec ! audioconvert ! 'audio/x-raw-int, channels=2' ! alsasink &

# HDMI
gst-launch filesrc location=/unit_tests/philips.mp4 typefind=true ! aiurdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! mfw_v4lsink device="/dev/video18" demux. ! queue max-size-buffers=0 max-size-time=0 ! beepdec ! audioconvert ! 'audio/x-raw-int, channels=2' ! alsasink &

# LCD
gst-launch filesrc location=/unit_tests/D1.mp4 typefind=true ! aiurdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! mfw_v4lsink device="/dev/video21" demux. ! queue max-size-buffers=0 max-size-time=0 ! beepdec ! audioconvert ! 'audio/x-raw-int, channels=2' ! alsasink &

# LVDS #1
# gst-launch filesrc location=/unit_tests/ts_test.mp4 typefind=true ! aiurdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! mfw_v4lsink device="/dev/video20" axis-top=100 axis-left=100 disp-width=500 disp-height=400  demux. ! queue max-size-buffers=0 max-size-time=0 ! beepdec ! audioconvert ! 'audio/x-raw-int, channels=2' ! alsasink &
gst-launch videotestsrc ! mfw_v4lsink device="/dev/video19" &
sleep 8
echo "Start to output on LVDS #1 overlay"
cd /unit_tests ; ./mxc_ipudev_test.out -C ./test_rgb_ipudev_config ./test.rgb &

 

For the sake of convenient test, the shell script is attached here.

run_multiDisp

Attachments

Outcomes