Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	Sean Paul <seanpaul@google.com>, sunil joshi <joshi@samsung.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Ajay kumar <ajaynumb@gmail.com>,
	Prashanth G <prashanth.g@samsung.com>,
	Ajay Kumar <ajaykumar.rs@samsung.com>
Subject: Re: [PATCH V2 2/9] drm/panel: add pre_enable and post_disable routines
Date: Wed, 23 Apr 2014 09:42:13 +0200	[thread overview]
Message-ID: <20140423074212.GF31226@ulmo> (raw)
In-Reply-To: <20140423072915.GV10722@phenom.ffwll.local>


[-- Attachment #1.1: Type: text/plain, Size: 3850 bytes --]

On Wed, Apr 23, 2014 at 09:29:15AM +0200, Daniel Vetter wrote:
> On Tue, Apr 22, 2014 at 08:06:19PM +0530, Ajay kumar wrote:
> > Hi Thierry,
> > 
> > 
> > On Tue, Apr 22, 2014 at 1:49 PM, Thierry Reding <thierry.reding@gmail.com>
> > wrote:
> > > On Tue, Apr 22, 2014 at 04:09:11AM +0530, Ajay Kumar wrote:
> > >> Most of the panels need an init sequence as mentioned below:
> > >>       -- poweron LCD unit/LCD_EN
> > >>       -- start video data
> > >>       -- poweron LED unit/BL_EN
> > >> And, a de-init sequence as mentioned below:
> > >>       -- poweroff LED unit/BL_EN
> > >>       -- stop video data
> > >>       -- poweroff LCD unit/LCD_EN
> > >> With existing callbacks for drm panel, we cannot accomodate such panels,
> > >> since only two callbacks, i.e "panel_enable" and panel_disable are
> > supported.
> > >>
> > >> This patch adds:
> > >>       -- "pre_enable" callback which can be called before
> > >>       the actual video data is on, and then call the "enable"
> > >>       callback after the video data is available.
> > >>
> > >>       -- "post_disable" callback which can be called after
> > >>       the video data is off, and use "disable" callback
> > >>       to do something before switching off the video data.
> > >>
> > >> Now, we can easily map the above scenario as shown below:
> > >>       poweron LCD unit/LCD_EN = "pre_enable" callback
> > >>       poweron LED unit/BL_EN = "enable" callback
> > >>       poweroff LED unit/BL_EN = "disable" callback
> > >>       poweroff LCD unit/LCD_EN = "post_disable" callback
> > >
> > > I don't like this. What happens when the next panel comes around that
> > > has a yet slightly different requirement? Will we introduce a new
> > > pre_pre_enable() and post_post_disable() function then?
> > >
> > As I have already explained, these 2 callbacks are sufficient enough to
> > take care
> > the power up/down sequence for LVDS and eDP panels. And, definitely having
> > just 2 callbacks "enable" and "disable" is not at all sufficient.
> > 
> > I initially thought of using panel_simple_enable from panel-simple driver.
> > But it doesn't go well with case wherein there are 2 regulators(one for LCD
> > and one for LED)
> > a BL_EN signal etc. And, often(Believe me, I have referred to both eDP
> > panel datasheets
> > and LVDS panel datasheets) proper powerup sequence for such panels is as
> > mentioned below:
> > 
> > powerup:
> > -- power up the supply (LCD_VCC).
> > -- start video data.
> > -- enable backlight.
> > 
> > powerdown
> > -- disable backlight.
> > -- stop video data.
> > -- power off the supply (LCD VCC)
> > 
> > For the above cases, if I have to somehow fit in all the required settings,
> > it breaks the sequence and I end up getting glitches during bootup/DPMS.
> > 
> > Also, when the drm_bridge can support pre_enable and post_disable, why not
> > drm_panel provide that both should work in tandem?
> 
> Imo this makes sense, especially if we go through with the idea talked
> about yesterday of creating a drm_bridge to wrap-up a drm_panel with
> sufficient isolation between all components.

I'm not at all comfortable with these. The names are totally confusing.
Next somebody will need to do something after the panel has been enabled
and we'll have to introduce .post_enable() and .pre_disable() functions.
And worse, what if somebody needs something to be done between
.pre_enable() and .enable()? .post_pre_enable()? Where does it end?

According to the above description the only reason why we need this is
to avoid visible glitches when the panel is already on, but the video
stream hasn't started yet. If that's the only reason why we need this,
then perhaps adding a way for a panel to expose the associated backlight
would be better?

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-04-23  7:42 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 22:39 [PATCH V2 0/9] drm: exynos: few patches to enhance bridge chip support Ajay Kumar
2014-04-21 22:39 ` [PATCH V2 1/9] drm/exynos: dp: support hotplug detection via GPIO Ajay Kumar
2014-04-22  7:13   ` Jingoo Han
2014-05-09  0:57     ` Jingoo Han
2014-04-21 22:39 ` [PATCH V2 2/9] drm/panel: add pre_enable and post_disable routines Ajay Kumar
2014-04-22  8:19   ` Thierry Reding
2014-04-22 14:36     ` Ajay kumar
2014-04-23  7:29       ` Daniel Vetter
2014-04-23  7:42         ` Thierry Reding [this message]
2014-04-23 19:26           ` Ajay kumar
2014-04-24 18:31             ` Thierry Reding
2014-04-25  6:04               ` Ajay kumar
2014-04-25 18:16                 ` Ajay kumar
2014-04-29 12:15                   ` Ajay kumar
2014-04-23 19:14         ` Ajay kumar
2014-04-21 22:39 ` [PATCH V2 3/9] drm/panel: Add driver for exynos_dp based panels Ajay Kumar
2014-04-22  7:22   ` Jingoo Han
2014-04-22 14:37     ` Ajay kumar
2014-04-22  8:26   ` Thierry Reding
2014-04-22 14:53     ` Ajay kumar
2014-04-22 15:16       ` Thierry Reding
2014-04-21 22:39 ` [PATCH V2 4/9] drm/exynos: add exynos_dp_panel driver registration to drm driver Ajay Kumar
2014-04-22  8:33   ` Thierry Reding
2014-04-22 15:03     ` Ajay kumar
2014-04-22 15:26       ` Thierry Reding
2014-08-20  4:02         ` Stéphane Marchesin
2014-08-21  7:36           ` Thierry Reding
2014-08-21  8:25             ` Stéphane Marchesin
2014-08-21  9:27               ` Ajay kumar
2014-08-21  9:37                 ` Thierry Reding
2014-08-21  9:28               ` Thierry Reding
2014-04-21 22:39 ` [PATCH V2 5/9] drm/exynos: dp: modify driver to support drm_panel Ajay Kumar
2014-04-22  8:37   ` Thierry Reding
2014-04-21 22:39 ` [PATCH V2 6/9] drm/bridge: ptn3460: enable polling based detection Ajay Kumar
2014-04-22  8:43   ` Thierry Reding
2014-04-21 22:39 ` [PATCH V2 7/9] drm/bridge: ptn3460: add drm_panel controls Ajay Kumar
2014-04-22  8:55   ` Thierry Reding
2014-04-22 11:34   ` Rob Clark
2014-04-22 13:53     ` Daniel Vetter
2014-04-23 18:56     ` Ajay kumar
2014-04-23 19:02       ` Ajay kumar
2014-04-24 16:11         ` Rob Clark
2014-04-24 16:55           ` Ajay kumar
2014-04-24 17:25             ` Rob Clark
2014-04-24 17:38               ` Ajay kumar
2014-04-25  6:10                 ` Ajay kumar
2014-04-25  6:17                   ` Ajay kumar
2014-04-27 12:55                     ` Daniel Vetter
2014-04-28 13:08                       ` Ajay kumar
2014-04-29 13:14                         ` Rob Clark
2014-04-21 22:39 ` [PATCH V2 8/9] drm/bridge: Add PS8622 bridge driver Ajay Kumar
2014-04-22  8:43   ` Jingoo Han
2014-04-22 13:57     ` Ajay kumar
2014-04-22 13:31   ` Sean Paul
2014-04-22 14:03     ` Ajay kumar
2014-04-21 22:39 ` [PATCH V2 9/9] drm/exynos: Add ps8622 lvds bridge discovery to DP driver Ajay Kumar
2014-04-22  9:27   ` Thierry Reding
2014-04-22 17:20     ` Ajay kumar

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=20140423074212.GF31226@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=ajaykumar.rs@samsung.com \
    --cc=ajaynumb@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=joshi@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=prashanth.g@samsung.com \
    --cc=seanpaul@google.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