mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leonard Crestez <leonard.crestez@nxp.com>
To: "stefan@agner.ch" <stefan@agner.ch>,
	"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
	"marex@denx.de" <marex@denx.de>,
	Anson Huang <anson.huang@nxp.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	Robert Chiras <robert.chiras@nxp.com>,
	"airlied@linux.ie" <airlied@linux.ie>
Subject: Re: [PATCH] drm: mxsfb: fix runtime PM handling
Date: Fri, 13 Jul 2018 10:30:04 +0000	[thread overview]
Message-ID: <6e592ae7d5017cee55b4be3f2676b758fb3cd057.camel@nxp.com> (raw)
In-Reply-To: <90d16681-2a7a-4826-0411-478353d2afe3@denx.de>

On Fri, 2018-07-13 at 11:12 +0200, Marek Vasut wrote:
> On 07/13/2018 11:06 AM, Anson Huang wrote:
> [...]
> > > 
> > > On 07/13/2018 10:54 AM, Anson Huang wrote:
> > > > As display power domain is combined with lcdif node on some i.MX
> > > > platforms like i.MX6SL, when lcdif driver is enabled, the mxsfb_load
> > > > is called to enable runtime pm, and a pair of pm_runtime_get_sync and
> > > > pm_runtime_put_sync are also called, that will cause generic power
> > > > domain driver to disable lcdif power domain and lcdif is no longer
> > > > working, the lcdif power should ONLY be turned off when display is
> > > > disabled, so move the pm_runtime_put_sync to mxsfb_unload and remove
> > > > the pm_runtime_get_sync in mxsfb_unload as well, in this way, when
> > > > display is enabled, the lcdif power will be always ON until the
> > > > display is disabled.
> > > > 
> > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > 
> > > Doesn't this also mean the block will always be on, thus wasting power ?

> > I think drm driver should have somewhere to implement the display
> > disable case, like when fb0 is blank (echo 1 > /sys/class/graphics/fb0/blank),
> 
> Isn't this just the fbdev emulation on top of drm/kms ?
> I think this stuff can be compiled out completely.
> 
> > then lcdif can be powered gated, and
> > when display is back on (unblank), lcdif needs to be re-initialization and display will
> > be on, current implementation is incorrect, with kernel booting up, lcdif
> > is NOT working at all.
> 
> It works fine on MX6SX , so I think this is isolated to MX6SL ?
> I'm CCing Stefan, he might have some valuable feedback here.

Some time ago I sent a patch which tries to implement "proper" runtime
PM for lcdif: https://patchwork.kernel.org/patch/10449761/

It seems to have slipped through the cracks, can somebody please take a
look at it?

This only actually matters on SOCs where the display power domain is
gated, however:

* On imx6sx the DISP power domain is currently not defined in DTS.
Defining requires dealing with pcie being spread in multiple PDs.
* On imx6sl there is a nasty errata so the PD was marked always-on.
This was a few days ago: https://lkml.org/lkml/2018/7/11/427
* imx6sll is new, evk dts only in next.

The lcdif block is also used in some imx8 chips so runtime PM should be
dealt with eventually.

  reply	other threads:[~2018-07-13 10:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13  8:54 Anson Huang
2018-07-13  9:03 ` Marek Vasut
2018-07-13  9:06   ` Anson Huang
2018-07-13  9:12     ` Marek Vasut
2018-07-13 10:30       ` Leonard Crestez [this message]
2018-07-13 10:33       ` Stefan Agner
2018-07-13 10:36         ` Marek Vasut
2018-07-13 10:39           ` Stefan Agner
2018-07-13 10:45             ` Marek Vasut

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=6e592ae7d5017cee55b4be3f2676b758fb3cd057.camel@nxp.com \
    --to=leonard.crestez@nxp.com \
    --cc=airlied@linux.ie \
    --cc=anson.huang@nxp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=robert.chiras@nxp.com \
    --cc=stefan@agner.ch \
    /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

all inboxes | Powered by JetHome®