Skip to content

Commit 3c6f13a

Browse files
ideaktursulin
authored andcommitted
drm/i915/adlp: Fix TypeC PHY-ready status readout
The TCSS_DDI_STATUS register is indexed by tc_port not by the FIA port index, fix this up. This only caused an issue on TC#3/4 ports in legacy mode, as in all other cases the two indices either match (on TC#1/2) or the TCSS_DDI_STATUS_READY flag is set regardless of something being connected or not (on TC#1/2/3/4 in dp-alt and tbt-alt modes). Reported-and-tested-by: Chia-Lin Kao (AceLan) <[email protected]> Fixes: 55ce306 ("drm/i915/adl_p: Implement TC sequences") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4698 Cc: José Roberto de Souza <[email protected]> Cc: <[email protected]> # v5.14+ Signed-off-by: Imre Deak <[email protected]> Reviewed-by: José Roberto de Souza <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 516b334) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent b3f7493 commit 3c6f13a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/display/intel_tc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,11 @@ static bool icl_tc_phy_status_complete(struct intel_digital_port *dig_port)
345345
static bool adl_tc_phy_status_complete(struct intel_digital_port *dig_port)
346346
{
347347
struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
348+
enum tc_port tc_port = intel_port_to_tc(i915, dig_port->base.port);
348349
struct intel_uncore *uncore = &i915->uncore;
349350
u32 val;
350351

351-
val = intel_uncore_read(uncore, TCSS_DDI_STATUS(dig_port->tc_phy_fia_idx));
352+
val = intel_uncore_read(uncore, TCSS_DDI_STATUS(tc_port));
352353
if (val == 0xffffffff) {
353354
drm_dbg_kms(&i915->drm,
354355
"Port %s: PHY in TCCOLD, assuming not complete\n",

0 commit comments

Comments
 (0)