Commit 9a1c779e authored by Liam Beguin's avatar Liam Beguin Committed by Bartlomiej Zolnierkiewicz

video: ARM CLCD: fix dma allocation size

This patch forces the frambuffer size to be aligned on kernel pages.

During the board startup, the splash screed did appear;
the "ts_test" program or our application were not able to start.

The following error message was reported:
error: failed to map framebuffer device to memory.
LinuxFB: driver cannot connect

The issue was discovered, on the LPC32xx platform, during the migration
of the LCD definition from the board file to the device tree.
Signed-off-by: default avatarLiam Beguin <lbeguin@tycoint.com>
Signed-off-by: default avatarSylvain Lemieux <slemieux@tycoint.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 6f9655b1
...@@ -881,8 +881,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb) ...@@ -881,8 +881,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb)
if (err) if (err)
return err; return err;
framesize = fb->panel->mode.xres * fb->panel->mode.yres * framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres *
fb->panel->bpp / 8; fb->panel->bpp / 8);
fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize, fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize,
&dma, GFP_KERNEL); &dma, GFP_KERNEL);
if (!fb->fb.screen_base) if (!fb->fb.screen_base)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment