[U-Boot] [PATCH] video: mxc_ipuv3: fix memory alignment of framebuffer
Marek Vasut
marex at denx.de
Fri Jul 26 21:38:53 CEST 2013
Dear Eric Nelson,
> Hi Marek,
>
> On 07/25/2013 09:27 PM, Marek Vasut wrote:
> > Dear Eric Nelson,
> >
> >> The frame-buffer on i.MX boards needs to be aligned for DMA.
> >>
> >> Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
> >> ---
> >>
> >> drivers/video/mxc_ipuv3_fb.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
> >> index ace226c..ad95831 100644
> >> --- a/drivers/video/mxc_ipuv3_fb.c
> >> +++ b/drivers/video/mxc_ipuv3_fb.c
> >> @@ -416,7 +416,8 @@ static int mxcfb_map_video_memory(struct fb_info
> >> *fbi)
> >>
> >> fbi->fix.line_length;
> >>
> >> }
> >>
> >> - fbi->screen_base = (char *)malloc(fbi->fix.smem_len);
> >> + fbi->screen_base = (char *)memalign(ARCH_DMA_MINALIGN,
> >> + fbi->fix.smem_len);
> >
> > You might want to round-up the length too, like I did in the MXS driver.
>
> Did you really run across a display whose size wasn't a multiple of
> 32, or is this rounding just in muscle-memory for you?
Palm devices with PXA27x (PalmT5, PalmLD, PalmTX) had 484x324 LCDs ;-)
Best regards,
Marek Vasut
More information about the U-Boot
mailing list