From: "Shankar, Uma" <uma.shankar@intel.com>
To: "Nikula, Jani" <jani.nikula@intel.com>,
"Nikula, Jani" <jani.nikula@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/mst: only ack the ESI we actually handled
Date: Thu, 20 Jan 2022 11:31:25 +0000 [thread overview]
Message-ID: <6f607f172c8147f6b87fa0c2e33d96a8@intel.com> (raw)
In-Reply-To: <20220120110102.3116218-1-jani.nikula@intel.com>
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani Nikula
> Sent: Thursday, January 20, 2022 4:31 PM
> To: Nikula, Jani <jani.nikula@intel.com>; intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2] drm/i915/mst: only ack the ESI we actually handled
>
> Seems odd that we clear all event status indicators if we've only handled some. Only
> clear the ones we've handled.
>
> v2: ack DOWN_REP and UP_REQ only if they were set in esi (Ville)
Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 20 ++++++++++++--------
> 1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 0960e6e3be77..cb726cee9e1d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3625,13 +3625,17 @@ static void intel_dp_handle_test_request(struct
> intel_dp *intel_dp) }
>
> static void
> -intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, bool *handled)
> +intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, u8 *ack)
> {
> - drm_dp_mst_hpd_irq(&intel_dp->mst_mgr, esi, handled);
> + bool handled = false;
> +
> + drm_dp_mst_hpd_irq(&intel_dp->mst_mgr, esi, &handled);
> + if (handled)
> + ack[1] |= esi[1] & (DP_DOWN_REP_MSG_RDY |
> DP_UP_REQ_MSG_RDY);
>
> if (esi[1] & DP_CP_IRQ) {
> intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
> - *handled = true;
> + ack[1] |= DP_CP_IRQ;
> }
> }
>
> @@ -3683,7 +3687,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>
> for (;;) {
> u8 esi[4] = {};
> - bool handled;
> + u8 ack[4] = {};
>
> if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
> drm_dbg_kms(&i915->drm,
> @@ -3699,15 +3703,15 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
> esi[3] & LINK_STATUS_CHANGED) {
> if (!intel_dp_mst_link_status(intel_dp))
> link_ok = false;
> - handled = true;
> + ack[3] |= LINK_STATUS_CHANGED;
> }
>
> - intel_dp_mst_hpd_irq(intel_dp, esi, &handled);
> + intel_dp_mst_hpd_irq(intel_dp, esi, ack);
>
> - if (!handled)
> + if (!memchr_inv(ack, 0, sizeof(ack)))
> break;
>
> - if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
> + if (!intel_dp_ack_sink_irq_esi(intel_dp, ack))
> drm_dbg_kms(&i915->drm, "Failed to ack ESI\n");
> }
>
> --
> 2.30.2
next prev parent reply other threads:[~2022-01-20 11:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 11:03 [Intel-gfx] [PATCH RESEND 1/7] drm/i915/mst: fix intel_dp_mst_hpd_irq() indentation Jani Nikula
2022-01-12 11:03 ` [Intel-gfx] [PATCH RESEND 2/7] drm/i915/mst: abstract intel_dp_ack_sink_irq_esi() Jani Nikula
2022-01-20 11:29 ` Shankar, Uma
2022-01-12 11:03 ` [Intel-gfx] [PATCH RESEND 3/7] drm/i915/mst: debug log 4 bytes of ESI right after reading Jani Nikula
2022-01-20 10:37 ` Shankar, Uma
2022-01-12 11:03 ` [Intel-gfx] [PATCH RESEND 4/7] drm/i915/mst: abstract handling of link status in DP MST Jani Nikula
2022-01-20 10:39 ` Shankar, Uma
2022-01-12 11:03 ` [Intel-gfx] [PATCH RESEND 5/7] drm/i915/mst: read link status only when requested by sink in ESI Jani Nikula
2022-01-20 10:41 ` Shankar, Uma
2022-01-12 11:03 ` [Intel-gfx] [PATCH RESEND 6/7] drm/i915/mst: ack sink irq ESI for link status changes Jani Nikula
2022-01-20 10:42 ` Shankar, Uma
2022-01-12 11:03 ` [Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the ESI we actually handled Jani Nikula
2022-01-20 10:43 ` Shankar, Uma
2022-01-20 11:01 ` Jani Nikula
2022-01-20 11:33 ` Shankar, Uma
2022-01-21 11:27 ` Jani Nikula
2022-01-20 11:01 ` [Intel-gfx] [PATCH v2] " Jani Nikula
2022-01-20 11:31 ` Shankar, Uma [this message]
2022-01-12 13:30 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [RESEND,1/7] drm/i915/mst: fix intel_dp_mst_hpd_irq() indentation Patchwork
2022-01-12 17:27 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-01-20 11:28 ` [Intel-gfx] [PATCH RESEND 1/7] " Shankar, Uma
2022-01-20 11:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [RESEND,1/7] drm/i915/mst: fix intel_dp_mst_hpd_irq() indentation (rev2) Patchwork
2022-01-20 13:57 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2022-01-04 17:39 [Intel-gfx] [PATCH 7/7] drm/i915/mst: only ack the ESI we actually handled Jani Nikula
2022-01-20 10:30 ` [Intel-gfx] [PATCH v2] " Jani Nikula
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=6f607f172c8147f6b87fa0c2e33d96a8@intel.com \
--to=uma.shankar@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/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).