All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shankar, Uma" <uma.shankar@intel.com>
To: "Nikula, Jani" <jani.nikula@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract intel_dp_ack_sink_irq_esi()
Date: Thu, 20 Jan 2022 10:35:52 +0000	[thread overview]
Message-ID: <4cf9ab91809a4fa4b20ca2786d08a1f1@intel.com> (raw)
In-Reply-To: <87h79yaeai.fsf@intel.com>



> -----Original Message-----
> From: Nikula, Jani <jani.nikula@intel.com>
> Sent: Thursday, January 20, 2022 4:02 PM
> To: Shankar, Uma <uma.shankar@intel.com>; intel-gfx@lists.freedesktop.org
> Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract
> intel_dp_ack_sink_irq_esi()
> 
> On Thu, 20 Jan 2022, "Shankar, Uma" <uma.shankar@intel.com> wrote:
> >> -----Original Message-----
> >> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani
> Nikula
> >> Sent: Tuesday, January 4, 2022 11:10 PM
> >> To: intel-gfx@lists.freedesktop.org
> >> Cc: Nikula, Jani <jani.nikula@intel.com>
> >> Subject: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract
> intel_dp_ack_sink_irq_esi()
> >>
> >> Smaller functions make the thing easier to read. Debug log failures to ack.
> >>
> >> Note: Looks like we have the retry loop simply because of hysterical raisins,
> dating
> >
> > Nit: Typo in reasons.
> 
> ;)
> 
> http://www.catb.org/jargon/html/H/hysterical-reasons.html

Oh, didn't knew that 😊. A new phrase in vocabulary 😝

> >
> > Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> >
> >> back to the original DP MST enabling. Keep it, though I have no idea why we have
> it.
> >>
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/display/intel_dp.c | 25 +++++++++++++++----------
> >>  1 file changed, 15 insertions(+), 10 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> >> b/drivers/gpu/drm/i915/display/intel_dp.c
> >> index 357c39e09bf6..ebf80a875a41 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> >> @@ -2820,6 +2820,19 @@ intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp,
> u8
> >> *sink_irq_vector)
> >>  		DP_DPRX_ESI_LEN;
> >>  }
> >>
> >> +static bool intel_dp_ack_sink_irq_esi(struct intel_dp *intel_dp, u8
> >> +esi[4]) {
> >> +	int retry;
> >> +
> >> +	for (retry = 0; retry < 3; retry++) {
> >> +		if (drm_dp_dpcd_write(&intel_dp->aux, DP_SINK_COUNT_ESI + 1,
> >> +				      &esi[1], 3) == 3)
> >> +			return true;
> >> +	}
> >> +
> >> +	return false;
> >> +}
> >> +
> >>  bool
> >>  intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
> >>  		       const struct drm_connector_state *conn_state) @@ -3660,7
> >> +3673,6 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
> >>  		 */
> >>  		u8 esi[DP_DPRX_ESI_LEN+2] = {};
> >>  		bool handled;
> >> -		int retry;
> >>
> >>  		if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
> >>  			drm_dbg_kms(&i915->drm,
> >> @@ -3685,15 +3697,8 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
> >>  		if (!handled)
> >>  			break;
> >>
> >> -		for (retry = 0; retry < 3; retry++) {
> >> -			int wret;
> >> -
> >> -			wret = drm_dp_dpcd_write(&intel_dp->aux,
> >> -						 DP_SINK_COUNT_ESI+1,
> >> -						 &esi[1], 3);
> >> -			if (wret == 3)
> >> -				break;
> >> -		}
> >> +		if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
> >> +			drm_dbg_kms(&i915->drm, "Failed to ack ESI\n");
> >>  	}
> >>
> >>  	return link_ok;
> >> --
> >> 2.30.2
> >
> 
> --
> Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-01-20 10:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 17:39 [Intel-gfx] [PATCH 0/7] drm/i915/mst: DP MST ESI handling improvements Jani Nikula
2022-01-04 17:39 ` [Intel-gfx] [PATCH 1/7] drm/i915/mst: fix intel_dp_mst_hpd_irq() indentation Jani Nikula
2022-01-20 10:24   ` Shankar, Uma
2022-01-04 17:39 ` [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract intel_dp_ack_sink_irq_esi() Jani Nikula
2022-01-20 10:28   ` Shankar, Uma
2022-01-20 10:32     ` Jani Nikula
2022-01-20 10:35       ` Shankar, Uma [this message]
2022-01-04 17:39 ` [Intel-gfx] [PATCH 3/7] drm/i915/mst: debug log 4 bytes of ESI right after reading Jani Nikula
2022-01-04 17:39 ` [Intel-gfx] [PATCH 4/7] drm/i915/mst: abstract handling of link status in DP MST Jani Nikula
2022-01-04 17:39 ` [Intel-gfx] [PATCH 5/7] drm/i915/mst: read link status only when requested by sink in ESI Jani Nikula
2022-01-04 17:39 ` [Intel-gfx] [PATCH 6/7] drm/i915/mst: ack sink irq ESI for link status changes Jani Nikula
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
2022-01-04 19:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mst: DP MST ESI handling improvements Patchwork
2022-01-04 20:59 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-01-20 11:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mst: DP MST ESI handling improvements (rev2) Patchwork
2022-01-20 13:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=4cf9ab91809a4fa4b20ca2786d08a1f1@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 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.