All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Rob Clark <robdclark@gmail.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	"David Airlie" <airlied@linux.ie>,
	freedreno <freedreno@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Stephen Boyd <swboyd@chromium.org>, Vinod Koul <vkoul@kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Sean Paul <sean@poorly.run>
Subject: Re: [PATCH v4] drm/msm/dsi: don't powerup at modeset time for parade-ps8640
Date: Thu, 12 May 2022 16:04:54 -0700	[thread overview]
Message-ID: <09d99477-ac9d-ee90-41f1-af13a302d25d@quicinc.com> (raw)
In-Reply-To: <CAD=FV=U_dfCzcW6kP9zH=pxOUAioTMwh7=0-_=zSAkX9hurZmg@mail.gmail.com>

Hi,

On 5/12/2022 3:44 PM, Doug Anderson wrote:
> Hi,
> 
> On Thu, May 12, 2022 at 3:34 PM Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>> On 5/12/2022 3:16 PM, Dmitry Baryshkov wrote:
>>> On 13/05/2022 01:00, Douglas Anderson wrote:
>>>> Commit 7d8e9a90509f ("drm/msm/dsi: move DSI host powerup to modeset
>>>> time") caused sc7180 Chromebooks that use the parade-ps8640 bridge
>>>> chip to fail to turn the display back on after it turns off.
>>>>
>>>> Unfortunately, it doesn't look easy to fix the parade-ps8640 driver to
>>>> handle the new power sequence. The Linux driver has almost nothing in
>>>> it and most of the logic for this bridge chip is in black-box firmware
>>>> that the bridge chip uses.
>>>>
>>>> Also unfortunately, reverting the patch will break "tc358762".
>>>>
>>>> The long term solution here is probably Dave Stevenson's series [1]
>>>> that would give more flexibility. However, that is likely not a quick
>>>> fix.
>>>>
>>>> For the short term, we'll look at the compatible of the next bridge in
>>>> the chain and go back to the old way for the Parade PS8640 bridge
>>>> chip. If it's found that other bridge chips also need this workaround
>>>> then we can add them to the list or consider inverting the condition.
>>>>
>>>> [1]
>>>> https://lore.kernel.org/r/cover.1646406653.git.dave.stevenson@raspberrypi.com
>>>>
>>>>
>>>> Fixes: 7d8e9a90509f ("drm/msm/dsi: move DSI host powerup to modeset
>>>> time")
>>>> Suggested-by: Rob Clark <robdclark@gmail.com>
>>>> Signed-off-by: Douglas Anderson <dianders@chromium.org>
>>>
>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>
>> Yes, I think this is a better solution than a full revert
>>
>> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
>>
>> I am curious to know why this doesnt work for parade but will not hold
>> this patch back for that. We are initializing and turning on DSI PHY now
>> before turning on the bridge chip which is actually better as we are
>> putting PHY in a good state.
>>
>> So this should have been better, but somehow doesn't work.
> 
> I can't really explain it, but mostly because the Parade chip is just
> a big black box. There have been several times when an OEM using this
> bridge chip had one problem or another with getting the display to
> turn on, then the parade FAE would make some magic tweak to the
> firmware and it would be fixed. The current way that the Linux driver
> is working is with pretty much zero configuration so I think this chip
> bakes in a bunch of assumptions about the timings / signal coming from
> the MIPI DSI side. It doesn't surprise me that changing the order like
> this would confuse it.
> 
> In theory I believe the Parade chip can run in a less "automatic" mode
> where everything is configured and controlled by Linux. I'd really
> have preferred if we could have gotten that done, but it didn't end up
> happening. :(
> 
> -Doug

Again this is not to block this change (you already have my ack) but 
perhaps to help you debug this for future reference as we wont know what 
change can break parade even in the future if this happens again and the 
compatible check for parade will keep growing.

One suggestion I can give is can we read any status bits out of the 
parade chip in the power_on() method as its right after the new method 
to check why its not in good status or what error bits it throws and 
perhaps share those error bits with the FAE to see when this error can 
come to decode this black box a bit :)

 From those bits, we can narrow down why this timing or sequence change 
is affecting them. Like some things could be somehow this is delaying 
the video pixels from transmitting, it expects PHY to be in some state 
etc and we can kind-of reverse engineer why this change broke it.

Like-wise, it is highly possible at the moment we have identified only 
parade not to work but if there is something wrong with this change we 
can atleast know what and address it.

Thanks

Abhinav

WARNING: multiple messages have this Message-ID (diff)
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Sean Paul <sean@poorly.run>, Vinod Koul <vkoul@kernel.org>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	David Airlie <airlied@linux.ie>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	freedreno <freedreno@lists.freedesktop.org>
Subject: Re: [PATCH v4] drm/msm/dsi: don't powerup at modeset time for parade-ps8640
Date: Thu, 12 May 2022 16:04:54 -0700	[thread overview]
Message-ID: <09d99477-ac9d-ee90-41f1-af13a302d25d@quicinc.com> (raw)
In-Reply-To: <CAD=FV=U_dfCzcW6kP9zH=pxOUAioTMwh7=0-_=zSAkX9hurZmg@mail.gmail.com>

Hi,

On 5/12/2022 3:44 PM, Doug Anderson wrote:
> Hi,
> 
> On Thu, May 12, 2022 at 3:34 PM Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>> On 5/12/2022 3:16 PM, Dmitry Baryshkov wrote:
>>> On 13/05/2022 01:00, Douglas Anderson wrote:
>>>> Commit 7d8e9a90509f ("drm/msm/dsi: move DSI host powerup to modeset
>>>> time") caused sc7180 Chromebooks that use the parade-ps8640 bridge
>>>> chip to fail to turn the display back on after it turns off.
>>>>
>>>> Unfortunately, it doesn't look easy to fix the parade-ps8640 driver to
>>>> handle the new power sequence. The Linux driver has almost nothing in
>>>> it and most of the logic for this bridge chip is in black-box firmware
>>>> that the bridge chip uses.
>>>>
>>>> Also unfortunately, reverting the patch will break "tc358762".
>>>>
>>>> The long term solution here is probably Dave Stevenson's series [1]
>>>> that would give more flexibility. However, that is likely not a quick
>>>> fix.
>>>>
>>>> For the short term, we'll look at the compatible of the next bridge in
>>>> the chain and go back to the old way for the Parade PS8640 bridge
>>>> chip. If it's found that other bridge chips also need this workaround
>>>> then we can add them to the list or consider inverting the condition.
>>>>
>>>> [1]
>>>> https://lore.kernel.org/r/cover.1646406653.git.dave.stevenson@raspberrypi.com
>>>>
>>>>
>>>> Fixes: 7d8e9a90509f ("drm/msm/dsi: move DSI host powerup to modeset
>>>> time")
>>>> Suggested-by: Rob Clark <robdclark@gmail.com>
>>>> Signed-off-by: Douglas Anderson <dianders@chromium.org>
>>>
>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>
>> Yes, I think this is a better solution than a full revert
>>
>> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
>>
>> I am curious to know why this doesnt work for parade but will not hold
>> this patch back for that. We are initializing and turning on DSI PHY now
>> before turning on the bridge chip which is actually better as we are
>> putting PHY in a good state.
>>
>> So this should have been better, but somehow doesn't work.
> 
> I can't really explain it, but mostly because the Parade chip is just
> a big black box. There have been several times when an OEM using this
> bridge chip had one problem or another with getting the display to
> turn on, then the parade FAE would make some magic tweak to the
> firmware and it would be fixed. The current way that the Linux driver
> is working is with pretty much zero configuration so I think this chip
> bakes in a bunch of assumptions about the timings / signal coming from
> the MIPI DSI side. It doesn't surprise me that changing the order like
> this would confuse it.
> 
> In theory I believe the Parade chip can run in a less "automatic" mode
> where everything is configured and controlled by Linux. I'd really
> have preferred if we could have gotten that done, but it didn't end up
> happening. :(
> 
> -Doug

Again this is not to block this change (you already have my ack) but 
perhaps to help you debug this for future reference as we wont know what 
change can break parade even in the future if this happens again and the 
compatible check for parade will keep growing.

One suggestion I can give is can we read any status bits out of the 
parade chip in the power_on() method as its right after the new method 
to check why its not in good status or what error bits it throws and 
perhaps share those error bits with the FAE to see when this error can 
come to decode this black box a bit :)

 From those bits, we can narrow down why this timing or sequence change 
is affecting them. Like some things could be somehow this is delaying 
the video pixels from transmitting, it expects PHY to be in some state 
etc and we can kind-of reverse engineer why this change broke it.

Like-wise, it is highly possible at the moment we have identified only 
parade not to work but if there is something wrong with this change we 
can atleast know what and address it.

Thanks

Abhinav

  reply	other threads:[~2022-05-12 23:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 22:00 [PATCH v4] drm/msm/dsi: don't powerup at modeset time for parade-ps8640 Douglas Anderson
2022-05-12 22:00 ` Douglas Anderson
2022-05-12 22:16 ` Dmitry Baryshkov
2022-05-12 22:16   ` Dmitry Baryshkov
2022-05-12 22:33   ` Abhinav Kumar
2022-05-12 22:33     ` Abhinav Kumar
2022-05-12 22:44     ` Doug Anderson
2022-05-12 22:44       ` Doug Anderson
2022-05-12 23:04       ` Abhinav Kumar [this message]
2022-05-12 23:04         ` Abhinav Kumar

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=09d99477-ac9d-ee90-41f1-af13a302d25d@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --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=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    --cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.