* [PATCH] atmel_lcdfb: fix usage of wrong registers in suspend/resume
@ 2011-06-06 8:50 Hubert Feurstein
2011-06-06 13:24 ` Hubert Feurstein
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Hubert Feurstein @ 2011-06-06 8:50 UTC (permalink / raw)
To: linux-fbdev
I assume the intention was to set the contrast value to 0 and not
the contrast control register (in atmel_lcdfb_suspend). And in
atmel_lcdfb_resume the contrast value should be restored.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
drivers/video/atmel_lcdfb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 4484c72..2ed7ec1 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -1086,7 +1086,7 @@ static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg)
lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
- lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
+ lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, 0);
if (sinfo->atmel_lcdfb_power_control)
sinfo->atmel_lcdfb_power_control(0);
@@ -1105,7 +1105,7 @@ static int atmel_lcdfb_resume(struct platform_device *pdev)
atmel_lcdfb_start(sinfo);
if (sinfo->atmel_lcdfb_power_control)
sinfo->atmel_lcdfb_power_control(1);
- lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, sinfo->saved_lcdcon);
+ lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, sinfo->saved_lcdcon);
/* Enable FIFO & DMA errors */
lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] atmel_lcdfb: fix usage of wrong registers in suspend/resume
2011-06-06 8:50 [PATCH] atmel_lcdfb: fix usage of wrong registers in suspend/resume Hubert Feurstein
@ 2011-06-06 13:24 ` Hubert Feurstein
2012-01-09 15:45 ` Nicolas Ferre
2012-01-09 16:23 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR " Nicolas Ferre
2 siblings, 0 replies; 6+ messages in thread
From: Hubert Feurstein @ 2011-06-06 13:24 UTC (permalink / raw)
To: linux-fbdev
Or it must be this way:
---
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 4484c72..c2ceae4 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -1085,7 +1085,7 @@ static int atmel_lcdfb_suspend(struct
platform_device *pdev, pm_message_t mesg)
*/
lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
- sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
+ sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
if (sinfo->atmel_lcdfb_power_control)
sinfo->atmel_lcdfb_power_control(0);
--
So which solution was originally intended?
Best regards
Hubert
2011/6/6 Hubert Feurstein <h.feurstein@gmail.com>:
> I assume the intention was to set the contrast value to 0 and not
> the contrast control register (in atmel_lcdfb_suspend). And in
> atmel_lcdfb_resume the contrast value should be restored.
>
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> drivers/video/atmel_lcdfb.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> index 4484c72..2ed7ec1 100644
> --- a/drivers/video/atmel_lcdfb.c
> +++ b/drivers/video/atmel_lcdfb.c
> @@ -1086,7 +1086,7 @@ static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg)
> lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
>
> sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
> - lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
> + lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, 0);
> if (sinfo->atmel_lcdfb_power_control)
> sinfo->atmel_lcdfb_power_control(0);
>
> @@ -1105,7 +1105,7 @@ static int atmel_lcdfb_resume(struct platform_device *pdev)
> atmel_lcdfb_start(sinfo);
> if (sinfo->atmel_lcdfb_power_control)
> sinfo->atmel_lcdfb_power_control(1);
> - lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, sinfo->saved_lcdcon);
> + lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, sinfo->saved_lcdcon);
>
> /* Enable FIFO & DMA errors */
> lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI
> --
> 1.7.1
>
>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] atmel_lcdfb: fix usage of wrong registers in suspend/resume
2011-06-06 8:50 [PATCH] atmel_lcdfb: fix usage of wrong registers in suspend/resume Hubert Feurstein
2011-06-06 13:24 ` Hubert Feurstein
@ 2012-01-09 15:45 ` Nicolas Ferre
2012-01-09 16:23 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR " Nicolas Ferre
2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2012-01-09 15:45 UTC (permalink / raw)
To: linux-fbdev
On 06/06/2011 03:24 PM, Hubert Feurstein :
> Or it must be this way:
> ---
> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> index 4484c72..c2ceae4 100644
> --- a/drivers/video/atmel_lcdfb.c
> +++ b/drivers/video/atmel_lcdfb.c
> @@ -1085,7 +1085,7 @@ static int atmel_lcdfb_suspend(struct
> platform_device *pdev, pm_message_t mesg)
> */
> lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
>
> - sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
> + sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
> lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
> if (sinfo->atmel_lcdfb_power_control)
> sinfo->atmel_lcdfb_power_control(0);
> --
> So which solution was originally intended?
Yes exactly: this solution is the preferred one.
I rebuild the patch with your authorship and send it again.
Thanks Hubert, best regards,
>
> Best regards
> Hubert
>
> 2011/6/6 Hubert Feurstein <h.feurstein@gmail.com>:
>> I assume the intention was to set the contrast value to 0 and not
>> the contrast control register (in atmel_lcdfb_suspend). And in
>> atmel_lcdfb_resume the contrast value should be restored.
>>
>> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
>> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
>> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>> ---
>> drivers/video/atmel_lcdfb.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
>> index 4484c72..2ed7ec1 100644
>> --- a/drivers/video/atmel_lcdfb.c
>> +++ b/drivers/video/atmel_lcdfb.c
>> @@ -1086,7 +1086,7 @@ static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg)
>> lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
>>
>> sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
>> - lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
>> + lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, 0);
>> if (sinfo->atmel_lcdfb_power_control)
>> sinfo->atmel_lcdfb_power_control(0);
>>
>> @@ -1105,7 +1105,7 @@ static int atmel_lcdfb_resume(struct platform_device *pdev)
>> atmel_lcdfb_start(sinfo);
>> if (sinfo->atmel_lcdfb_power_control)
>> sinfo->atmel_lcdfb_power_control(1);
>> - lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, sinfo->saved_lcdcon);
>> + lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, sinfo->saved_lcdcon);
>>
>> /* Enable FIFO & DMA errors */
>> lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI
>> --
>> 1.7.1
>>
>>
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume
2011-06-06 8:50 [PATCH] atmel_lcdfb: fix usage of wrong registers in suspend/resume Hubert Feurstein
2011-06-06 13:24 ` Hubert Feurstein
2012-01-09 15:45 ` Nicolas Ferre
@ 2012-01-09 16:23 ` Nicolas Ferre
2012-01-09 16:46 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in Jean-Christophe PLAGNIOL-VILLARD
2012-01-30 5:13 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume Florian Tobias Schandinat
2 siblings, 2 replies; 6+ messages in thread
From: Nicolas Ferre @ 2012-01-09 16:23 UTC (permalink / raw)
To: linux-arm-kernel
From: Hubert Feurstein <h.feurstein@gmail.com>
An error was existing in the saving of CONTRAST_CTR register
across suspend/resume.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org>
---
drivers/video/atmel_lcdfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index d7e3712..d99505b 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -1102,7 +1102,7 @@ static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg)
*/
lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
- sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
+ sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
if (sinfo->atmel_lcdfb_power_control)
sinfo->atmel_lcdfb_power_control(0);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in
2012-01-09 16:23 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR " Nicolas Ferre
@ 2012-01-09 16:46 ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-30 5:13 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume Florian Tobias Schandinat
1 sibling, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-09 16:46 UTC (permalink / raw)
To: linux-arm-kernel
On 17:23 Mon 09 Jan , Nicolas Ferre wrote:
> From: Hubert Feurstein <h.feurstein@gmail.com>
>
> An error was existing in the saving of CONTRAST_CTR register
> across suspend/resume.
>
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: stable <stable@vger.kernel.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Best Regards,
J.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume
2012-01-09 16:23 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR " Nicolas Ferre
2012-01-09 16:46 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-30 5:13 ` Florian Tobias Schandinat
1 sibling, 0 replies; 6+ messages in thread
From: Florian Tobias Schandinat @ 2012-01-30 5:13 UTC (permalink / raw)
To: linux-arm-kernel
On 01/09/2012 04:23 PM, Nicolas Ferre wrote:
> From: Hubert Feurstein <h.feurstein@gmail.com>
>
> An error was existing in the saving of CONTRAST_CTR register
> across suspend/resume.
>
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: stable <stable@vger.kernel.org>
Applied.
Thanks,
Florian Tobias Schandinat
> ---
> drivers/video/atmel_lcdfb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> index d7e3712..d99505b 100644
> --- a/drivers/video/atmel_lcdfb.c
> +++ b/drivers/video/atmel_lcdfb.c
> @@ -1102,7 +1102,7 @@ static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg)
> */
> lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
>
> - sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
> + sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
> lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
> if (sinfo->atmel_lcdfb_power_control)
> sinfo->atmel_lcdfb_power_control(0);
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-30 5:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-06 8:50 [PATCH] atmel_lcdfb: fix usage of wrong registers in suspend/resume Hubert Feurstein
2011-06-06 13:24 ` Hubert Feurstein
2012-01-09 15:45 ` Nicolas Ferre
2012-01-09 16:23 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR " Nicolas Ferre
2012-01-09 16:46 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in Jean-Christophe PLAGNIOL-VILLARD
2012-01-30 5:13 ` [PATCH v2] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume Florian Tobias Schandinat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).