linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: InKi Dae <daeinki@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pavel Machek <pavel@ucw.cz>, Kyungmin Park <kmpark@infradead.org>,
	linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fixed sparkling issue on lcd panel when fb_blank mode is  changed.
Date: Fri, 19 Mar 2010 13:11:34 +0000	[thread overview]
Message-ID: <1269004294.4292.18.camel@rex> (raw)
In-Reply-To: <90b950fc1003182136n73d54c2di4be84f16e4c3534f@mail.gmail.com>

Hi,

On Fri, 2010-03-19 at 13:36 +0900, InKi Dae wrote:
> This issue is a problem that lcd panel is spakled when fb_blank mode is changed
> From FB_BLANK_UNBLANK to FB_BLANK_POWER or FB_BLANK_POWER to FB_BLANK_UNBLANK.
> 
> In case of FB_BLANK_UNBLANK, screen = on, vsync = on, hsync = on and
> For FB_BLANK_POWERDOWN screen = blanked, vsync = off, hsync = off
> So like this when fb_blank mode becomes FB_BLANK_POWERDOWN,
> Display controller and lcd panel should become off to reduce power consumption.
> 
> Let's see fb_blank function of fbmem.c file.
> 
> fb_blank()
> {
>     if (info->fbops->fb_blank)
>             ret = info->fbops->fb_blank(blank, info(
>     if (!ret)
>             fb_notifier_call_chain(FB_EVENT_BLANK, &event);
> }
> 
> This problem is because this code calls fb_blank (fb_blank of device
> specific framebuffer driver)
> Earlier then fb_notifier_call_chain.
> 
> For example,
> Device specific fb_blank function is registered to generic framebuffer
> driver through register_framebuffer function
> And fb_notifier_call_chain calls any callback function registered to
> lcd class(lcd.c) through fb_notifier_callback function.
> So if fb_blank mode is changed to FB_BLANK_POWERDOWN then display
> controller would become off(clock disable)
> On the other hand, lcd panel would still be on. at this time, some
> situation on lcd panel occers like sparkling
> Because video clock to be delivered to ldi module of lcd panel is disabled also.
> 
> This patch get fb_notifier_call_chain to be called earlier then fb_blank.
> Please, review this patch.

So to summarise the problem more succinctly the LCD and the display
controllers power off in the wrong order causing visual defects
(sparkling) on the display.

I was a bit worried about event order and loops with this change so I
checked and there are three consumers of these events in the kernel:
consoles, LCD and backlight. None of them have a problem with this
change of order for power down so from that point of view I'm ok with
the change.

However this function also covers powerup from a screen blank to an
active screen. When powering up it makes sense to power up the video
device first, then the LCD, backlight and console as per the current
code, otherwise I can imagine "sparkling" upon powerup.

So it looks like we need to change order only on powerdown, not upon
resume, otherwise we'll get further regression reports on poweron?

Cheers,

Richard

       reply	other threads:[~2010-03-19 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <90b950fc1003182136n73d54c2di4be84f16e4c3534f@mail.gmail.com>
2010-03-19 13:11 ` Richard Purdie [this message]
2010-03-22  3:18   ` [PATCH] fixed sparkling issue on lcd panel when fb_blank mode is changed InKi Dae
2010-03-22  4:48     ` InKi Dae
2010-03-22  4:51       ` InKi Dae

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=1269004294.4292.18.camel@rex \
    --to=rpurdie@rpsys.net \
    --cc=akpm@linux-foundation.org \
    --cc=daeinki@gmail.com \
    --cc=kmpark@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).