Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: extending AUX SW Timeout

[Why]
AUX takes longer to reply when using active DP-DVI dongle on some asics
resulting in up to 2000+ us edid read (timeout).

[How]
1. Adjust AUX poll to match spec
2. Extend the SW timeout. This does not affect normal
operation since we exit the loop as soon as AUX acks.

Signed-off-by: Martin Leung <martin.leung@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Joshua Aberback <Joshua.Aberback@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Martin Leung and committed by
Alex Deucher
f4bbebf8 543c364d

+9 -6
+6 -3
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
··· 190 190 1, 191 191 0); 192 192 } 193 + 194 + REG_UPDATE(AUX_INTERRUPT_CONTROL, AUX_SW_DONE_ACK, 1); 195 + 196 + REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0, 197 + 10, aux110->timeout_period/10); 198 + 193 199 /* set the delay and the number of bytes to write */ 194 200 195 201 /* The length include ··· 248 242 } 249 243 } 250 244 251 - REG_UPDATE(AUX_INTERRUPT_CONTROL, AUX_SW_DONE_ACK, 1); 252 - REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0, 253 - 10, aux110->timeout_period/10); 254 245 REG_UPDATE(AUX_SW_CONTROL, AUX_SW_GO, 1); 255 246 } 256 247
+3 -3
drivers/gpu/drm/amd/display/dc/dce/dce_aux.h
··· 71 71 * at most within ~240usec. That means, 72 72 * increasing this timeout will not affect normal operation, 73 73 * and we'll timeout after 74 - * SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD = 1600usec. 74 + * SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD = 2400usec. 75 75 * This timeout is especially important for 76 - * resume from S3 and CTS. 76 + * converters, resume from S3, and CTS. 77 77 */ 78 - SW_AUX_TIMEOUT_PERIOD_MULTIPLIER = 4 78 + SW_AUX_TIMEOUT_PERIOD_MULTIPLIER = 6 79 79 }; 80 80 81 81 struct dce_aux {