Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp312322rdb; Sat, 19 Aug 2023 02:51:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcTM7Q1U9lDnrVxbujg+zhDGNVfo6rxV2LGc2O3M0MpMWuulFoYxg/+H/y6pOiqwur5cGr X-Received: by 2002:a17:902:e746:b0:1b8:9fc4:2733 with SMTP id p6-20020a170902e74600b001b89fc42733mr1957381plf.3.1692438712556; Sat, 19 Aug 2023 02:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692438712; cv=none; d=google.com; s=arc-20160816; b=RiupR9NFK6p3n67BNcZO71Q83xmp9H7d/jAKXOqolIQo5nGIW1Y16XoomR8zIL7pVT 7fb/cKTcaBYX2Of5u7y2sIu038rs/lzi9RQ2tOG9FVYr34KuEpOZEsoIQjBqAsdnbeSQ EObkvtKbLMMsNLhl3RbJfPivJ7odnmLfoF5u6bKUUORy/THKqR4RVynqT2WaUo+mRNla P9pi5K0tARz/KvIOYcqzsdfeuA2RWw50ay8Dj6q8TwvuccR9agBdShkpToHj3Dvw56+x f0ORihKQW4TbTz0Fk91a6scXCAEGbl/5HGyLti+C6aX2oCmj+AstpX11BI0smxVmSQEm XKVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=KcwtXiJouUqZUsU63iRS0tS1Y3HTe+0Tm1rO0/7AqSI=; fh=vv8MesZ73r0G0juwtGTMtszyqIkR/oBAX3j8SCUfwKU=; b=JSk7n14Lbn7bSetpj/81/I3Lc9qwKIJEuNg6zngdMrOCFWim5yLy4Vv7+EW+T0YYLr pM0eGRtTCTXDhvj/0V4JWVd9ZFb5FHv6IwCVzjUUQWnCrX46YU/C8SGqUWBkqO9VsmIc ClAPhls5i1gSgwsq/KQm6tMSO2EcbD/4hXO4+939UpJ84mY6BM2L2YS/cariILxL7yRo mn1hshd5O5+08zl57qZ2iW4nwoRCLngPIgT29Vc7LPg8Qlbz6mtbVLf7PAF9DZdUyY2z Qd1PuipuNMvCyInK1BrjLiHlqMAUs1/soDA04Np402ifR90uIt5i0IOMFG56VV5nqMzX 4Ovw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CMnHnDBG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 9-20020a170902c14900b001b9e38b8167si3156129plj.169.2023.08.19.02.51.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 02:51:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CMnHnDBG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 725DA32E77; Sat, 19 Aug 2023 01:29:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243195AbjHPJDe (ORCPT + 99 others); Wed, 16 Aug 2023 05:03:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243211AbjHPJDH (ORCPT ); Wed, 16 Aug 2023 05:03:07 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AC0010EC for ; Wed, 16 Aug 2023 02:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692176586; x=1723712586; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=H25J00BMfihPwIlWyPi9fC1IUG683UCggpHQSZfGyQ0=; b=CMnHnDBG6MWEEjNBAmR98ilIsaGezRFafzPv/nkVpXYWzaPDPEPjt8uz 86I1moDApInlWd35jYSJowWvX6JE3R7J5iJ/xK8ymExSy5v7KggR4KDkb BSDcU4AGaJlXlEU/tHyk/UQ0lNAkNJg1AwNAQ8YeeNjplp3wqh98aC+In KMpXGd2qvJT4XypeGk7e/XSC7spg211mN6BSgr4HJEx8xv6EHA/FcRWln ub/Aa/TQjh5iv6v1P2RwT151MNgWaPBMEAe5HmrYwuBFdwyVRaN8qHcZn FMlIU+JSoDL/IYnriTEB7v0IXn/U3nKteyA3TsFpKbFyPs+z4KEpBkD7o w==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="438826856" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="438826856" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:03:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="804134172" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="804134172" Received: from golubevv-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.52.134]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:03:02 -0700 From: Jani Nikula To: Pablo Ceballos , Ankit K Nautiyal Cc: David Airlie , Daniel Vetter , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Ville =?utf-8?B?U3lyasOkbMOk?= , Pablo Ceballos , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout 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: Wed, 16 Aug 2023 12:02:58 +0300 Message-ID: <87y1ib9x6l.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 I think we've been here before. Do you have a publicly available gitlab issue with the proper logs? If not, please file one at [1]. BR, Jani. [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; > + > + /* > + * 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; > +} > + > + > 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 Open Source Graphics Center