From: Kuogee Hsieh <quic_khsieh@quicinc.com>
To: Doug Anderson <dianders@chromium.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>,
Stephen Boyd <swboyd@chromium.org>,
Andy Gross <agross@kernel.org>, David Airlie <airlied@linux.ie>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
"Daniel Vetter" <daniel@ffwll.ch>,
dri-devel <dri-devel@lists.freedesktop.org>,
"Rob Clark" <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Vinod Koul <vkoul@kernel.org>,
"Aravind Venkateswaran (QUIC)" <quic_aravindh@quicinc.com>,
Sankeerth Billakanti <quic_sbillaka@quicinc.com>,
freedreno <freedreno@lists.freedesktop.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 2/3] drm/msm/dp: decoupling dp->id out of dp controller_id at scxxxx_dp_cfg table
Date: Tue, 28 Jun 2022 08:22:47 -0700 [thread overview]
Message-ID: <ba89c17a-bf8d-0eda-d975-26e88d43e0aa@quicinc.com> (raw)
In-Reply-To: <CAD=FV=WvNrfYaUgbDayxU0wJUbZbgwVMWjeyTjtd+Sqcvj=e2A@mail.gmail.com>
On 6/27/2022 4:20 PM, Doug Anderson wrote:
> Hi,
>
> On Sat, Jun 25, 2022 at 1:48 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
>> On Sat, 25 Jun 2022 at 04:23, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>> On 6/24/2022 5:11 PM, Dmitry Baryshkov wrote:
>>>> On Sat, 25 Jun 2022 at 03:03, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>>>> On 6/24/2022 4:56 PM, Kuogee Hsieh wrote:
>>>>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c
>>>>> b/drivers/gpu/drm/msm/dp/dp_display.c
>>>>> index dcd80c8a794c..7816e82452ca 100644
>>>>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>>>>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>>>>> @@ -140,8 +140,8 @@ static const struct msm_dp_config sc7180_dp_cfg = {
>>>>>
>>>>> static const struct msm_dp_config sc7280_dp_cfg = {
>>>>> .descs = (const struct msm_dp_desc[]) {
>>>>> - [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000,
>>>>> .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true },
>>>>> [MSM_DP_CONTROLLER_1] = { .io_start = 0x0aea0000,
>>>>> .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true },
>>>>> + [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000,
>>>>> .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true },
>>>>> },
>>>>> .num_descs = 2,
>>>>> };
>>>>>
>>>>>
>>>>> The reason order is important is because in this function below, even
>>>>> though it matches the address to find which one to use it loops through
>>>>> the array and so the value of *id will change depending on which one is
>>>>> located where.
>>>>>
>>>>> static const struct msm_dp_desc *dp_display_get_desc(struct
>>>>> platform_device *pdev,
>>>>> unsigned int *id)
>>>>> {
>>>>> const struct msm_dp_config *cfg = of_device_get_match_data(&pdev->dev);
>>>>> struct resource *res;
>>>>> int i;
>>>>>
>>>>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>>> if (!res)
>>>>> return NULL;
>>>>>
>>>>> for (i = 0; i < cfg->num_descs; i++) {
>>>>> if (cfg->descs[i].io_start == res->start) {
>>>>> *id = i;
>>>> The id is set to the index of the corresponding DP instance in the
>>>> descs array, which is MSM_DP_CONTROLLER_n. Correct up to now.
>>> Right, this is where I misunderstood his explanation.
>>>
>>> Even if we swap the order, but retain the index correctly it will still
>>> work today.
>>>
>>> Hes not sure of the root-cause of why turning on the primary display
>>> first fixes the issue.
>>>
>>> I think till we root-cause that, lets put this on hold.
>> Agreed. Let's find the root cause.
> FWIW, I was poking a little bit about the glitch that Kuogee was
> trying to fix here. Through a bunch of hacky heuristics I think the
> dpu_hw_ctl_trigger_flush_v1() is the function that "causes" the
> corruption. Specifically I managed to do something like:
>
> if (hacky_heuristic)
> pr_info("About to call flush\n);
> mdelay(2000);
> }
> ctl->ops.trigger_flush(ctl)
> if (hacky_heuristic)
> pr_info("Finished calling flush\n);
> mdelay(2000);
> pr_info("Finished calling flush delay done\n);
> }
flush bit need to up update at real time.
otherwise unexpected side effects will happen.
i try same thing, but I got fence timeout error.
Anyway, I had submit new patch to fix corruption issue.
Thanks for your efforts and helps.
> I then watched my display and reproduced the problem. When I saw the
> problem I looked over at the console and saw "Finished calling flush"
> was the last thing printed.
>
> I don't know if this helps much. Presumably we're flushing a bunch of
> previous operations so whatever we had queued up probably matters
> more, but maybe it'll give a clue?
>
>
> Other notes FWIW:
>
> * If you increase the amount of time of the glitching, you can
> actually see that we are glitching both the internal and external
> displays.
>
> * You can actually make the glitch stay on the screen "permanently" by
> unplugging the external display while the internal screen is off. I
> don't know why it doesn't always happen, but it seems to happen often
> enough. Presumably if someone knew the display controller well they
> could try to figure out what state it was in and debug the problem.
>
>
> -Doug
next prev parent reply other threads:[~2022-06-28 15:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 17:15 [PATCH v1 0/3] fix primary corruption issue Kuogee Hsieh
2022-06-24 17:15 ` [PATCH v1 1/3] drm/msm/dp: move struc of msm_display_info to msm_drv.h Kuogee Hsieh
2022-06-24 21:40 ` Doug Anderson
2022-06-24 21:50 ` Kuogee Hsieh
2022-06-24 23:45 ` Dmitry Baryshkov
2022-06-24 23:41 ` Dmitry Baryshkov
2022-06-24 17:15 ` [PATCH v1 2/3] drm/msm/dp: decoupling dp->id out of dp controller_id at scxxxx_dp_cfg table Kuogee Hsieh
2022-06-24 20:00 ` Stephen Boyd
2022-06-24 21:17 ` Kuogee Hsieh
2022-06-24 21:40 ` Stephen Boyd
2022-06-24 21:49 ` Kuogee Hsieh
2022-06-24 22:19 ` Stephen Boyd
2022-06-24 22:53 ` Kuogee Hsieh
2022-06-24 23:12 ` Stephen Boyd
2022-06-24 23:30 ` Kuogee Hsieh
2022-06-24 23:45 ` Stephen Boyd
2022-06-24 23:53 ` Dmitry Baryshkov
2022-06-24 23:56 ` Kuogee Hsieh
2022-06-25 0:03 ` Abhinav Kumar
2022-06-25 0:11 ` Stephen Boyd
2022-06-25 0:23 ` Stephen Boyd
2022-06-25 1:15 ` Abhinav Kumar
2022-06-25 0:11 ` Dmitry Baryshkov
2022-06-25 0:19 ` Kuogee Hsieh
2022-06-25 0:21 ` Dmitry Baryshkov
2022-06-25 0:23 ` Kuogee Hsieh
2022-06-25 0:28 ` Dmitry Baryshkov
2022-06-25 0:46 ` Dmitry Baryshkov
2022-06-25 1:02 ` Kuogee Hsieh
2022-06-25 1:15 ` Stephen Boyd
2022-06-27 15:33 ` Kuogee Hsieh
2022-06-27 15:38 ` Dmitry Baryshkov
2022-06-27 15:49 ` Kuogee Hsieh
2022-06-25 1:23 ` Abhinav Kumar
2022-06-25 8:48 ` Dmitry Baryshkov
2022-06-27 23:20 ` Doug Anderson
2022-06-28 15:22 ` Kuogee Hsieh [this message]
2022-06-24 23:25 ` Dmitry Baryshkov
2022-06-24 17:15 ` [PATCH v1 3/3] drm/msm/dp: place edp at head of drm bridge chain to fix screen corruption Kuogee Hsieh
2022-06-24 23:56 ` 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=ba89c17a-bf8d-0eda-d975-26e88d43e0aa@quicinc.com \
--to=quic_khsieh@quicinc.com \
--cc=agross@kernel.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--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=quic_abhinavk@quicinc.com \
--cc=quic_aravindh@quicinc.com \
--cc=quic_sbillaka@quicinc.com \
--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 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®