From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Matthias_Wei=DFer?= Date: Mon, 18 Jan 2010 15:06:07 +0100 Subject: [U-Boot] [PATCH] Add support for Jade display controller In-Reply-To: <4B51E9C2.6080206@windriver.com> References: <1263230330-19728-1-git-send-email-matthias.weisser@graf-syteco.de> <1263230330-19728-2-git-send-email-matthias.weisser@graf-syteco.de> <1263230330-19728-3-git-send-email-matthias.weisser@graf-syteco.de> <4B51E9C2.6080206@windriver.com> Message-ID: <4B546ACF.5050901@arcor.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 16.01.2010 17:30, schrieb Tom: > Instead of adding CONFIG_VIDEO_JADEGDC, define VIDEO_FB_16BPP_WORD_SWAP > in your board config file or a more appropriate file. Done. >> +/* >> + * Graphic Device >> + */ >> +GraphicDevice jadegdc; > > It does not look like this global is accessed output of this function > It should be declared static. Done. >> + >> +void *video_hw_init(void) >> +{ >> + GraphicDevice *pGD =&jadegdc; >> + struct ctfb_res_modes var_mode[2]; >> + unsigned long *vid; >> + unsigned long div; >> + unsigned long dspBase[2]; >> + char *penv; >> + int bpp; >> + int i, j; >> + >> + memset(pGD, 0, sizeof(GraphicDevice)); >> + >> + dspBase[0] = JADE_GDC_DISP0_PHYS_BASE; >> + dspBase[1] = JADE_GDC_DISP1_PHYS_BASE; >> + >> + pGD->gdfIndex = GDF_15BIT_555RGB; >> + pGD->gdfBytesPP = 2; >> + >> + pGD->memSize = VIDEO_MEM_SIZE; >> + pGD->frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE; >> + vid = (unsigned long *)pGD->frameAdrs; >> + >> + for (i = 0; i< 2; i++) { >> + char varName[32]; >> + u32 dcm1, dcm2, dcm3; >> + u16 htp, hdp, hdb, hsp, vtr, vsp, vdp; >> + u8 hsw, vsw; >> + u32 l2m, l2em, l2oa0, l2da0, l2oa1, l2da1; >> + u16 l2dx, l2dy, l2wx, l2wy, l2ww, l2wh; >> + >> + sprintf(varName, "gs_dsp_%d_param", i); >> + >> + penv = getenv(varName); >> + if (penv == NULL) { >> + penv = getenv("videomode"); >> + if ((i == 1) || (penv == NULL)) >> + continue; > > This check for (i == 1) should be moved before the getenv Done. >> +/* >> + * Set a RGB color in the LUT >> + */ >> +void video_set_lut(unsigned int index, unsigned char r, >> + unsigned char g, unsigned char b) >> +{ > > If leaving this a noop is intentional, add a comment. Done. Thanks for checking. Regards, Matthias