video: Allocate the MXSFB framebuffer aligned
Subsystems (2)
PATCH 1/1 video: Allocate the MXSFB framebuffer aligned
Allocate the framebuffer aligned so it can be flushed and the flush_dcache_range() function won't complain.
Signed-off-by Marek Vasut <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Otavio Salvador <[email protected]>
Cc Stefano Babic <[email protected]>
--- drivers/video/mxsfb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/video/mxsfb.c +2 -1
@@ -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 ;
Signature · 1 line
1.7.10.4
PATCH 1/1 video: Allocate the MXSFB framebuffer aligned
Quoted 18 lines · Marek Vasut
Allocate the framebuffer aligned so it can be flushed and the
flush_dcache_range()function won't complain.Signed-off-by Marek Vasut <[email protected]>Cc Anatolij Gustschin <[email protected]>Cc Fabio Estevam <[email protected]>Cc Otavio Salvador <[email protected]>Cc Stefano Babic <[email protected]>--- drivers/video/mxsfb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/video/mxsfb.c +0
-0
drivers/video/mxsfb.c void *video_hw_init(void) · line 209
Quoted 9 lines
drivers/video/mxsfb.c +2
-1@@ -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 <[email protected]>
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================