From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 7 Nov 2012 14:26:39 +0100 Subject: [U-Boot] [PATCH v3 1/2] video: atmel: implement lcd_setcolreg funtion In-Reply-To: <5099B8DE.1010604@gmail.com> References: <1351865915-8238-1-git-send-email-andreas.devel@googlemail.com> <201211062354.33409.marex@denx.de> <5099B8DE.1010604@gmail.com> Message-ID: <201211071426.39522.marex@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 Bo Shen, > Hi Marek, > > On 11/7/2012 6:54, Marek Vasut wrote: > > Dear Andreas Bie?mann, > > > >> From: Bo Shen > > > > Missing commit message > > > >> Signed-off-by: Bo Shen > >> Signed-off-by: Andreas Bie?mann > >> --- > >> > >> since v2: > >> * add this single patch > >> > >> drivers/video/atmel_hlcdfb.c | 6 ++++++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c > >> index beb7fa3..4110d4d 100644 > >> --- a/drivers/video/atmel_hlcdfb.c > >> +++ b/drivers/video/atmel_hlcdfb.c > >> @@ -51,6 +51,12 @@ short console_row; > >> > >> #define lcdc_readl(reg) __raw_readl((reg)) > >> #define lcdc_writel(reg, val) __raw_writel((val), (reg)) > >> > >> +void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue) > >> +{ > >> + lcdc_writel((red << 16) | (green << 8) | blue, > >> + panel_info.mmio + ATMEL_LCDC_LUT(regno)); > > > > So this is RGB666? Or what are those magic numbers ? > > This is a little different with the driver of atmel_lcdfb.c. > The register for LUT is layout as following: > RCLUT (24 ~ 16), GCLUT (15 ~ 8) and BCLUT (7 ~ 0). > So, use those magic numbers. Good, can you define those magic offsets then please? > More information, you can get from [1] on page 1163. > > 1. http://www.atmel.com/Images/doc11053.pdf [...] Best regards, Marek Vasut