Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions drivers/gpu/drm/apple/dcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,17 @@ static int dcp_dptx_connect_raw(struct apple_dcp *dcp, u32 port, bool *retryable
/* T8122 dcpext: HPD only after the link wait, see dcp_ext_dptx_607() */
bool late_hpd = dcp_ext_dptx_607(dcp);
bool t8132 = dcp_is_t8132_ext(dcp);
/*
* A DP2HDMI output on the 13.5 firmware line asserts its own HPD, in
* dcp_enable_dp2hdmi_hpd(), and the connect asks the firmware for HPD
* only on a DisplayPort connector or a late-HPD path, so this firmware
* is never asked to detect the sink and never sends the link
* configuration the wait below looks for. Treat the timeout as
* non-fatal, as the compact and late-HPD cases do, instead of
* withdrawing the display.
*/
bool dp2hdmi = dcp->hdmi_hpd && !dcp_is_typec_output(dcp) &&
dcp->fw_compat == DCP_FIRMWARE_V_13_5;
bool compact, withdrawn;
unsigned long timeout;
u64 generation;
Expand Down Expand Up @@ -2482,6 +2493,14 @@ static int dcp_dptx_connect_raw(struct apple_dcp *dcp, u32 port, bool *retryable
dev_dbg(dcp->dev,
"dcp_dptx_connect: no link configuration on port %u yet\n", port);
ret = 0;
} else if (!ret && dp2hdmi) {
/*
* The converter holds HPD itself, and dptxport_set_hpd() below runs
* only for a DisplayPort connector, so nothing is asserted here.
*/
dev_dbg(dcp->dev,
"dcp_dptx_connect: no link configuration on port %u, HPD is the converter's\n",
port);
} else if (!ret && late_hpd) {
/* Without HPD this firmware does not train: assert it now. */
dev_dbg(dcp->dev,
Expand Down
4 changes: 3 additions & 1 deletion tools/testing/selftests/drivers/gpu/apple-dcp/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,8 @@ def swap(old, new):
' bool external, external_link_ready, crashed;\n'
' bool typec_work_enabled;' + ('' if '\n int fw_compat;' in unit else ' int fw_compat;') +
' struct { bool fw_14_7_endpoints; } hw;\n'
' struct { bool active; } split;')
' struct { bool active; } split;\n'
' bool hdmi_hpd;')
old_raw = unit[unit.index('static int dcp_dptx_connect_raw('):]
old_raw = old_raw[:old_raw.index('return raw_error; }') + len('return raw_error; }')]
sessions = bool(SESSION_RAW.search(dcp))
Expand All @@ -593,6 +594,7 @@ def swap(old, new):
#define dev_info(...) ((void)0)
#define DRM_MODE_CONNECTOR_DisplayPort 10
#define DCP_FIRMWARE_H17P 17
#define DCP_FIRMWARE_V_13_5 2
#define DPTX_CONNECT_TIMEOUT 2000
#define DPTX_TUNNEL_CONNECT_TIMEOUT 8000
static void mutex_lock(int *m) { (void)m; }
Expand Down
Loading