We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d54c518 commit af309c0Copy full SHA for af309c0
drivers/gpu/drm/msm/dp/dp_link.c
@@ -50,6 +50,7 @@ static int dp_aux_link_power_up(struct drm_dp_aux *aux,
50
{
51
u8 value;
52
ssize_t len;
53
+ int i;
54
55
if (link->revision < 0x11)
56
return 0;
@@ -61,11 +62,13 @@ static int dp_aux_link_power_up(struct drm_dp_aux *aux,
61
62
value &= ~DP_SET_POWER_MASK;
63
value |= DP_SET_POWER_D0;
64
- len = drm_dp_dpcd_writeb(aux, DP_SET_POWER, value);
65
- if (len < 0)
66
- return len;
67
-
68
- usleep_range(1000, 2000);
+ /* retry for 1ms to give the sink time to wake up */
+ for (i = 0; i < 3; i++) {
+ len = drm_dp_dpcd_writeb(aux, DP_SET_POWER, value);
+ usleep_range(1000, 2000);
69
+ if (len == 1)
70
+ break;
71
+ }
72
73
74
}
0 commit comments