linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>,
	"kyungmin.park@samsung.com" <kyungmin.park@samsung.com>,
	"linux-fbdev-devel@lists.sourceforge.net"
	<linux-fbdev-devel@lists.sourceforge.net>,
	"linux-arm-kernel@lists.arm.linux.org.uk"
	<linux-arm-kernel@lists.arm.linux.org.uk>,
	"Antonino A. Daplas" <adaplas@gmail.com>
Subject: Re: [PATCH] [drivers] [fb] S3C-fb: PM fix
Date: Wed, 27 May 2009 23:33:25 -0700	[thread overview]
Message-ID: <20090527233325.bb60a326.akpm@linux-foundation.org> (raw)
In-Reply-To: <E4D3F24EA6C9E54F817833EAE0D912AC0226526883@bssrvexch01.BS.local>

On Mon, 18 May 2009 08:05:46 +0200 Marek Szyprowski <m.szyprowski@samsung.com> wrote:

> Restore correctly FrameBuffer registers state in resume function.
> 
> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> 
> --- 
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 5e9c630..d3a568e 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -947,7 +947,8 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
>  	int win;
>  
>  	for (win = 0; win <= S3C_FB_MAX_WIN; win++)
> -		s3c_fb_release_win(sfb, sfb->windows[win]);
> +		if (sfb->windows[win])
> +			s3c_fb_release_win(sfb, sfb->windows[win]);
>  
>  	iounmap(sfb->regs);
>  
> @@ -985,11 +986,20 @@ static int s3c_fb_suspend(struct platform_device *pdev, pm_message_t state)
>  static int s3c_fb_resume(struct platform_device *pdev)
>  {
>  	struct s3c_fb *sfb = platform_get_drvdata(pdev);
> +	struct s3c_fb_platdata *pd = sfb->pdata;
>  	struct s3c_fb_win *win;
>  	int win_no;
>  
>  	clk_enable(sfb->bus_clk);
>  
> +	/* setup registers */
> +	writel(pd->vidcon1, sfb->regs + VIDCON1);
> +
> +	/* zero all windows before we do anything */
> +	for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++)
> +		s3c_fb_clear_win(sfb, win_no);
> +
> +	/* restore framebuffers */
>  	for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) {
>  		win = sfb->windows[win_no];
>  		if (!win)

What are the consequences of the bug whcih you fixed?  Device
inoperative after resume, I assume?  Does it affect all supported
hardware, or just some particualr device(s)?

See, this is the sort of information whcih shuld be in the changelog,
please, so I (and others) can make decisions about which kernel
version(s) the patch should be merged into.

I assume we want it in 2.6.30.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 

  reply	other threads:[~2009-05-28  6:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18  6:05 [PATCH] [drivers] [fb] S3C-fb: PM fix Marek Szyprowski
2009-05-28  6:33 ` Andrew Morton [this message]
2009-05-29  7:16   ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090527233325.bb60a326.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adaplas@gmail.com \
    --cc=ben-linux@fluff.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).