Switching fb0 and fb1 functionality

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

Switching fb0 and fb1 functionality

2,755 Views
jignesh1
Contributor I

Hi All,

 

Processor : IMX6Q (MCIMX6Q6AVT10AD)

Linux Kernel : 4.9.11

Kernel reference : wandboard_imx_4.9.11_1.0.0_ga

  • We are making IMX6Q based product. In this product we are using 240x320 LCD.
  • Due to our requirement of displaying everything in Landscape mode we using IPU for rotation purpose. We took reference of patches available on thread (https://community.nxp.com/message/1035141?commentID=1035141&et=watches.email.thread#comment-1035141 )
  • In our application we are displaying GUI on fb0 and video fb1 layer.
  • Due to some visual appearance related issue we want to switch display on fb0 and fb1. Means we want to display video on fb0 layer and GUI on fb1 layer. 
  • When I tried to do in application video on fb0 layer looks very bad. (This application is using IPU_QUEUE_TASK API to reduce CPU overhead)
  • When I tried to use another application which uses VIDIOC_QBUF,  VIDIOC_DQBUF APIs (increase CPU overhead) instead of IPU task and uses video nodes (/dev/video16, /dev/video17 )  instead of fb nodes (/dev/fb0, /dev/fb1). Video looks good on both video nodes (/dev/vide016, /dev/video17)
  • My question is what is difference between displaying video on video node (/dev/vide016) and fb node (/dev/fb0). Please note that  on fb1 node I am able to display correct video. Also what is difference between displaying video on fb0 and fb1.
  • Do I have to do any extra configurations?

May be description looks little confusing so let me know if you have any questions or query or any more information is required from my side.

Thanks,

Jignesh

Labels (1)
Tags (2)
0 Kudos
3 Replies

1,936 Views
joanxie
NXP TechSupport
NXP TechSupport

for default settings, dev/fb0  is for BG(UI) and dev/fb1 for FG(video playing),if you need to switch them, try to refer to it:

"The IPU DP has two plane: full plane(fb0) and partial plane(fb1), their order can be changed in register IPUx_DP_COM_CONF_SYNC, bit 1 DP_GWSEL_SYNC, when you set alpha to fb0, then the BSP will set fb0 to background, this is default setting for BSP. The customer can also set alpha to fb1, in this case, fb1 will be the background."

0 Kudos

1,936 Views
jignesh1
Contributor I

Hi Joan,

Thanks for input. You are correct, I have verified it and it is working as per your input.

Our QT GUI is running on FB0. Preview application running on FB1 and we set global alpha 0 so that default GUI is on top. Now I want to set transparency of GUI using color key or local alpha. So that on specified window only preview on FB1 is visible on LCD.

Currently only global alpha setting works for transparency using ioctl  "MXCFB_SET_GBL_ALPHA".

I tried color key using following source code on FB0 layer to make black graphics pixel as transparent for overlay but it is not working.

        struct mxcfb_color_key ckey;
        ckey.enable = 1;
        ckey.color_key = 0x000000;
        result = ioctl( _fd, MXCFB_SET_CLR_KEY, & ckey );

Also I tried local alpha of graphics using following source code on FB0 layer but this also not working.

        struct mxcfb_loc_alpha l_alpha;
        l_alpha.enable = 1;
        l_alpha.alpha_in_pixel = 1;
        result = ioctl( _fd, MXCFB_SET_LOC_ALPHA, & l_alpha );

Can you please help us to enable local alpha and color key setting ?

Thanks,

Jignesh Patel

0 Kudos

1,936 Views
jignesh1
Contributor I

I manage to get transparency working. I set global alpha 255 and color key then it works as our requirement. So marking this thread as done

0 Kudos