Skip to content

Commit bf52d7f

Browse files
committed
drm/nouveau/dp: Don't probe eDP ports twice harder
I didn't pay close enough attention the last time I tried to fix this problem - while we currently do correctly take care to make sure we don't probe a connected eDP port more then once, we don't do the same thing for eDP ports we found to be disconnected. So, fix this and make sure we only ever probe eDP ports once and then leave them at that connector state forever (since without HPD, it's not going to change on its own anyway). This should get rid of the last few GSP errors getting spit out during runtime suspend and resume on some machines, as we tried to reprobe eDP ports in response to ACPI hotplug probe events. Signed-off-by: Lyude Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit fe6660b)
1 parent ee7e980 commit bf52d7f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

drivers/gpu/drm/nouveau/nouveau_dp.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,15 @@ nouveau_dp_detect(struct nouveau_connector *nv_connector,
225225
u8 *dpcd = nv_encoder->dp.dpcd;
226226
int ret = NOUVEAU_DP_NONE, hpd;
227227

228-
/* If we've already read the DPCD on an eDP device, we don't need to
229-
* reread it as it won't change
228+
/* eDP ports don't support hotplugging - so there's no point in probing eDP ports unless we
229+
* haven't probed them once before.
230230
*/
231-
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
232-
dpcd[DP_DPCD_REV] != 0)
233-
return NOUVEAU_DP_SST;
231+
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
232+
if (connector->status == connector_status_connected)
233+
return NOUVEAU_DP_SST;
234+
else if (connector->status == connector_status_disconnected)
235+
return NOUVEAU_DP_NONE;
236+
}
234237

235238
// Ensure that the aux bus is enabled for probing
236239
drm_dp_dpcd_set_powered(&nv_connector->aux, true);

0 commit comments

Comments
 (0)