dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: CK Hu <ck.hu@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Michael Turquette <mturquette@baylibre.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Jie Qiu <jie.qiu@mediatek.com>,
	Cawa Cheng <cawa.cheng@mediatek.com>,
	YT Shen <yt.shen@mediatek.com>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
	Jitao Shi <jitao.shi@mediatek.com>,
	Sasha Hauer <kernel@pengutronix.de>,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Rob Herring <robh+dt@kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Paul Bolle <pebolle@tiscali.nl>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH v9 03/14] drm/mediatek: Add DSI sub driver
Date: Thu, 04 Feb 2016 13:48:19 +0100	[thread overview]
Message-ID: <1454590099.3356.22.camel@pengutronix.de> (raw)
In-Reply-To: <1454567865.12573.7.camel@mtksdaap41>

Am Donnerstag, den 04.02.2016, 14:37 +0800 schrieb CK Hu:
> Hi Philipp:
> 
> On Wed, 2016-02-03 at 12:01 +0100, Philipp Zabel wrote:
> > Hi Daniel,
> > 
> 
> > > > +static void mtk_output_dsi_disable(struct mtk_dsi *dsi)
> > > > +{
> > > > +       if (!dsi->enabled)
> > > > +               return;
> > > > +
> > > > +       if (dsi->panel) {
> > > > +               if (drm_panel_disable(dsi->panel)) {
> > > > +                       DRM_ERROR("failed to disable the panel\n");
> > > > +                       return;
> > > > +               }
> > > > +       }
> > > > +
> > > > +       mtk_dsi_poweroff(dsi);
> > > 
> > > The order is a bit suspicious here; I would expect to poweroff dsi
> > > before the panel to mirror the turn on order.
> > 
> > CK, could you comment on this?
> > 
> 
> According to the experience of other Mediatek SoC,
> In mtk_output_dsi_enable(), we should do power on dsi first and then
> prepare panel because dsi should be ready to receive panel prepare error
> message. So we should disable panel and then power off dsi in
> mtk_output_dsi_disable().
> 
> > I can reorder this, but I'm not sure about the reasoning (what happens
> > hardware wise if we just cut panel power vs. if the DSI panel first sees
> > the ULP transition). Further, I don't have a panel to test, just the
> > PS8640.
> > 
> > thanks
> > Philipp

I just realized that this code isn't even using drm_panel_enable and
drm_panel_unprepare. I suppose the order generally should be:

prepare and enable dsi (but don't start stream yet)
drm_panel_prepare()
enable dsi output
drm_panel_enable()

and to disable:

drm_panel_disable()
disable dsi output
drm_panel_unprepare()
power off dsi

?

regards
Philipp

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

  parent reply	other threads:[~2016-02-04 12:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 15:15 [PATCH v9 00/14] MT8173 DRM support Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 01/14] dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 02/14] drm/mediatek: Add DRM Driver for Mediatek SoC MT8173 Philipp Zabel
2016-01-20 22:23   ` Daniel Kurtz
2016-02-03 14:31     ` Philipp Zabel
2016-02-02 17:09   ` Daniel Kurtz
2016-02-02 17:12   ` Daniel Kurtz
2016-02-03 14:31     ` Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 03/14] drm/mediatek: Add DSI sub driver Philipp Zabel
2016-02-02 13:32   ` Daniel Kurtz
2016-02-03 11:01     ` Philipp Zabel
     [not found]       ` <1454497304.3867.1.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-02-04  6:37         ` CK Hu
2016-02-04 12:24           ` Daniel Kurtz
2016-02-04 12:48           ` Philipp Zabel [this message]
     [not found]             ` <1454590099.3356.22.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-02-05  9:06               ` CK Hu
2016-01-12 15:15 ` [PATCH v9 04/14] drm/mediatek: Add DPI " Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 05/14] dt-bindings: drm/mediatek: Add Mediatek HDMI dts binding Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 06/14] drm/mediatek: Add HDMI support Philipp Zabel
     [not found] ` <1452611750-16283-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-01-12 15:15   ` [PATCH v9 07/14] drm/mediatek: enable hdmi output control bit Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 08/14] arm64: dts: mt8173: Add display subsystem related nodes Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 09/14] arm64: dts: mt8173: Add HDMI " Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 10/14] clk: mediatek: make dpi0_sel propagate rate changes Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 11/14] clk: mediatek: Add hdmi_ref HDMI PHY PLL reference clock output Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 12/14] dt-bindings: hdmi-connector: add DDC I2C bus phandle documentation Philipp Zabel
2016-01-12 15:15 ` [PATCH v9 13/14] clk: mediatek: remove hdmitx_dig_cts from TOP clocks Philipp Zabel
2016-02-25 23:09   ` Stephen Boyd
2016-01-12 15:15 ` [PATCH v9 14/14] drm/mediatek: Add interface to allocate Mediatek GEM buffer Philipp Zabel
2016-01-12 15:47   ` Frank Binns
2016-01-12 22:02   ` Rob Herring
2016-01-12 22:40     ` Daniel Vetter
2016-01-13 11:42       ` Philipp Zabel

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=1454590099.3356.22.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=cawa.cheng@mediatek.com \
    --cc=ck.hu@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jie.qiu@mediatek.com \
    --cc=jitao.shi@mediatek.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=pawel.moll@arm.com \
    --cc=pebolle@tiscali.nl \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=tfiga@chromium.org \
    --cc=yingjoe.chen@mediatek.com \
    --cc=yt.shen@mediatek.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).