From: Wolfgang Denk Date: Tue, 22 Jul 2014 11:25:09 +0200 Subject: [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support In-Reply-To: <1405989293-6629-1-git-send-email-marex@denx.de> References: <1405989293-6629-1-git-send-email-marex@denx.de> Message-ID: <20140722092509.685D53822C9@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Marek, In message <1405989293-6629-1-git-send-email-marex@denx.de> you wrote: > Add basic framebuffer driver for the S3C24xx family of CPUs. > > Signed-off-by: Marek Vasut > Cc: Anatolij Gustschin > Cc: Kyungmin Park > Cc: Lukasz Majewski > Cc: Minkyu Kang > Cc: Vladimir Zapolskiy > --- > drivers/video/Makefile | 1 + > drivers/video/cfb_console.c | 2 +- > drivers/video/s3c-fb.c | 172 ++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 174 insertions(+), 1 deletion(-) > create mode 100644 drivers/video/s3c-fb.c > > diff --git a/drivers/video/Makefile b/drivers/video/Makefile > index 945f35d..7441783 100644 > --- a/drivers/video/Makefile > +++ b/drivers/video/Makefile > @@ -33,6 +33,7 @@ obj-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o videomodes.o > obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o > obj-$(CONFIG_VIDEO_IPUV3) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o > obj-$(CONFIG_VIDEO_MXS) += mxsfb.o videomodes.o > +obj-$(CONFIG_VIDEO_S3C) += s3c-fb.o videomodes.o > obj-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o > obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o > obj-$(CONFIG_VIDEO_SED13806) += sed13806.o can you please fix the sort oder of this ist? Thanks. ... > + /* Suck display configuration from "videomode" variable */ > + penv = getenv("videomode"); > + if (!penv) { > + puts("S3CFB: 'videomode' variable not set!\n"); > + return NULL; > + } > + > + bpp = video_get_params(&mode, penv); Should there not be some error handling in case we pass invalid data? > + /* Allocate framebuffer */ > + fb = memalign(S3CFB_ALIGN, roundup(panel.memSize, S3CFB_ALIGN)); > + if (!fb) { > + printf("S3CFB: Error allocating framebuffer!\n"); > + return NULL; > + } Should we not use the gd->fb_base frame buffer allocation as provided in lib/board.c ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Bus error -- please leave by the rear door.