hdmi+bt656 can't display in same ipu(imx6q,android-4.4.3)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

hdmi+bt656 can't display in same ipu(imx6q,android-4.4.3)

Jump to solution
1,155 Views
wangzhigang
Contributor III

hi,everyone

I have a problem about hdmi+bt656 display in the same ipu.Our env is linux-3.10.53,android-4.4.3,the IC is imx6q.

we want to use ipu1 to output 1080p (lvds in split mode),and use ipu2 di0 to output s-video,and use ipu2 di1 to output hdmi(1080p).

1、I patch "0001-Support-BT656-and-BT1120-output-for-iMX6-ipuv3.patch",

2、change the file ipu_disp.c, function ipu_init_sync_panel():

   rounded_pixel_clk =

    clk_round_rate(ipu->di_clk[disp], pixel_clk);

+   if(pixel_fmt == IPU_PIX_FMT_BT656)

+    rounded_pixel_clk = 108000000;

   ret = clk_set_rate(ipu->di_clk[disp],

      rounded_pixel_clk);

   if (ret) {

    dev_err(ipu->dev,

     "set di clk rate error:%d\n", ret);

    return ret;

   }

   dev_dbg(ipu->dev, "di clk:%d\n", rounded_pixel_clk);

   ret = clk_set_parent(ipu->pixel_clk_sel[disp],

      ipu->di_clk[disp]);

 

3、change the file clk-imx6q.c,function imx6q_clocks_init

  //imx_clk_set_parent(clk[ipu2_di0_pre_sel], clk[pll5_video_div]);

  imx_clk_set_parent(clk[ipu2_di0_pre_sel], clk[pll3_pfd1_540m]);

4、change the dts file in arch/arm/boot/dts/imx6qdl-sabresd.dtsi

  lcd@0 {

  compatible = "fsl,lcd";

  ipu_id = <1>;

  disp_id = <0>;

  default_ifmt = "BT656";

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_ipu2_2>;

  status = "okay";

};

5、the bootargs is :

setenv bootargs console=ttymxc0,115200 noinitrd init=/init rw root=179:5  video=mxcfb0:dev=ldb,if=RGB666,bpp=32 video=mxcfb1:dev=lcd,BT656-NTSC,if=BT656,bpp=32 video=mxcfb2:dev=hdmi,1920x1080M@60,if=RGB24,fbpix=RGB565   fbmem=64M,64M,64M fb0base=0x27b00000 androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale

now I success to display LVDS(ipu1 in split mode) + svideo(bt656+adv7391),but the hdmi can not dispaly.

================================

so I change the source file in mxc_ipu3_fb.c,function mxcfb_probe

/* first user uses DP with alpha feature */

if (!g_dp_in_use[mxcfbi->ipu_id]) {

  mxcfbi->ipu_ch_irq = IPU_IRQ_BG_SYNC_EOF;

  mxcfbi->ipu_ch_nf_irq = IPU_IRQ_BG_SYNC_NFACK;

  mxcfbi->ipu_alp_ch_irq = IPU_IRQ_BG_ALPHA_SYNC_EOF;

  mxcfbi->ipu_ch = MEM_BG_SYNC;

  /* Unblank the primary fb only by default */

  ....

  ...

}

else

{

  mxcfbi->ipu_ch_irq = IPU_IRQ_DC_SYNC_EOF;

  mxcfbi->ipu_ch_nf_irq = IPU_IRQ_DC_SYNC_NFACK;

  mxcfbi->ipu_alp_ch_irq = -1;

  mxcfbi->ipu_ch = MEM_DC_SYNC;

  mxcfbi->cur_blank = mxcfbi->next_blank = FB_BLANK_POWERDOWN;

  ret = mxcfb_register(fbi);

  if (ret < 0)

  goto mxcfb_register_failed;

}

change to

if ((mxcfbi->ipu_id == 1) && of_machine_is_compatible("fsl,imx6q"))

{

  /* first user uses DC */

  if (!g_dc_in_use[mxcfbi->ipu_id]) // g_dc_in_use[2] is defined same as g_dp_in_use

  {

  mxcfbi->ipu_ch_irq = IPU_IRQ_DC_SYNC_EOF;

  mxcfbi->ipu_ch_nf_irq = IPU_IRQ_DC_SYNC_NFACK;

  mxcfbi->ipu_alp_ch_irq = -1;

  mxcfbi->ipu_ch = MEM_DC_SYNC;

  mxcfbi->cur_blank = mxcfbi->next_blank = FB_BLANK_POWERDOWN;

  ret = mxcfb_register(fbi);

  if (ret < 0)

  goto mxcfb_register_failed;

  g_dc_in_use[mxcfbi->ipu_id] = true;

  }

  else

  {

  mxcfbi->ipu_ch_irq = IPU_IRQ_BG_SYNC_EOF;

  mxcfbi->ipu_ch_nf_irq = IPU_IRQ_BG_SYNC_NFACK;

  mxcfbi->ipu_alp_ch_irq = IPU_IRQ_BG_ALPHA_SYNC_EOF;

  ...

  ...

}

else

{

  XXX;// copy old code for ipu0

}

and the bootargs is :

setenv bootargs console=ttymxc0,115200 noinitrd init=/init rw root=179:5  video=mxcfb0:dev=ldb,if=RGB666,bpp=32 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24,fbpix=RGB565 video=mxcfb2:dev=lcd,BT656-NTSC,if=BT656,bpp=32   fbmem=64M,64M,64M fb0base=0x27b00000 androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale

and the lvds + hdmi is OK,but s-video can not dispaly(the TV display device can detect signal,but the screen is all gray),the bt656's clk is 27Mhz, data bus have signal too.

It sames like I cannot display hdmi + bt656 in same ipu,can you help me?

Best wishes!

Tags (1)
0 Kudos
1 Solution
523 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Default, the Android will draw UI to two displays, so for third display, you need draw it by your applications.

View solution in original post

0 Kudos
2 Replies
524 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Default, the Android will draw UI to two displays, so for third display, you need draw it by your applications.

0 Kudos
523 Views
wangzhigang
Contributor III

Yes,you are right!

Thanks for your help!

0 Kudos