thanks for reminding me modify your sample code.
this is part of my code below:
retval = ioctl(fb1, FBIOGET_VSCREENINFO, &fb_var);
...
fb_var.xres = 1920;
fb_var.yres = 1080;
fb_var.bits_per_pixel = 32;
fb_var.activate |= FB_ACTIVATE_FORCE;
fb_var.nonstd = v4l2_fourcc('B', 'G', 'R','A');
fb_var.red.offset = 16;
fb_var.red.length = 8;
fb_var.green.offset = 8;
fb_var.green.length = 8;
fb_var.blue.offset = 0;
fb_var.blue.length = 8;
fb_var.transp.offset = 24;
fb_var.transp.length = 8;
fb_var.xres_virtual = fb_var.xres;
fb_var.yres_virtual = fb_var.yres * 3;
fb_var.yoffset = 0;
retval = ioctl(fb1, FBIOPUT_VSCREENINFO, &fb_var);
...
loc_alpha.enable = 1;
loc_alpha.alpha_in_pixel = 1;
retval = ioctl(fb1, MXCFB_SET_LOC_ALPHA, &loc_alpha);
...
ioctl(fb1, MXCFB_WAIT_FOR_VSYNC, 0);
ioctl(fb1, FBIOBLANK, FB_BLANK_UNBLANK);
after running this code, the background is black still.
the fb1 settings is :
# fbset -fb /dev/fb1 -s
mode "1920x1080-2"
# D: 4.608 MHz, H: 2.400 kHz, V: 2.222 Hz
geometry 1920 1080 1920 2160 32
timings 217013 0 0 0 0 0 0
accel false
rgba 8/16,8/8,8/0,8/24
endmode
#
and some settings of fb0 is changed.
before running, the settings of fb0 is :
# fbset -s -fb /dev/fb0
mode "1920x1080-60"
# D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz
geometry 1920 1080 1920 1080 32
timings 6734 148 88 36 4 44 5
accel false
rgba 8/16,8/8,8/0,8/24
endmode
#
after, it is :
# fbset -fb /dev/fb0 -s
mode "1920x1080-60"
# D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz
geometry 1920 1080 1920 3240 16
timings 6734 148 88 36 4 44 5
accel false
rgba 5/11,6/5,5/0,0/0
endmode
#
the "bpp" ,"vyres" "rgba" is changed .
i also tried to copy all settings of fb0 to fb1, it worked the same.