From: khsieh@codeaurora.org
To: Stephen Boyd <swboyd@chromium.org>
Cc: dri-devel@lists.freedesktop.org, robdclark@gmail.com,
sean@poorly.run, tanmay@codeaurora.org, abhinavk@codeaurora.org,
aravindh@codeaurora.org, airlied@linux.ie, daniel@ffwll.ch,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/msm/dp: unplug interrupt missed after irq_hpd handler
Date: Wed, 13 Jan 2021 15:46:23 -0800 [thread overview]
Message-ID: <e5c5c32a7a1ee655577b2121ffffb16a@codeaurora.org> (raw)
In-Reply-To: <161056938760.3661239.7140156995833982843@swboyd.mtv.corp.google.com>
On 2021-01-13 12:23, Stephen Boyd wrote:
> Quoting khsieh@codeaurora.org (2021-01-13 09:48:25)
>> On 2021-01-11 11:54, Stephen Boyd wrote:
>> > Quoting Kuogee Hsieh (2021-01-07 12:30:25)
>> >> There is HPD unplug interrupts missed at scenario of an irq_hpd
>> >> followed by unplug interrupts with around 10 ms in between.
>> >> Since both AUX_SW_RESET and DP_SW_RESET clear pending HPD interrupts,
>> >> irq_hpd handler should not issues either aux or sw reset to avoid
>> >> following unplug interrupt be cleared accidentally.
>> >
>> > So the problem is that we're resetting the DP aux phy in the middle of
>> > the HPD state machine transitioning states?
>> >
>> yes, after reset aux, hw clear pending hpd interrupts
>> >>
>> >> Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
>> >> ---
>> >> diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> b/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> index 44f0c57..9c0ce98 100644
>> >> --- a/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> +++ b/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> @@ -190,6 +190,18 @@ int dp_catalog_aux_clear_hw_interrupts(struct
>> >> dp_catalog *dp_catalog)
>> >> return 0;
>> >> }
>> >>
>> >> +/**
>> >> + * dp_catalog_aux_reset() - reset AUX controller
>> >> + *
>> >> + * @aux: DP catalog structure
>> >> + *
>> >> + * return: void
>> >> + *
>> >> + * This function reset AUX controller
>> >> + *
>> >> + * NOTE: reset AUX controller will also clear any pending HPD related
>> >> interrupts
>> >> + *
>> >> + */
>> >> void dp_catalog_aux_reset(struct dp_catalog *dp_catalog)
>> >> {
>> >> u32 aux_ctrl;
>> >> @@ -483,6 +495,18 @@ int dp_catalog_ctrl_set_pattern(struct dp_catalog
>> >> *dp_catalog,
>> >> return 0;
>> >> }
>> >>
>> >> +/**
>> >> + * dp_catalog_ctrl_reset() - reset DP controller
>> >> + *
>> >> + * @aux: DP catalog structure
>> >
>> > It's called dp_catalog though.
>> registers access are through dp_catalog_xxxx
>
> Agreed. The variable is not called 'aux' though, it's called
> 'dp_catalog'.
>
>> >
>> >> + *
>> >> + * return: void
>> >> + *
>> >> + * This function reset DP controller
>> >
>> > resets the
>> >
>> >> + *
>> >> + * NOTE: reset DP controller will also clear any pending HPD related
>> >> interrupts
>> >> + *
>> >> + */
>> >> void dp_catalog_ctrl_reset(struct dp_catalog *dp_catalog)
>
> Right here.
fixed at v2
>
>> >> {
>> >> u32 sw_reset;
>> >> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> index e3462f5..f96c415 100644
>> >> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> @@ -1296,7 +1296,8 @@ static int dp_ctrl_setup_main_link(struct
>> >> dp_ctrl_private *ctrl,
>> >> * transitioned to PUSH_IDLE. In order to start transmitting
>> >> * a link training pattern, we have to first do soft reset.
>> >> */
>> >> - dp_catalog_ctrl_reset(ctrl->catalog);
>> >> + if (*training_step != DP_TRAINING_NONE)
>> >
>> > Can we check for the positive value instead? i.e.
>> > DP_TRAINING_1/DP_TRAINING_2
>> >
>
> Any answer?
fixed at v2
WARNING: multiple messages have this Message-ID (diff)
From: khsieh@codeaurora.org
To: Stephen Boyd <swboyd@chromium.org>
Cc: freedreno@lists.freedesktop.org, airlied@linux.ie,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, abhinavk@codeaurora.org,
tanmay@codeaurora.org, aravindh@codeaurora.org, sean@poorly.run
Subject: Re: [PATCH 2/2] drm/msm/dp: unplug interrupt missed after irq_hpd handler
Date: Wed, 13 Jan 2021 15:46:23 -0800 [thread overview]
Message-ID: <e5c5c32a7a1ee655577b2121ffffb16a@codeaurora.org> (raw)
In-Reply-To: <161056938760.3661239.7140156995833982843@swboyd.mtv.corp.google.com>
On 2021-01-13 12:23, Stephen Boyd wrote:
> Quoting khsieh@codeaurora.org (2021-01-13 09:48:25)
>> On 2021-01-11 11:54, Stephen Boyd wrote:
>> > Quoting Kuogee Hsieh (2021-01-07 12:30:25)
>> >> There is HPD unplug interrupts missed at scenario of an irq_hpd
>> >> followed by unplug interrupts with around 10 ms in between.
>> >> Since both AUX_SW_RESET and DP_SW_RESET clear pending HPD interrupts,
>> >> irq_hpd handler should not issues either aux or sw reset to avoid
>> >> following unplug interrupt be cleared accidentally.
>> >
>> > So the problem is that we're resetting the DP aux phy in the middle of
>> > the HPD state machine transitioning states?
>> >
>> yes, after reset aux, hw clear pending hpd interrupts
>> >>
>> >> Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
>> >> ---
>> >> diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> b/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> index 44f0c57..9c0ce98 100644
>> >> --- a/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> +++ b/drivers/gpu/drm/msm/dp/dp_catalog.c
>> >> @@ -190,6 +190,18 @@ int dp_catalog_aux_clear_hw_interrupts(struct
>> >> dp_catalog *dp_catalog)
>> >> return 0;
>> >> }
>> >>
>> >> +/**
>> >> + * dp_catalog_aux_reset() - reset AUX controller
>> >> + *
>> >> + * @aux: DP catalog structure
>> >> + *
>> >> + * return: void
>> >> + *
>> >> + * This function reset AUX controller
>> >> + *
>> >> + * NOTE: reset AUX controller will also clear any pending HPD related
>> >> interrupts
>> >> + *
>> >> + */
>> >> void dp_catalog_aux_reset(struct dp_catalog *dp_catalog)
>> >> {
>> >> u32 aux_ctrl;
>> >> @@ -483,6 +495,18 @@ int dp_catalog_ctrl_set_pattern(struct dp_catalog
>> >> *dp_catalog,
>> >> return 0;
>> >> }
>> >>
>> >> +/**
>> >> + * dp_catalog_ctrl_reset() - reset DP controller
>> >> + *
>> >> + * @aux: DP catalog structure
>> >
>> > It's called dp_catalog though.
>> registers access are through dp_catalog_xxxx
>
> Agreed. The variable is not called 'aux' though, it's called
> 'dp_catalog'.
>
>> >
>> >> + *
>> >> + * return: void
>> >> + *
>> >> + * This function reset DP controller
>> >
>> > resets the
>> >
>> >> + *
>> >> + * NOTE: reset DP controller will also clear any pending HPD related
>> >> interrupts
>> >> + *
>> >> + */
>> >> void dp_catalog_ctrl_reset(struct dp_catalog *dp_catalog)
>
> Right here.
fixed at v2
>
>> >> {
>> >> u32 sw_reset;
>> >> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> index e3462f5..f96c415 100644
>> >> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> >> @@ -1296,7 +1296,8 @@ static int dp_ctrl_setup_main_link(struct
>> >> dp_ctrl_private *ctrl,
>> >> * transitioned to PUSH_IDLE. In order to start transmitting
>> >> * a link training pattern, we have to first do soft reset.
>> >> */
>> >> - dp_catalog_ctrl_reset(ctrl->catalog);
>> >> + if (*training_step != DP_TRAINING_NONE)
>> >
>> > Can we check for the positive value instead? i.e.
>> > DP_TRAINING_1/DP_TRAINING_2
>> >
>
> Any answer?
fixed at v2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-01-14 1:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 20:30 [PATCH 0/2] *** fix missing unplug interrupt problem *** Kuogee Hsieh
2021-01-07 20:30 ` Kuogee Hsieh
2021-01-07 20:30 ` [PATCH 1/2] drm/msm/dp: postpone irq_hpd event during connection pending state Kuogee Hsieh
2021-01-07 20:30 ` Kuogee Hsieh
2021-01-11 19:55 ` Stephen Boyd
2021-01-11 19:55 ` Stephen Boyd
2021-01-13 17:44 ` khsieh
2021-01-13 17:44 ` khsieh
2021-01-13 20:21 ` Stephen Boyd
2021-01-13 20:21 ` Stephen Boyd
2021-01-13 20:22 ` Stephen Boyd
2021-01-13 20:22 ` Stephen Boyd
2021-01-13 23:44 ` khsieh
2021-01-13 23:44 ` khsieh
2021-01-14 0:00 ` Stephen Boyd
2021-01-14 0:00 ` Stephen Boyd
2021-01-14 17:13 ` khsieh
2021-01-14 17:13 ` khsieh
2021-01-07 20:30 ` [PATCH 2/2] drm/msm/dp: unplug interrupt missed after irq_hpd handler Kuogee Hsieh
2021-01-07 20:30 ` Kuogee Hsieh
2021-01-11 19:54 ` Stephen Boyd
2021-01-11 19:54 ` Stephen Boyd
2021-01-13 17:48 ` khsieh
2021-01-13 17:48 ` khsieh
2021-01-13 20:23 ` Stephen Boyd
2021-01-13 20:23 ` Stephen Boyd
2021-01-13 23:46 ` khsieh [this message]
2021-01-13 23:46 ` khsieh
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=e5c5c32a7a1ee655577b2121ffffb16a@codeaurora.org \
--to=khsieh@codeaurora.org \
--cc=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=aravindh@codeaurora.org \
--cc=daniel@ffwll.ch \
--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=tanmay@codeaurora.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.