uint16_t *bmp_logo_palette;
uint32_t size;
uint16_t linesize;
+ int stride;
char *cmap_base;
char *src = bmp_addr;
char *dst = pdst;
pr_info("unsupport bit=%d now\n", infoheader.bitcount);
break;
case 24:
+ stride = ALIGN(*width * 3, 4);
if (flip)
- src += (*width) * (*height - 1) * 3;
+ src += stride * (*height - 1);
for (i = 0; i < *height; i++) {
memcpy(dst, src, 3 * (*width));
- dst += *width * 3;
- src += *width * 3;
+ dst += stride;
+ src += stride;
if (flip)
- src -= *width * 3 * 2;
+ src -= stride * 2;
}
*bits = 24;
if (dev_drv->uboot_logo &&
uboot_logo_offset && uboot_logo_base) {
- int width, height, bits;
+ int width, height, bits, xvir;
phys_addr_t start = uboot_logo_base + uboot_logo_offset;
unsigned int size = uboot_logo_size - uboot_logo_offset;
unsigned int nr_pages;
xact, yact, width, height);
return 0;
}
+ xvir = ALIGN(width * bits, 1 << 5) >> 5;
ymirror = 0;
local_irq_save(flags);
if (dev_drv->ops->wait_frame_start)
dev_drv->ops->post_dspbuf(dev_drv,
main_fbi->fix.smem_start,
rk_fb_data_fmt(0, bits),
- width, height, width * bits >> 5,
+ width, height, xvir,
ymirror);
}
if (dev_drv->iommu_enabled) {
unsigned int nr_pages;
struct page **pages;
char *vaddr;
- int align = 0;
+ int align = 0, xvir;
dev_drv->ops->get_dspbuf_info(dev_drv, &xact,
&yact, &format,
kfree(pages);
vunmap(vaddr);
+ xvir = ALIGN(xact * rk_fb_pixel_width(format),
+ 1 << 5) >> 5;
local_irq_save(flags);
if (dev_drv->ops->wait_frame_start)
dev_drv->ops->wait_frame_start(dev_drv, 0);
main_fbi->fix.smem_start +
(y_mirror ? logo_len : 0),
format, xact, yact,
- xact * rk_fb_pixel_width(format) >> 5,
+ xvir,
y_mirror);
if (dev_drv->iommu_enabled) {
rk_fb_poll_wait_frame_complete();