public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] video: Allocate the MXSFB framebuffer aligned
Date: Wed, 10 Jul 2013 15:25:28 +0200	[thread overview]
Message-ID: <51DD60C8.1050500@denx.de> (raw)
In-Reply-To: <1373417525-26947-1-git-send-email-marex@denx.de>

On 10/07/2013 02:52, Marek Vasut wrote:
> Allocate the framebuffer aligned so it can be flushed
> and the flush_dcache_range() function won't complain.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Otavio Salvador <otavio@ossystems.com.br>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  drivers/video/mxsfb.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
> index a6d8ae9..35836e1 100644
> --- a/drivers/video/mxsfb.c
> +++ b/drivers/video/mxsfb.c
> @@ -202,7 +202,8 @@ void *video_hw_init(void)
>  	panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;
>  
>  	/* Allocate framebuffer */
> -	fb = malloc(panel.memSize);
> +	fb = memalign(ARCH_DMA_MINALIGN,
> +		      roundup(panel.memSize, ARCH_DMA_MINALIGN));
>  	if (!fb) {
>  		printf("MXSFB: Error allocating framebuffer!\n");
>  		return NULL;
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

      reply	other threads:[~2013-07-10 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  0:52 [U-Boot] [PATCH] video: Allocate the MXSFB framebuffer aligned Marek Vasut
2013-07-10 13:25 ` Stefano Babic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51DD60C8.1050500@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox