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 6BD35E784AF for ; Mon, 2 Oct 2023 10:01:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 23D3C10E132; Mon, 2 Oct 2023 10:00:52 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9A7610E276; Mon, 2 Oct 2023 10:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696240844; x=1727776844; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=jMA1qUgRZBOCtACv4+9yAge9XIVyKwYlEPTNSzbXWqE=; b=XNhJUMwfhK1Th5anDop7IdUnApPBg+r5eOx/JjYsAR72skRHg3Xz/YF0 2rhNZ6TUxFWgk0qHIQvXZLnEUJWiuZ+dz/kDG3MDgf8arPysxpdCeEtpo aEb7AXtsn+61D5slcfWYQ8sE1taebyl3SPUIqD69KYbQz3ruv/aGM4iZP wmy9esYMlQqM0fl+AII9RL84aTFnOc+OX2w51zzBkicJdvvZjOmE475Ql B9k5hyaH3JFpjVM50KdMg+f6wOMZsrpfUJdJ3VLtITo0/bPRVV18DT8aq AHISJMOdiTdDHEv4iQJK271N6wO1AJkZXTN92gsSDrv9ySsg5DUasmoFO g==; X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="468892070" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="468892070" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 03:00:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="1081595161" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="1081595161" Received: from svandens-mobl.ger.corp.intel.com (HELO localhost) ([10.252.55.151]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 03:00:14 -0700 From: Jani Nikula To: Pablo Ceballos , Ankit K Nautiyal In-Reply-To: <20230816045654.833973-1-pceballos@google.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230816045654.833973-1-pceballos@google.com> Date: Mon, 02 Oct 2023 13:00:05 +0300 Message-ID: <87r0mdgx96.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Intel-gfx] [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout 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: , Cc: imre.deak@linux.intel.com, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Rodrigo Vivi , David Airlie , Pablo Ceballos Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 16 Aug 2023, Pablo Ceballos wrote: > This is to eliminate all cases of "*ERROR* LSPCON mode hasn't settled", > followed by link training errors. Intel engineers recommended increasing > this timeout and that does resolve the issue. > > On some CometLake-based device designs the Parade PS175 takes more than > 400ms to settle in PCON mode. 100 reboot trials on one device resulted > in a median settle time of 440ms and a maximum of 444ms. Even after > increasing the timeout to 500ms, 2% of devices still had this error. So > this increases the timeout to 800ms. > > Signed-off-by: Pablo Ceballos Please file the issue at [1] as requested before, and reference it in the commit message. [1] https://gitlab.freedesktop.org/drm/intel/-/issues/new > --- > > V2: Added more details in the commit message > V3: Only apply the increased timeout if the vendor is Parade > > drivers/gpu/drm/i915/display/intel_lspcon.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c > index bb3b5355a0d9..b07eab84cc63 100644 > --- a/drivers/gpu/drm/i915/display/intel_lspcon.c > +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c > @@ -153,6 +153,24 @@ static enum drm_lspcon_mode lspcon_get_current_mode(struct intel_lspcon *lspcon) > return current_mode; > } > > +static u32 lspcon_get_mode_settle_timeout(struct intel_lspcon *lspcon) > +{ > + u32 timeout_ms = 400; Please use plain int for plain numbers. There's nothing u32 about this. > + > + /* > + * On some CometLake-based device designs the Parade PS175 takes more > + * than 400ms to settle in PCON mode. 100 reboot trials on one device > + * resulted in a median settle time of 440ms and a maximum of 444ms. > + * Even after increasing the timeout to 500ms, 2% of devices still had > + * this error. So this sets the timeout to 800ms. > + */ > + if (lspcon->vendor == LSPCON_VENDOR_PARADE) > + timeout_ms = 800; > + > + return timeout_ms; All of the above is just return lspcon->vendor == LSPCON_VENDOR_PARADE ? 800 : 400; BR, Jani. > +} > + > + > static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, > enum drm_lspcon_mode mode) > { > @@ -167,7 +185,8 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, > drm_dbg_kms(&i915->drm, "Waiting for LSPCON mode %s to settle\n", > lspcon_mode_name(mode)); > > - wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 400); > + wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, > + lspcon_get_mode_settle_timeout(lspcon)); > if (current_mode != mode) > drm_err(&i915->drm, "LSPCON mode hasn't settled\n"); -- Jani Nikula, Intel