video: ARM CLCD: fix dma allocation size
PATCH 1/1 video: ARM CLCD: fix dma allocation size
From: Liam Beguin <[email protected]>
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.
--- drivers/video/fbdev/amba-clcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/amba-clcd.c +2 -2
@@ -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)
Signature · 1 line
2.11.0
PATCH 1/1 video: ARM CLCD: fix dma allocation size
ping
Quoted 35 lines · Sylvain Lemieux
From: Liam Beguin <[email protected]>
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 connectThe 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 <[email protected]>Signed-off-by Sylvain Lemieux <[email protected]>--- drivers/video/fbdev/amba-clcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/video/fbdev/amba-clcd.c +2
-2@@ -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)
PATCH 1/1 video: ARM CLCD: fix dma allocation size
In reply to Sylvain LemieuxHi,
Quoted 11 lines · Sylvain Lemieux
From: Liam Beguin <[email protected]>
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
Quoted 5 lines
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 <[email protected]>Signed-off-by Sylvain Lemieux <[email protected]>
Patch queued for 4.12, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics