Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1540684rdb; Mon, 2 Oct 2023 12:48:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7P/Gw1T4YzZzcrWW9HGdvOjpc4fiUEaNOUMnX+ogu569ObG6WkBzH7Tpy8M4RwaXg5zro X-Received: by 2002:a17:90a:e98f:b0:26d:416a:d9d0 with SMTP id v15-20020a17090ae98f00b0026d416ad9d0mr9942422pjy.21.1696276137805; Mon, 02 Oct 2023 12:48:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696276137; cv=none; d=google.com; s=arc-20160816; b=oXh8IP5ExQNkIyI3pWRk4Wmtn3hiOB3ky/iXfdSp1B2eNZvPtEe6A5CzSevx8y8vpf Rpn5pKLCSkxKoRd95bAyPasv00V37FB6occDvtpqx3kAE6pXqfj5YvzxnmNlrPgltILB PHsz14zSTSIXwTJY3mpw8tJnpG0NtH3R8j/kM4oH4V+oaHY2CJn5cxcYX6o3P9Cce0ps Z/dL6h/C7eRhcUdoncgY2LLOxeGfBoJ2G79h7N/BkiFbIIeUORAWvri4LhV1wG4TsPvV iGbJwYiEBWKAKh8WzUWQrQdJpei793zJAvan4scrsjZakK/ua8Dh0tQj8sV7tG+Gfh0z JdQw== 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=Wy51OeB2Nm6jihcWFZA0RFsyPvYPbZ3iqz5pgcJfSGo=; fh=W17ES5MOvMIbv+pNGVW0Gis5Mv4UKQQ9ZIHiZ+wMc0Y=; b=j+sGI3TYUOf5Ygvr6ziff1aYrQdZV6+eCrDWVV9ZITFVSZvXBMa3nu8KzabOA5UE9l UniYZOEb1DbKkQRK6UOT7JKP4/UZGIHEzL9tzB5YOUhKmOQBeBxJ8bzbm6Jypag7EZ01 q9y/mYJnc/BtJVGZQnfcQtr7IfJAbg6rT/ipj2+5z31Oxl/ku7nHu7aS+wQPnFm7YMCS I7zVFeogT9e5xTClrP70dMLJ1IowoLGARxcg+K2DNdO+IoUzt99raaZ9EOLfzf/pNitb WeiWuDUIhJqk+ro390b7ntLoXgiLi67T9L4NQLU8XOsuPhGNAPzdMgGUsahc1l0XsUg7 vOOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dm6VLiOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id gp13-20020a17090adf0d00b0026f9b5fe711si8324997pjb.108.2023.10.02.12.48.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 12:48:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dm6VLiOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3E0C880B19B0; Mon, 2 Oct 2023 03:01:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236462AbjJBKAe (ORCPT + 99 others); Mon, 2 Oct 2023 06:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236397AbjJBKAV (ORCPT ); Mon, 2 Oct 2023 06:00:21 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89EB4CCC for ; Mon, 2 Oct 2023 03:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696240818; x=1727776818; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=jMA1qUgRZBOCtACv4+9yAge9XIVyKwYlEPTNSzbXWqE=; b=dm6VLiOGgzntUw8bcL4ckY5qW2+zuXhN6Q1qZmdK0+PNEFyS2I4vxtQW 8fdYJY7qLqp76Wlis01S0gUV4Jhcp/uWYr5l5993UWdo6GQVMEF+0+H3L gO0k5tzENvlWWPTfYiocBz2bS/6kttaxw28eWwCnCOMTM5+Xkq61fYNvB 5dfysFXYu8IGo0g+MnPXTJESix1sfOik6JE4IgY96qqnxJXkn3ubEYKWm RMA9jwaHqEiony1icU9Z8gpWevUOsXrmTthJyxsdIc+nXNeLSQZ+QiTnD oLHuFo5hrrGr/6b/v9ip2XWcGoJyfEXybe3CpbGqSx3O6BKojTXWtAnvH g==; X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="382518896" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="382518896" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.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 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, imre.deak@linux.intel.com 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: Mon, 02 Oct 2023 13:00:05 +0300 Message-ID: <87r0mdgx96.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 02 Oct 2023 03:01:19 -0700 (PDT) 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