mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Marek Vasut <marex@denx.de>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Jagan Teki <jagan@amarulasolutions.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Amit Pundir <amit.pundir@linaro.org>
Subject: Re: [PATCH] Revert "drm/bridge: lt9611: Do not generate HFP/HBP/HSA and EOT packet"
Date: Wed, 2 Aug 2023 16:16:08 +0300	[thread overview]
Message-ID: <6f96cd11-5055-ab36-74e3-20a45c0d8b40@linaro.org> (raw)
In-Reply-To: <6cd079a4-2f5b-0169-cbaf-b59a72f1b32b@denx.de>

On 02/08/2023 15:07, Marek Vasut wrote:
> On 8/2/23 10:52, Neil Armstrong wrote:
>> This reverts commit [1] to fix display regression on the Dragonboard 845c
>> (SDM845) devboard.
>>
>> There's a mismatch on the real action of the following flags:
>> - MIPI_DSI_MODE_VIDEO_NO_HSA
>> - MIPI_DSI_MODE_VIDEO_NO_HFP
>> - MIPI_DSI_MODE_VIDEO_NO_HBP
>> which leads to a non-working display on qcom platforms.
>>
>> [1] 8ddce13ae696 ("drm/bridge: lt9611: Do not generate HFP/HBP/HSA and 
>> EOT packet")
>>
>> Cc: Marek Vasut <marex@denx.de>
>> Cc: Robert Foss <rfoss@kernel.org>
>> Cc: Jagan Teki <jagan@amarulasolutions.com>
>> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
>> Fixes: 8ddce13ae69 ("drm/bridge: lt9611: Do not generate HFP/HBP/HSA 
>> and EOT packet")
>> Reported-by: Amit Pundir <amit.pundir@linaro.org>
>> Link: 
>> https://lore.kernel.org/r/CAMi1Hd0TD=2z_=bcDrht3H_wiLvAFcv8Z-U_r_KUOoeMc6UMjw@mail.gmail.com/
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> 
> This breaks LT9611 operation on i.MX8M Mini/Nano/Plus, so, NAK.
> 
> I am currently using this LT9611 with Linux 6.1.y in production and this 
> is not acceptable. I also believe the correct fix is on the MSM side, 
> not on the LT9611 driver side, since MSM incorrectly implements these 
> flags.

There is no indication that MSM gets these flags wrong.

Let me quote the DSI 1.3 (I think Abhinav already quoted DSI 1.2).

Chapter 8.11.1 Transmission Packet Sequences:

========
If a peripheral timing specification for HBP or HFP minimum period is 
zero, the corresponding Blanking
Packet may be omitted. If the HBP or HFP maximum period is zero, the 
corresponding blanking packet
shall be omitted.
========

Next, chapter 8.11.2 Non-Burst Mode with Sync Pulses

======
Normally, periods shown as HSA (Horizontal Sync Active), HBP (Horizontal 
Back Porch) and HFP
(Horizontal Front Porch) are filled by Blanking Packets, with lengths 
(including packet overhead)
calculated to match the period specified by the peripheral’s data sheet. 
Alternatively, if there is sufficient
time to transition from HS to LP mode and back again, a timed interval 
in LP mode may substitute for a
Blanking Packet, thus saving power. During HSA, HBP and HFP periods, the 
bus should stay in the LP-11
state.
========

So, by the spec, sending the HSA / HBP / HFP as blanking packets should 
always be accepted (and it is the default mode). Switching to LP-11 
should be permitted if there is a sufficient time to switch to LP-11 and 
back. Not sending the packets is only possible if the peripheral 
(lt9611) says so.

We already know that lt9611 breaks if we try switching to LP-11 during 
this period. We know that the there is a requirement time for the HSA / 
HBP / HFP, because the HDMI monitor needs them. Thus, I can only 
emphasise that the behaviour before the offending patch was correct.

Last, but not least, breaking the in-kernel platform for the out-of-tree 
peripheral doesn't sound correct.

I can only propose the following steps:

1. land the revert to unbreak existing users.

2. Marek to propose and land the DT bindings & driver change that will 
enable the workaround for the particular platform (i.MX8m).

-- 
With best wishes
Dmitry


  parent reply	other threads:[~2023-08-02 13:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  8:52 Neil Armstrong
2023-08-02  9:08 ` Dmitry Baryshkov
2023-08-04  8:27   ` Neil Armstrong
2023-08-02  9:15 ` Amit Pundir
2023-08-02 12:07 ` Marek Vasut
2023-08-02 12:28   ` Marek Vasut
2023-08-02 12:37     ` Neil Armstrong
2023-08-02 17:31       ` Marek Vasut
2023-08-02 18:12         ` Dmitry Baryshkov
2023-08-02 12:38   ` Dmitry Baryshkov
2023-08-02 17:26     ` Marek Vasut
2023-08-02 13:16   ` Dmitry Baryshkov [this message]
2023-08-02 17:29     ` Marek Vasut
2023-08-02 13:38 ` Dmitry Baryshkov
2023-08-02 17:30   ` Marek Vasut
2023-08-02 18:16     ` Dmitry Baryshkov
2023-08-02 18:45       ` Marek Vasut
2023-08-02 18:49         ` Dmitry Baryshkov
2023-08-02 19:12           ` Laurent Pinchart
2023-08-02 18:49       ` Rob Clark
2023-08-03 18:10         ` Marek Vasut
2023-08-04  8:30           ` Neil Armstrong
2023-08-04  8:30 ` Neil Armstrong

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=6f96cd11-5055-ab36-74e3-20a45c0d8b40@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=amit.pundir@linaro.org \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=rfoss@kernel.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

all inboxes | Powered by JetHome®