* [PATCH] video/fsl: Fix the sleep function for FSL DIU module
@ 2014-03-25 7:56 Dongsheng Wang
2014-03-25 15:54 ` Timur Tabi
0 siblings, 1 reply; 3+ messages in thread
From: Dongsheng Wang @ 2014-03-25 7:56 UTC (permalink / raw)
To: scottwood, timur; +Cc: linux-fbdev, linuxppc-dev, Wang Dongsheng, Jason Jin
From: Jason Jin <Jason.Jin@freescale.com>
For deep sleep, the diu module will power off, when wake up
from the deep sleep, the registers need to be reinitialized.
Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index e8758b9..7ec780c 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -1628,9 +1628,18 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
static int fsl_diu_resume(struct platform_device *ofdev)
{
struct fsl_diu_data *data;
+ struct mfb_info *mfbi;
+ int i;
data = dev_get_drvdata(&ofdev->dev);
- enable_lcdc(data->fsl_diu_info);
+ fsl_diu_enable_interrupts(data);
+ update_lcdc(data->fsl_diu_info);
+
+ for (i = 0; i < NUM_AOIS; i++) {
+ mfbi = &data->mfb[i];
+ if (mfbi->count)
+ fsl_diu_enable_panel(&data->fsl_diu_info[i]);
+ }
return 0;
}
--
1.8.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] video/fsl: Fix the sleep function for FSL DIU module
2014-03-25 7:56 [PATCH] video/fsl: Fix the sleep function for FSL DIU module Dongsheng Wang
@ 2014-03-25 15:54 ` Timur Tabi
2015-08-14 5:53 ` Wang Dongsheng
0 siblings, 1 reply; 3+ messages in thread
From: Timur Tabi @ 2014-03-25 15:54 UTC (permalink / raw)
To: Dongsheng Wang; +Cc: scottwood, linux-fbdev, linuxppc-dev, jason.jin
On 03/25/2014 02:56 AM, Dongsheng Wang wrote:
> From: Jason Jin <Jason.Jin@freescale.com>
>
> For deep sleep, the diu module will power off, when wake up
> from the deep sleep, the registers need to be reinitialized.
>
> Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
>
> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> index e8758b9..7ec780c 100644
> --- a/drivers/video/fsl-diu-fb.c
> +++ b/drivers/video/fsl-diu-fb.c
> @@ -1628,9 +1628,18 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
> static int fsl_diu_resume(struct platform_device *ofdev)
> {
> struct fsl_diu_data *data;
> + struct mfb_info *mfbi;
You don't need this, if ...
> + int i;
>
> data = dev_get_drvdata(&ofdev->dev);
> - enable_lcdc(data->fsl_diu_info);
> + fsl_diu_enable_interrupts(data);
> + update_lcdc(data->fsl_diu_info);
> +
> + for (i = 0; i < NUM_AOIS; i++) {
> + mfbi = &data->mfb[i];
> + if (mfbi->count)
... you do this:
if (data->mfb[i].count)
Also, 'i' should be an 'unsigned int'.
> + fsl_diu_enable_panel(&data->fsl_diu_info[i]);
> + }
>
> return 0;
> }
>
Other than that, this seems okay.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] video/fsl: Fix the sleep function for FSL DIU module
2014-03-25 15:54 ` Timur Tabi
@ 2015-08-14 5:53 ` Wang Dongsheng
0 siblings, 0 replies; 3+ messages in thread
From: Wang Dongsheng @ 2015-08-14 5:53 UTC (permalink / raw)
To: Timur Tabi
Cc: Scott Wood, Jin Jason, Li Leo, linuxppc-dev@lists.ozlabs.org,
linux-fbdev@vger.kernel.org
Hi Tabi,
> -----Original Message-----
> From: Timur Tabi [mailto:timur@tabi.org]
> Sent: Tuesday, March 25, 2014 11:55 PM
> To: Wang Dongsheng-B40534
> Cc: Wood Scott-B07421; Jin Zhengxiong-R64188; Li Yang-Leo-R58472; linuxppc-
> dev@lists.ozlabs.org; linux-fbdev@vger.kernel.org
> Subject: Re: [PATCH] video/fsl: Fix the sleep function for FSL DIU module
>
> On 03/25/2014 02:56 AM, Dongsheng Wang wrote:
> > From: Jason Jin <Jason.Jin@freescale.com>
> >
> > For deep sleep, the diu module will power off, when wake up from the
> > deep sleep, the registers need to be reinitialized.
> >
> > Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
> > Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> >
> > diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> > index e8758b9..7ec780c 100644
> > --- a/drivers/video/fsl-diu-fb.c
> > +++ b/drivers/video/fsl-diu-fb.c
> > @@ -1628,9 +1628,18 @@ static int fsl_diu_suspend(struct platform_device
> *ofdev, pm_message_t state)
> > static int fsl_diu_resume(struct platform_device *ofdev)
> > {
> > struct fsl_diu_data *data;
> > + struct mfb_info *mfbi;
>
> You don't need this, if ...
>
> > + int i;
> >
> > data = dev_get_drvdata(&ofdev->dev);
> > - enable_lcdc(data->fsl_diu_info);
> > + fsl_diu_enable_interrupts(data);
> > + update_lcdc(data->fsl_diu_info);
> > +
> > + for (i = 0; i < NUM_AOIS; i++) {
> > + mfbi = &data->mfb[i];
> > + if (mfbi->count)
>
> ... you do this:
>
> if (data->mfb[i].count)
>
> Also, 'i' should be an 'unsigned int'.
>
> > + fsl_diu_enable_panel(&data->fsl_diu_info[i]);
> > + }
> >
> > return 0;
> > }
> >
>
> Other than that, this seems okay.
>
Thanks, send v2 to update this patch.
Regards,
-Dongsheng
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-14 5:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-25 7:56 [PATCH] video/fsl: Fix the sleep function for FSL DIU module Dongsheng Wang
2014-03-25 15:54 ` Timur Tabi
2015-08-14 5:53 ` Wang Dongsheng
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).