All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: ARM CLCD: fix dma allocation size
@ 2017-03-08 14:58 ` Sylvain Lemieux
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

From: Liam Beguin <lbeguin@tycoint.com>

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>
---
 drivers/video/fbdev/amba-clcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index 0fab92c62828..ffc2c33c6cef 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -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)
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] video: ARM CLCD: fix dma allocation size
@ 2017-03-08 14:58 ` Sylvain Lemieux
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

From: Liam Beguin <lbeguin@tycoint.com>

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>
---
 drivers/video/fbdev/amba-clcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index 0fab92c62828..ffc2c33c6cef 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -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)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] video: ARM CLCD: fix dma allocation size
  2017-03-08 14:58 ` Sylvain Lemieux
@ 2017-03-28 17:25   ` Sylvain Lemieux
  -1 siblings, 0 replies; 6+ messages in thread
From: Sylvain Lemieux @ 2017-03-28 17:25 UTC (permalink / raw)
  To: linux-arm-kernel

ping

On Wed, 2017-03-08 at 09:58 -0500, Sylvain Lemieux wrote:
> From: Liam Beguin <lbeguin@tycoint.com>
> 
> 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>
> ---
>  drivers/video/fbdev/amba-clcd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
> index 0fab92c62828..ffc2c33c6cef 100644
> --- a/drivers/video/fbdev/amba-clcd.c
> +++ b/drivers/video/fbdev/amba-clcd.c
> @@ -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)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] video: ARM CLCD: fix dma allocation size
@ 2017-03-28 17:25   ` Sylvain Lemieux
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Lemieux @ 2017-03-28 17:25 UTC (permalink / raw)
  To: linux-arm-kernel

ping

On Wed, 2017-03-08 at 09:58 -0500, Sylvain Lemieux wrote:
> From: Liam Beguin <lbeguin@tycoint.com>
> 
> 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>
> ---
>  drivers/video/fbdev/amba-clcd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
> index 0fab92c62828..ffc2c33c6cef 100644
> --- a/drivers/video/fbdev/amba-clcd.c
> +++ b/drivers/video/fbdev/amba-clcd.c
> @@ -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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] video: ARM CLCD: fix dma allocation size
       [not found] ` <CGME20170407143202epcas5p337f2b743793c97abbb5e0c441eaae163@epcas5p3.samsung.com>
@ 2017-04-07 14:31     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-04-07 14:31 UTC (permalink / raw)
  To: linux-arm-kernel


Hi,

On Wednesday, March 08, 2017 09:58:05 AM Sylvain Lemieux wrote:
> From: Liam Beguin <lbeguin@tycoint.com>
> 
> 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>

Patch queued for 4.12, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] video: ARM CLCD: fix dma allocation size
@ 2017-04-07 14:31     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-04-07 14:31 UTC (permalink / raw)
  To: linux-arm-kernel


Hi,

On Wednesday, March 08, 2017 09:58:05 AM Sylvain Lemieux wrote:
> From: Liam Beguin <lbeguin@tycoint.com>
> 
> 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>

Patch queued for 4.12, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-07 14:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 14:58 [PATCH] video: ARM CLCD: fix dma allocation size Sylvain Lemieux
2017-03-08 14:58 ` Sylvain Lemieux
2017-03-28 17:25 ` Sylvain Lemieux
2017-03-28 17:25   ` Sylvain Lemieux
     [not found] ` <CGME20170407143202epcas5p337f2b743793c97abbb5e0c441eaae163@epcas5p3.samsung.com>
2017-04-07 14:31   ` Bartlomiej Zolnierkiewicz
2017-04-07 14:31     ` Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.