[Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the ESI we actually handled

Jani Nikula jani.nikula at intel.com
Fri Jan 21 11:27:13 UTC 2022


On Thu, 20 Jan 2022, "Shankar, Uma" <uma.shankar at intel.com> wrote:
>> -----Original Message-----
>> From: Nikula, Jani <jani.nikula at intel.com>
>> Sent: Thursday, January 20, 2022 4:32 PM
>> To: Shankar, Uma <uma.shankar at intel.com>; intel-gfx at lists.freedesktop.org
>> Subject: Re: [Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the ESI we
>> actually handled
>> 
>> On Thu, 20 Jan 2022, "Shankar, Uma" <uma.shankar at intel.com> wrote:
>> >> -----Original Message-----
>> >> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf
>> >> Of Jani Nikula
>> >> Sent: Wednesday, January 12, 2022 4:33 PM
>> >> To: intel-gfx at lists.freedesktop.org
>> >> Cc: Nikula, Jani <jani.nikula at intel.com>
>> >> Subject: [Intel-gfx] [PATCH RESEND 7/7] 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.
>> >
>> > Looks Good to me.
>> > Reviewed-by: Uma Shankar <uma.shankar at intel.com>
>> 
>> Thanks, please also see v2 of this patch I accidentally posted to the old thread first. I
>> guess you were replying to two threads too. :)
>
> Yeah seems reply got mixed up. I have replied on correct versions now.

Many thanks for the reviews, pushed to drm-intel-next.

BR,
Jani.


>
> Regards,
> Uma Shankar
>
>> BR,
>> Jani
>> 
>> >
>> >> Signed-off-by: Jani Nikula <jani.nikula at 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 95e9f7220ab8..548419a4ead8 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] |= 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
>> >
>> 
>> --
>> Jani Nikula, Intel Open Source Graphics Center

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list