dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Caleb Connolly <caleb.connolly@linaro.org>
Cc: freedreno@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
	linux-arm-msm@vger.kernel.org,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	dri-devel@lists.freedesktop.org,
	Stephen Boyd <swboyd@chromium.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Sean Paul <sean@poorly.run>
Subject: Re: [PATCH v2.5] drm/msm/dsi: switch to DRM_PANEL_BRIDGE
Date: Sun, 13 Nov 2022 16:28:22 +0300	[thread overview]
Message-ID: <CAA8EJpq_9iC1rkiZVom28Kv_B3QLd4pBgFObxBfSpJ+Xh=Mp1g@mail.gmail.com> (raw)
In-Reply-To: <1892d0af-8aa4-dc03-887a-e44bb623b836@linaro.org>

Hi Caleb,

On Fri, 11 Nov 2022 at 18:30, Caleb Connolly <caleb.connolly@linaro.org> wrote:
>
> Hi,
>
> This patch has caused a regression on 6.1-rc for some devices that use
> DSI panels. The new behaviour results in the DSI controller being
> switched off before the panel unprepare hook is called. As a result,
> panel drivers which call mipi_dsi_dcs_write() or similar in
> unprepare() fail.

Thanks for the notice. Can you move your command stream to
panel_disable() hook? (even if it's just as a temporary workaround)

From what I see from other panels, some of them call
mipi_dsi_dcs_set_display_off() in the unprepare() hook, while others
do it in disable().

Yes, this is (again) the DSI host vs device order here. Short story:
the DRM has a notion of 'the display pipe (i.e. clocks and timing
signals) feeding the bridge being running'. That's the difference
between enable/pre_enable and disable/post_disable. For the DSI we
have a third state, when the DSI clock and ln0 allow transferring
commands to the panel, but the image is not enabled.

There was a somewhat promising patchset at [1], but it seems it went
out of the radar. I can try working on an alternative (explicit)
approach if I have time.

With respect to your panel. Let me quote the docs: 'Before stopping
video transmission from the display controller it can be necessary to
turn off the panel to avoid visual glitches. This is done in the
.disable() function. Analogously to .enable() this typically involves
turning off the backlight and waiting for some time to make sure no
image is visible on the panel. It is then safe for the display
controller to cease transmission of video data.'

So, if we stop the call chain after switching the DSI host off but
before calling the panel's unprepare() hook, will we see any
artifacts/image leftover/etc. on the panel? Generally I have the
feeling that all panels should call mipi_dsi_dcs_set_display_off() in
the .disable() hook, not in the .unprepare() one.

[1] https://lore.kernel.org/dri-devel/cover.1646406653.git.dave.stevenson@raspberrypi.com/

>
> I've noticed it specifically on the OnePlus 6 (with upstream Samsung
> s0fef00 panel driver) and the SHIFT6mq with an out of tree driver.
>
> On 12/07/2022 14:22, Dmitry Baryshkov wrote:
> > Currently the DSI driver has two separate paths: one if the next device
> > in a chain is a bridge and another one if the panel is connected
> > directly to the DSI host. Simplify the code path by using panel-bridge
> > driver (already selected in Kconfig) and dropping support for
> > handling the panel directly.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >
> > I'm not sending this as a separate patchset (I'd like to sort out mdp5
> > first), but more of a preview of changes related to
> > msm_dsi_manager_ext_bridge_init().
> >
> > ---
> >   drivers/gpu/drm/msm/dsi/dsi.c         |  35 +---
> >   drivers/gpu/drm/msm/dsi/dsi.h         |  16 +-
> >   drivers/gpu/drm/msm/dsi/dsi_host.c    |  25 ---
> >   drivers/gpu/drm/msm/dsi/dsi_manager.c | 283 +++-----------------------
> >   4 files changed, 36 insertions(+), 323 deletions(-)

[skipped the patch itself]

-- 
With best wishes
Dmitry

  parent reply	other threads:[~2022-11-13 13:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11  9:43 [PATCH v2 0/4] drm/msm/dsi: stop using drm_panel directly Dmitry Baryshkov
2022-07-11  9:43 ` [PATCH v2 1/4] drm/mipi-dsi: pass DSC data through the struct mipi_dsi_device Dmitry Baryshkov
2022-07-11 17:41   ` Abhinav Kumar
2022-07-11  9:43 ` [PATCH v2 2/4] drm/msm/dsi: fetch DSC pps payload from " Dmitry Baryshkov
2022-07-11 17:42   ` Abhinav Kumar
2022-07-11  9:43 ` [PATCH v2 3/4] drm/panel: drop DSC pps pointer Dmitry Baryshkov
2022-07-11 17:52   ` Abhinav Kumar
2022-07-11  9:43 ` [PATCH v2 4/4] drm/msm/dsi: switch to DRM_PANEL_BRIDGE Dmitry Baryshkov
2022-07-11 22:39   ` Abhinav Kumar
2022-07-11 22:54     ` [Freedreno] " Abhinav Kumar
2022-07-12 10:13       ` Dmitry Baryshkov
2022-07-12 19:53         ` Abhinav Kumar
2022-07-12 10:00     ` Dmitry Baryshkov
2022-07-12 19:15       ` [Freedreno] " Abhinav Kumar
2022-07-12 20:10         ` Dmitry Baryshkov
2022-07-12 21:21           ` Abhinav Kumar
2022-07-12 13:22     ` [PATCH v2.5] " Dmitry Baryshkov
2022-07-14 21:54       ` [Freedreno] " Abhinav Kumar
2022-08-22 17:53         ` Dmitry Baryshkov
2022-08-27 21:34           ` Abhinav Kumar
2022-11-11 15:30       ` Caleb Connolly
2022-11-13 10:23         ` [PATCH v2.5] drm/msm/dsi: switch to DRM_PANEL_BRIDGE #forregzbot Thorsten Leemhuis
2022-12-08 15:26           ` Thorsten Leemhuis
2022-11-13 13:28         ` Dmitry Baryshkov [this message]
2022-11-23 10:12           ` [PATCH v2.5] drm/msm/dsi: switch to DRM_PANEL_BRIDGE Thorsten Leemhuis

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='CAA8EJpq_9iC1rkiZVom28Kv_B3QLd4pBgFObxBfSpJ+Xh=Mp1g@mail.gmail.com' \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=caleb.connolly@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    /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).