diff options
-rw-r--r-- | board/freescale/common/fsl_diu_fb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/freescale/common/fsl_diu_fb.c b/board/freescale/common/fsl_diu_fb.c index 75f782e..4d4b0a1 100644 --- a/board/freescale/common/fsl_diu_fb.c +++ b/board/freescale/common/fsl_diu_fb.c @@ -242,10 +242,10 @@ int fsl_diu_init(int xres, printf("Unable to allocate fb memory 1\n"); return -1; } - } else { - memset(info->screen_base, 0, info->smem_len); } + memset(info->screen_base, 0, info->smem_len); + dr.diu_reg->desc[0] = (unsigned int) &dummy_ad; dr.diu_reg->desc[1] = (unsigned int) &dummy_ad; dr.diu_reg->desc[2] = (unsigned int) &dummy_ad; @@ -403,7 +403,7 @@ static int map_video_memory(struct fb_info *info, unsigned long bytes_align) mask = bytes_align - 1; offset = (unsigned long)info->screen_base & mask; if (offset) { - info->screen_base += offset; + info->screen_base += (bytes_align - offset); info->smem_len = info->smem_len - (bytes_align - offset); } else info->smem_len = info->smem_len - bytes_align; |