diff mbox

[U-Boot,v3,1/2] video: atmel: implement lcd_setcolreg funtion

Message ID 1352196829-27879-2-git-send-email-andreas.devel@googlemail.com
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Andreas Bießmann Nov. 6, 2012, 10:13 a.m. UTC
From: Bo Shen <voice.shen@atmel.com>

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
---
since v2:
 * add this single patch

 drivers/video/atmel_hlcdfb.c |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Marek Vasut Nov. 6, 2012, 10:54 p.m. UTC | #1
Dear Andreas Bießmann,

> From: Bo Shen <voice.shen@atmel.com>

Missing commit message

> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
> ---
> 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 ?

> +}
> +
>  void lcd_ctrl_init(void *lcdbase)
>  {
>  	unsigned long value;

Best regards,
Marek Vasut
Bo Shen Nov. 7, 2012, 1:26 a.m. UTC | #2
Hi Marek,

On 11/7/2012 6:54, Marek Vasut wrote:
> Dear Andreas Bießmann,
>
>> From: Bo Shen <voice.shen@atmel.com>
>
> Missing commit message
>
>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
>> ---
>> 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.

More information, you can get from [1] on page 1163.

1. http://www.atmel.com/Images/doc11053.pdf

BRs
Bo Shen

>> +}
>> +
>>   void lcd_ctrl_init(void *lcdbase)
>>   {
>>   	unsigned long value;
>
> Best regards,
> Marek Vasut
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Marek Vasut Nov. 7, 2012, 1:26 p.m. UTC | #3
Dear Bo Shen,

> Hi Marek,
> 
> On 11/7/2012 6:54, Marek Vasut wrote:
> > Dear Andreas Bießmann,
> > 
> >> From: Bo Shen <voice.shen@atmel.com>
> > 
> > Missing commit message
> > 
> >> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> >> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
> >> ---
> >> 
> >> 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
Bo Shen Nov. 8, 2012, 3:06 a.m. UTC | #4
Hi Andreas,

On 11/7/2012 21:26, Marek Vasut wrote:
> Dear Bo Shen,
>
>> Hi Marek,
>>
>> On 11/7/2012 6:54, Marek Vasut wrote:
>>> Dear Andreas Bießmann,
>>>
>>>> From: Bo Shen <voice.shen@atmel.com>
>>>
>>> Missing commit message
>>>
>>>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>>>> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
>>>> ---
>>>>
>>>> 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?

Will you redo your patch series or do I need to implement this and send 
the patch to you again?

Which do you prefer?

Best Regards,
Bo Shen

>> More information, you can get from [1] on page 1163.
>>
>> 1. http://www.atmel.com/Images/doc11053.pdf
>
> [...]
>
> Best regards,
> Marek Vasut
>
Andreas Bießmann Nov. 8, 2012, 7:53 a.m. UTC | #5
Hi Bo,

On 08.11.2012 04:06, Bo Shen wrote:
> Hi Andreas,
> 
> On 11/7/2012 21:26, Marek Vasut wrote:
>> Dear Bo Shen,
>>
>>> Hi Marek,
>>>
>>> On 11/7/2012 6:54, Marek Vasut wrote:
>>>> Dear Andreas Bießmann,
>>>>
>>>>> From: Bo Shen <voice.shen@atmel.com>
>>>>
>>>> Missing commit message
>>>>
>>>>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>>>>> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
>>>>> ---
>>>>>
>>>>> 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?
> 
> Will you redo your patch series or do I need to implement this and send
> the patch to you again?

can you please just send a v4 for this single patch? Add correct
in-reply-to header so we can see it belongs to the series. Thanks in
advance, I'm a bit busy currently.

Best regards

Andreas Bießmann
diff mbox

Patch

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));
+}
+
 void lcd_ctrl_init(void *lcdbase)
 {
 	unsigned long value;