From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED5391DF749; Tue, 7 Jan 2025 09:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736242327; cv=none; b=Azpmimba/4jFS3o8WkSUDJzBM7kqApQSWuuHAC8FGpGt3j9KSd/5S2mloN9vmPwb9EDP1WzhmXyZeC2jz+ZO9jvU27zxqEPrnqfum+TAVM9cgnGCVvBht43KXNnq8ZxZLIWLIXBKMvd27kbshBGkucIB0+D4ug4fsOiUqdNuieQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736242327; c=relaxed/simple; bh=Z04SMetCAyONcsQpiAvLBR9WZBMDFQ22D6JX10y+mQk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CO8G9rcPrBQvuI71IgmhfJSPxdJC2oHrlSLhboUPwVBUZMORo0WWT91EjmSFgNKcoqCWOr/JEad87J71ivYDJDMIcpulF6uagsWbH65ZeCu/OPj4luFDVICOiYbctVjoDXvJF/Rtv5yFFOf5j03oxfZZfYGwEG+UO7BNBjSPgYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dunb71L4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dunb71L4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67D1AC4CED6; Tue, 7 Jan 2025 09:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736242326; bh=Z04SMetCAyONcsQpiAvLBR9WZBMDFQ22D6JX10y+mQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dunb71L48IxppxhholJtBo/tHH/H3XeYlump+Vc4UGuKPypVxMWnP6XPQ7WvZ0p6W fm4H0dI0z8pFslajPWV527iBhCD8/3LwaBr4zQugVix0ajuvJzd3NIfWUKYe3Zd0h7 6/BI9+VOG5ra11AtnFB6+Jza6adYFFZ0qlnVLjfuOufc9U/UY4NjggYme1EO9AC/a+ ggO8Ae00nIWfiyEeAFJlBmhuXQp9JIKFPD5nF7TZQTuTWqox5739t7cP9kqjfd8yp0 cbtm4/pGobUaspZYtv2sOirgq+PrEcAQCbZj5wUapEM5fEBYOYD7mH1pTBiLNMDOg4 pU9sUIgf7WwQw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1tV5wS-000000006sK-0WjG; Tue, 07 Jan 2025 10:32:04 +0100 Date: Tue, 7 Jan 2025 10:32:04 +0100 From: Johan Hovold To: Abel Vesa Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Karol Herbst , Lyude Paul , Danilo Krummrich , Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , Bjorn Andersson , Konrad Dybcio , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Johan Hovold Subject: Re: [PATCH v3 4/4] drm/msm/dp: Add support for LTTPR handling Message-ID: References: <20250103-drm-dp-msm-add-lttpr-transparent-mode-set-v3-0-5c367f4b0763@linaro.org> <20250103-drm-dp-msm-add-lttpr-transparent-mode-set-v3-4-5c367f4b0763@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250103-drm-dp-msm-add-lttpr-transparent-mode-set-v3-4-5c367f4b0763@linaro.org> On Fri, Jan 03, 2025 at 02:58:18PM +0200, Abel Vesa wrote: > Link Training Tunable PHY Repeaters (LTTPRs) are defined in DisplayPort > 1.4a specification. As the name suggests, these PHY repeaters are > capable of adjusting their output for link training purposes. > > According to the DisplayPort standard, LTTPRs have two operating > modes: > - non-transparent - it replies to DPCD LTTPR field specific AUX > requests, while passes through all other AUX requests > - transparent - it passes through all AUX requests. > > Switching between this two modes is done by the DPTX by issuing > an AUX write to the DPCD PHY_REPEATER_MODE register. > > The msm DP driver is currently lacking any handling of LTTPRs. > This means that if at least one LTTPR is found between DPTX and DPRX, > the link training would fail if that LTTPR was not already configured > in transparent mode. > > The section 3.6.6.1 from the DisplayPort v2.0 specification mandates > that before link training with the LTTPR is started, the DPTX may place > the LTTPR in non-transparent mode by first switching to transparent mode > and then to non-transparent mode. This operation seems to be needed only > on first link training and doesn't need to be done again until device is > unplugged. > > It has been observed on a few X Elite-based platforms which have > such LTTPRs in their board design that the DPTX needs to follow the > procedure described above in order for the link training to be successful. > > So add support for reading the LTTPR DPCD caps to figure out the number > of such LTTPRs first. Then, for platforms (or Type-C dongles) that have > at least one such an LTTPR, set its operation mode to transparent mode > first and then to non-transparent, just like the mentioned section of > the specification mandates. > > Tested-by: Johan Hovold > Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold