From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4EF6C3DA63 for ; Wed, 24 Jul 2024 11:16:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF38B10E05A; Wed, 24 Jul 2024 11:16:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CjDQmgVn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B0A610E05A for ; Wed, 24 Jul 2024 11:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721819757; x=1753355757; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=R/RPaEZpF6BJddJvQ8wPnIgCAsttvbiqRFZ/FA/DJYE=; b=CjDQmgVnMEQf7MwNd8wYIe6P+VwF8t0OZqOvOpMhqmOsncqi63UoZvCh yXOGKHpr9oWliuooHSZNg3lTSUYLy40tSW9whRYjKhnEg8EIX+TBVZshz LpQYiLzOPaGKGKXRyl6cRjzq3aeoHa0MzA3cMGNNBgJug/NYhEoP9D6En ZIsaCOWuctWb44bq3cZkCkpDTUf4M2Lq4/wFQvQ1tcXN8aX0psus9n5KG kiuDzgkMFySDY87FjAjpPV6LrTuFdPOFgHto/VMf+wtIkSS7bWL/afBl7 Uxyh0fCVX9xjGdeo3ybb0bMJag59mIEIXxNVOjNV8HRnn2qNwOd1J71i7 Q==; X-CSE-ConnectionGUID: AkTwnis6RKy25fq8QqzSIA== X-CSE-MsgGUID: QL/R7vF1TFGJ+7Ax+lKe7g== X-IronPort-AV: E=McAfee;i="6700,10204,11142"; a="36943137" X-IronPort-AV: E=Sophos;i="6.09,232,1716274800"; d="scan'208";a="36943137" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2024 04:15:57 -0700 X-CSE-ConnectionGUID: zVJtlPfISACOuxQM9kJ4XA== X-CSE-MsgGUID: 0cYqFdz/SlSaGJd61j1pyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,232,1716274800"; d="scan'208";a="52499037" Received: from ideak-desk.fi.intel.com ([10.237.72.78]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2024 04:15:55 -0700 Date: Wed, 24 Jul 2024 14:16:10 +0300 From: Imre Deak To: "Murthy, Arun R" Cc: "intel-gfx@lists.freedesktop.org" Subject: Re: [PATCH 06/14] drm/i915/dp: Send only a single modeset-retry uevent for a commit Message-ID: References: <20240722165503.2084999-1-imre.deak@intel.com> <20240722165503.2084999-7-imre.deak@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: imre.deak@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Jul 24, 2024 at 07:29:33AM +0300, Murthy, Arun R wrote: > > > -----Original Message----- > > From: Intel-gfx On Behalf Of Imre > > Deak > > Sent: Monday, July 22, 2024 10:25 PM > > To: intel-gfx@lists.freedesktop.org > > Subject: [PATCH 06/14] drm/i915/dp: Send only a single modeset-retry uevent > > for a commit > > > > There are multiple failure cases a modeset-retry uevent can be sent for a link > > (TBT tunnel BW allocation failure, unrecoverable link training failure), a follow- > > up patch adding the handling for a new case where the DP MST payload > > allocation fails. The uevent is the same in all cases, sent to all the connectors on > > the link, so in case of multiple failures there is no point in sending a separate > > uevent for each failure; prevent this, sending only a single modeset-retry > > uevent for a commit. > > > Is an exit condition required with some 'x' retry so that this retry > doesn't end up in an infinite loop. For link training failure the > link rate/lane count is reduced and when it reaches the least can > exit, but for BW allocation failures/payload failure this may not be > the case. This is an error condition the driver reports (asynchronously) if a modeset request by userspace/client failed. It would be incorrect not to report this error, leaving the output in a blank, enabled state. I think that userspace/client should handle such failures - in the above case a buggy sink - by disabling the output. > Thanks and Regards, > Arun R Murthy > -------------------- > > Signed-off-by: Imre Deak > > --- > > drivers/gpu/drm/i915/display/intel_display_types.h | 1 + > > drivers/gpu/drm/i915/display/intel_dp.c | 6 ++++++ > > 2 files changed, 7 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h > > b/drivers/gpu/drm/i915/display/intel_display_types.h > > index a9d2acdc51a4a..3501125c55158 100644 > > --- a/drivers/gpu/drm/i915/display/intel_display_types.h > > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h > > @@ -1754,6 +1754,7 @@ struct intel_dp { > > u8 lane_count; > > u8 sink_count; > > bool link_trained; > > + bool needs_modeset_retry; > > bool use_max_params; > > u8 dpcd[DP_RECEIVER_CAP_SIZE]; > > u8 psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE]; > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > > b/drivers/gpu/drm/i915/display/intel_dp.c > > index 421e970b3c180..0882dddd97206 100644 > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > @@ -2876,6 +2876,11 @@ intel_dp_queue_modeset_retry_for_link(struct > > intel_atomic_state *state, > > struct intel_dp *intel_dp = enc_to_intel_dp(encoder); > > int i; > > > > + if (intel_dp->needs_modeset_retry) > > + return; > > + > > + intel_dp->needs_modeset_retry = true; > > + > > if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)) { > > intel_dp_queue_modeset_retry_work(intel_dp- > > >attached_connector); > > > > @@ -3009,6 +3014,7 @@ void intel_dp_set_link_params(struct intel_dp > > *intel_dp, { > > memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set)); > > intel_dp->link_trained = false; > > + intel_dp->needs_modeset_retry = false; > > intel_dp->link_rate = link_rate; > > intel_dp->lane_count = lane_count; > > } > > -- > > 2.44.2 >