public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Maxime Ripard <mripard@kernel.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Marek Vasut <marex@denx.de>, Robert Foss <rfoss@kernel.org>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Jessica Zhang <quic_jesszhan@quicinc.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	linux-arm-msm@vger.kernel.org,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Sean Paul <sean@poorly.run>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Douglas Anderson <dianders@chromium.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	freedreno@lists.freedesktop.org
Subject: Re: [RFC PATCH 03/10] drm/mipi-dsi: add API for manual control over the DSI link power state
Date: Mon, 23 Oct 2023 10:14:18 +0200	[thread overview]
Message-ID: <3266380.44csPzL39Z@steina-w> (raw)
In-Reply-To: <CAA8EJpofiawC5z3jw1-TsxS+ZWz4QobCby3kScDDdk9Z-74mgQ@mail.gmail.com>

Am Montag, 23. Oktober 2023, 09:34:42 CEST schrieb Dmitry Baryshkov:
> On Mon, 23 Oct 2023 at 09:52, Alexander Stein
> 
> <alexander.stein@ew.tq-group.com> wrote:
> > Hi Dmitry,
> > 
> > Am Sonntag, 22. Oktober 2023, 12:49:41 CEST schrieb Dmitry Baryshkov:
> > > On Thu, 19 Oct 2023 at 14:42, Alexander Stein
> > > 
> > > <alexander.stein@ew.tq-group.com> wrote:
> > > > Hi,
> > > > 
> > > > Am Donnerstag, 19. Oktober 2023, 13:19:51 CEST schrieb Dmitry 
Baryshkov:
> > > > > On Thu, 19 Oct 2023 at 12:26, Maxime Ripard <mripard@kernel.org> 
wrote:
> > > > > > On Mon, Oct 16, 2023 at 07:53:48PM +0300, Dmitry Baryshkov wrote:
> > > > > > > The MIPI DSI links do not fully fall into the DRM callbacks
> > > > > > > model.
> > > > > > 
> > > > > > Explaining why would help
> > > > > 
> > > > > A kind of explanation comes afterwards, but probably I should change
> > > > > the order of the phrases and expand it:
> > > > > 
> > > > > The atomic_pre_enable / atomic_enable and correspondingly
> > > > > atomic_disable / atomic_post_disable expect that the bridge links
> > > > > follow a simple paradigm: either it is off, or it is on and
> > > > > streaming
> > > > > video. Thus, it is fine to just enable the link at the enable time,
> > > > > doing some preparations during the pre_enable.
> > > > > 
> > > > > But then it causes several issues with DSI. First, some of the DSI
> > > > > bridges and most of the DSI panels would like to send commands over
> > > > > the DSI link to setup the device. Next, some of the DSI hosts have
> > > > > limitations on sending the commands. The proverbial sunxi DSI host
> > > > > can
> > > > > not send DSI commands after the video stream has started. Thus most
> > > > > of
> > > > > the panels have opted to send all DSI commands from pre_enable (or
> > > > > prepare) callback (before the video stream has started).
> > > > > 
> > > > > However this leaves no good place for the DSI host to power up the
> > > > > DSI
> > > > > link. By default the host's pre_enable callback is called after the
> > > > > DSI bridge's pre_enable. For quite some time we were powering up the
> > > > > DSI link from mode_set. This doesn't look fully correct. And also we
> > > > > got into the issue with ps8640 bridge, which requires for the DSI
> > > > > link
> > > > > to be quiet / unpowered at the bridge's reset time.
> > > > 
> > > > There are also bridges (e.g. tc358767) which require DSI-LP11 upon
> > > > bridge
> > > > reset. And additionally this DSI-(e)DP bridge requires LP11 while
> > > > accessing
> > > > DP-AUX channel, e.g. reading EDID. So bridges need at least some
> > > > control
> > > > over DSI line state.
> > > 
> > > For sending commands in LP11 it is typical to toggle the
> > > MIPI_DSI_MODE_LPM flag, for example see panel-=jdi-lt070me05000.c or
> > > some other drives. It might be a good idea to make that more explicit.
> > > All suggestions here would be appreciated.
> > 
> > The biggest difference between that display and the tc358767 bridge is
> > that
> > the display uses DSI commands, while the bridge is using i2c transfer to
> > issue DP-AUX commands. There is no host_transfer [1] which would enable
> > LP-11. It seems this DSI-DP bridge requires LP-11/HS on DSI lanes all
> > times. This contradicts current Linux behaviour.
> 
> I see. I took a quick glance at the driver. Does the device mark AUX
> as busy when there is a HS transfer?
> Because otherwise it might be pretty hard to synchronise DP-AUX
> transfers with the DSI link state. We might need to add an API for
> this, if the DSI hosts actually can signal the blanking / DSI LP.

I don't see that a synchronization would be required. AUX should be 
independent from DSI transfers. ASFAICS the bridge internals just requires DSI 
lines to be LP-00 or HS for AUX channel to be functioning.

> 
> Side note: the driver needs some care. It doesn't support the aux-bus
> bindings for eDP panels, it doesn't support other bridges on top of DP
> connectors (but there can be e..g. dp-connector device).

I don't think that this is necessary as you add an optional endpoint to port2 
which will then add an eDP display panel bridge. This should then handle aux-
bus bindings.

Best regards,
Alexander

> > Best regards,
> > Alexander
> > 
> > [1]
> > https://www.kernel.org/doc/html/latest/gpu/drm-kms-helpers.html#mipi-dsi-> > bridge-operation


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



  reply	other threads:[~2023-10-23  8:32 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 16:53 [RFC PATCH 00/10] drm/mipi-dsi: another attempt at sorting out DSI link powerup Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 01/10] Revert "drm/bridge: tc358762: Split register programming from pre-enable to enable" Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 02/10] drm/mipi-dsi: document DSI hosts limitations Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 03/10] drm/mipi-dsi: add API for manual control over the DSI link power state Dmitry Baryshkov
2023-10-19  9:26   ` Maxime Ripard
2023-10-19 11:19     ` Dmitry Baryshkov
2023-10-19 11:42       ` Alexander Stein
2023-10-22 10:49         ` Dmitry Baryshkov
2023-10-23  6:52           ` Alexander Stein
2023-10-23  7:34             ` Dmitry Baryshkov
2023-10-23  8:14               ` Alexander Stein [this message]
2023-10-23  8:40                 ` Dmitry Baryshkov
2023-10-25 12:44       ` Maxime Ripard
2023-10-25 15:16         ` Dmitry Baryshkov
2023-10-26  8:04           ` Maxime Ripard
2023-10-26  8:41             ` Dmitry Baryshkov
2023-11-07 10:57               ` Maxime Ripard
2023-11-07 11:22                 ` Greg Kroah-Hartman
2023-11-07 12:18                   ` Maxime Ripard
2023-11-07 15:26                     ` Greg Kroah-Hartman
2023-11-08 15:34                       ` Maxime Ripard
2023-11-08 15:58                         ` Laurent Pinchart
2023-11-29  8:57                           ` Neil Armstrong
2023-11-27 16:06               ` Michael Walle
2023-11-28 16:49                 ` Dmitry Baryshkov
2023-11-28 16:55                   ` Michael Walle
2023-11-28 17:12                     ` Dmitry Baryshkov
2023-11-28 19:50                       ` Michael Walle
2023-11-28 20:23                         ` Dmitry Baryshkov
2023-11-28 22:17                           ` Michael Walle
2023-11-28 22:20                           ` Michael Walle
2023-11-28 22:21                             ` Dmitry Baryshkov
2023-11-28 22:44                               ` Michael Walle
2023-10-23  7:35   ` Neil Armstrong
2023-10-23  7:40     ` Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 04/10] drm/msm/dsi: use dsi_mgr_bridge_power_off in dsi_mgr_bridge_post_disable Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 05/10] drm/msm/dsi: implement manual power control Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 06/10] drm/bridge: tc358762: add support for manual DSI " Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 07/10] drm/bridge: ps8640: require " Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 08/10] drm/bridge: lt9611: mark for automatic " Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 09/10] drm/bridge: lt9611uxc: implement " Dmitry Baryshkov
2023-10-16 16:53 ` [RFC PATCH 10/10] drm/msm/dsi: drop (again) the ps8640 workaround Dmitry Baryshkov

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=3266380.44csPzL39Z@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_jesszhan@quicinc.com \
    --cc=rfoss@kernel.org \
    --cc=sean@poorly.run \
    --cc=tzimmermann@suse.de \
    /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