return 0;
} else if (dev_drv->uboot_logo && uboot_logo_base) {
u32 start = uboot_logo_base;
- u32 start_base = start;
int logo_len, i=0;
int y_mirror = 0;
unsigned int nr_pages;
struct page **pages;
char *vaddr;
+ int align = 0;
dev_drv->ops->get_dspbuf_info(dev_drv, &xact,
&yact, &format,
if (y_mirror)
start -= logo_len;
- nr_pages = uboot_logo_size >> PAGE_SHIFT;
+ align = start % PAGE_SIZE;
+ start -= align;
+ nr_pages = PAGE_ALIGN(logo_len + align) >> PAGE_SHIFT;
pages = kzalloc(sizeof(struct page) * nr_pages,
GFP_KERNEL);
while (i < nr_pages) {
pgprot_writecombine(PAGE_KERNEL));
if (!vaddr) {
pr_err("failed to vmap phy addr 0x%x\n",
- start_base);
+ start);
return -1;
}
- memcpy(main_fbi->screen_base, vaddr, logo_len);
+ memcpy(main_fbi->screen_base, vaddr + align, logo_len);
kfree(pages);
vunmap(vaddr);