Reprint Please specify source: http://www.cnblogs.com/lihaiping/p/5567141.html
In the process of doing OpenGL testing, according to the forum post, in the use of/bin/fbset-a-nonstd 1-depth 32-rgba "8/0,8/8,8/16,8/24" command, there will be a display of the flower screen problem, Of course, my side of the use of the HDMI output for testing, VGA setting method, another Netizen has posted a solution: http://developer.t-firefly.com/thread-6462-1-1.html, at the same time I am also based on his method to achieve.
Because the output of HDMI is from framebuffer this source, so we modify the color depth only need to modify the framebuffer is OK, the specific operation method is simple:
1) Open drivers\video\rockchip\rk_fb_box.c file,
static struct Fb_var_screeninfo Def_var = {
/*
#if defined (config_logo_linux_bmp)
. Red = {16, 8, 0},
. Green = {8, 8, 0},
. Blue = {0, 8, 0},
. TRANSP = {0, 0, 0},
. nonstd = hal_pixel_format_bgra_8888,
#else
*/
Modefy by LHP---20160607
#if 1//defined (config_logo_linux_bmp)
. Red = {16, 8, 0},
. Green = {8, 8, 0},
. Blue = {0, 8, 0},
. TRANSP = {0, 0, 0},
. nonstd = hal_pixel_format_bgra_8888,
. Bits_per_pixel = 32,
#else
. Red = {11, 5, 0},
. Green = {5, 6, 0},
. Blue = {0, 5, 0},
. TRANSP = {0, 0, 0},
. NONSTD = hal_pixel_format_rgb_565,/* (Ypos<<20+xpos<<8+format) FORMAT */
#endif
. Grayscale = 0,/* (ysize<<20+xsize<<8) */
. Activate = Fb_activate_now,
. accel_flags = 0,
. Vmode = fb_vmode_noninterlaced,
};
2) Modify the Rk_fb_register function:
Modefy by LHP----20160607,use Def_var.bits_per_pixel
/*
#if defined (config_logo_linux_bmp)
Fbi->var.bits_per_pixel = 32;
#else
Fbi->var.bits_per_pixel = 16;
#endif
*/
Annotate the above paragraph with the one we have modified in the previous 1)
===========================
Compile the kernel and the boot is OK.
Solve the problem of OpenGL having a flower screen after setting 32-bit color depth on the firefly_rk3288 Development Board