Skip to content

Commit

Permalink
video: ARM CLCD: fix dma allocation size
Browse files Browse the repository at this point in the history
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: Liam Beguin <lbeguin@tycoint.com>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  • Loading branch information
Liam Beguin authored and Bartlomiej Zolnierkiewicz committed Apr 7, 2017
1 parent 6f9655b commit 9a1c779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/fbdev/amba-clcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb)
if (err)
return err;

framesize = fb->panel->mode.xres * fb->panel->mode.yres *
fb->panel->bpp / 8;
framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres *
fb->panel->bpp / 8);
fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize,
&dma, GFP_KERNEL);
if (!fb->fb.screen_base)
Expand Down

0 comments on commit 9a1c779

Please sign in to comment.