linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: s3c-fb: add runtime_get/put to suspend/resume
@ 2012-04-04  6:57 Jingoo Han
  2012-04-23  6:15 ` Florian Tobias Schandinat
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2012-04-04  6:57 UTC (permalink / raw)
  To: linux-fbdev

This patch adds runtime_get/put to suspend/resume, which should be
necessary to prevent the problem to access the fimd register
without block power on.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/s3c-fb.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index f310516..76f3cf2 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1564,6 +1564,8 @@ static int s3c_fb_suspend(struct device *dev)
 	struct s3c_fb_win *win;
 	int win_no;
 
+	pm_runtime_get_sync(sfb->dev);
+
 	for (win_no = S3C_FB_MAX_WIN - 1; win_no >= 0; win_no--) {
 		win = sfb->windows[win_no];
 		if (!win)
@@ -1577,6 +1579,9 @@ static int s3c_fb_suspend(struct device *dev)
 		clk_disable(sfb->lcd_clk);
 
 	clk_disable(sfb->bus_clk);
+
+	pm_runtime_put_sync(sfb->dev);
+
 	return 0;
 }
 
@@ -1589,6 +1594,8 @@ static int s3c_fb_resume(struct device *dev)
 	int win_no;
 	u32 reg;
 
+	pm_runtime_get_sync(sfb->dev);
+
 	clk_enable(sfb->bus_clk);
 
 	if (!sfb->variant.has_clksel)
@@ -1633,6 +1640,8 @@ static int s3c_fb_resume(struct device *dev)
 		s3c_fb_set_par(win->fbinfo);
 	}
 
+	pm_runtime_put_sync(sfb->dev);
+
 	return 0;
 }
 #endif
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: s3c-fb: add runtime_get/put to suspend/resume
  2012-04-04  6:57 [PATCH] video: s3c-fb: add runtime_get/put to suspend/resume Jingoo Han
@ 2012-04-23  6:15 ` Florian Tobias Schandinat
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Tobias Schandinat @ 2012-04-23  6:15 UTC (permalink / raw)
  To: linux-fbdev

On 04/04/2012 06:57 AM, Jingoo Han wrote:
> This patch adds runtime_get/put to suspend/resume, which should be
> necessary to prevent the problem to access the fimd register
> without block power on.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/s3c-fb.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index f310516..76f3cf2 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -1564,6 +1564,8 @@ static int s3c_fb_suspend(struct device *dev)
>  	struct s3c_fb_win *win;
>  	int win_no;
>  
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	for (win_no = S3C_FB_MAX_WIN - 1; win_no >= 0; win_no--) {
>  		win = sfb->windows[win_no];
>  		if (!win)
> @@ -1577,6 +1579,9 @@ static int s3c_fb_suspend(struct device *dev)
>  		clk_disable(sfb->lcd_clk);
>  
>  	clk_disable(sfb->bus_clk);
> +
> +	pm_runtime_put_sync(sfb->dev);
> +
>  	return 0;
>  }
>  
> @@ -1589,6 +1594,8 @@ static int s3c_fb_resume(struct device *dev)
>  	int win_no;
>  	u32 reg;
>  
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	clk_enable(sfb->bus_clk);
>  
>  	if (!sfb->variant.has_clksel)
> @@ -1633,6 +1640,8 @@ static int s3c_fb_resume(struct device *dev)
>  		s3c_fb_set_par(win->fbinfo);
>  	}
>  
> +	pm_runtime_put_sync(sfb->dev);
> +
>  	return 0;
>  }
>  #endif


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-23  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04  6:57 [PATCH] video: s3c-fb: add runtime_get/put to suspend/resume Jingoo Han
2012-04-23  6:15 ` 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).