imx6: alpha-blending fb0 with an overlay buffer.

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

imx6: alpha-blending fb0 with an overlay buffer.

2,859 Views
anr
Contributor I

I have a Qt5-application using eglfs that uses fb0. I want to alpha-blend it with an overlay buffer filled with a color. What is the proper/best way to solve this?

I tried creating an ipu_task with /dev/fb0 as input, an overlay buffer, and /dev/fb1 as output. It does not work, however, and I'm unsure if I'm on the right track.

If I should use /dev/fb1 at all, what is the proper way of setting the same modes on /dev/fb0 and /dev/fb1? Based on the output from fbset on /dev/fb0 I ran "fbset -fb /dev/fb1 -g 800 480 800 1440 32", which seemed to work, but is that the proper way to do it? Is that what I should do if/when I want to switch to another display timing?

0 Kudos
3 Replies

1,817 Views
anr
Contributor I

Turned out I was overcomplicating this. I did not need an ipu_task at all. After filling /dev/fb1 with the desired color and unblanking it, I just did this.

        struct mxcfb_gbl_alpha a;
        a.enable = 1;
        a.alpha = alpha_value;
        int err = ioctl(fd_fb, MXCFB_SET_GBL_ALPHA, &a);
        if (err) {
            printf("Could not set alpha\n");
            return -1;
        }

0 Kudos

1,817 Views
igorpadykov
NXP Employee
NXP Employee

Hi Anders

may be helpful to look at usage blending examples in attached

Linux Guide sect.7.3.16 Video composition, sect.8.2 G2D-imx-samples and

ipu-examples release notes - v0.1 

[meta-freescale] IPU alpha blending problems on mx6 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,817 Views
anr
Contributor I

Thanks, I'll look into those. The fbset worked much better after I added an /etc/fb.modes with full display timings.

0 Kudos