info->var.yres_virtual = info->var.yres;
#if defined(CONFIG_LOGO_LINUX_BMP)
info->var.bits_per_pixel = 32;
- info->var.xres_virtual = ALIGN_64BYTE_ODD_TIMES(info->var.xres,
- ALIGN_PIXEL_64BYTE_RGB8888);
#else
info->var.bits_per_pixel = 16;
- info->var.xres_virtual = ALIGN_64BYTE_ODD_TIMES(info->var.xres,
- ALIGN_PIXEL_64BYTE_RGB565);
#endif
info->fix.line_length =
extend_info->fix.id);
extend_win = extend_dev_drv->win[extend_win_id];
}
+
pixel_width = rk_fb_pixel_width(win->format);
- /* align as 64 bytes(16*4) in an odd number of times */
- if ((win->format == ARGB888) || (win->format == ABGR888)
- || (win->format == XBGR888)) {
- var->xres_virtual = ALIGN_64BYTE_ODD_TIMES(var->xres,
- ALIGN_PIXEL_64BYTE_RGB8888);
- xvir = var->xres_virtual;
- } else if (win->format == RGB565) {
- var->xres_virtual = ALIGN_64BYTE_ODD_TIMES(var->xres,
- ALIGN_PIXEL_64BYTE_RGB565);
- xvir = var->xres_virtual;
- } else {
- xvir = var->xres_virtual;
- }
vir_width_bit = pixel_width * xvir;
/* pixel_width = byte_num * 8 */
stride_32bit_1 = ALIGN_N_TIMES(vir_width_bit, 32) / 8;
if ((0 == var->xres_virtual) || (0 == var->yres_virtual) ||
(0 == var->xres) || (0 == var->yres) || (var->xres < 16) ||
- ((16 != var->bits_per_pixel) && (32 != var->bits_per_pixel))) {
+ ((16 != var->bits_per_pixel) &&
+ (32 != var->bits_per_pixel) &&
+ (24 != var->bits_per_pixel))) {
dev_err(info->dev, "%s check var fail 1:\n"
"xres_vir:%d>>yres_vir:%d\n"
"xres:%d>>yres:%d\n"
fb_data_fmt = rk_fb_data_fmt(data_format, var->bits_per_pixel);
pixel_width = rk_fb_pixel_width(fb_data_fmt);
- /* align as 64 bytes(16*4) in an odd number of times */
- if ((fb_data_fmt == ARGB888) || (fb_data_fmt == ABGR888)
- || (fb_data_fmt == XBGR888)) {
- var->xres_virtual = ALIGN_64BYTE_ODD_TIMES(var->xres,
- ALIGN_PIXEL_64BYTE_RGB8888);
- xvir = var->xres_virtual;
- } else if (fb_data_fmt == RGB565) {
- var->xres_virtual = ALIGN_64BYTE_ODD_TIMES(var->xres,
- ALIGN_PIXEL_64BYTE_RGB565);
- xvir = var->xres_virtual;
- } else {
- xvir = var->xres_virtual;
- }
vir_width_bit = pixel_width * xvir;
/* pixel_width = byte_num * 8 */
stride_32bit_1 = ALIGN_N_TIMES(vir_width_bit, 32) / 8;
(fbi->var.xres << 8) + (fbi->var.yres << 20);
#if defined(CONFIG_LOGO_LINUX_BMP)
fbi->var.bits_per_pixel = 32;
- fbi->var.xres_virtual = ALIGN_64BYTE_ODD_TIMES(fbi->var.xres,
- ALIGN_PIXEL_64BYTE_RGB8888);
#else
fbi->var.bits_per_pixel = 16;
- fbi->var.xres_virtual = ALIGN_64BYTE_ODD_TIMES(fbi->var.xres,
- ALIGN_PIXEL_64BYTE_RGB565);
#endif
fbi->fix.line_length =
(fbi->var.xres_virtual) * (fbi->var.bits_per_pixel >> 3);