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

Configure Feed

Select the types of activity you want to include in your feed.

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 <lyude@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404233736.7946-3-lyude@redhat.com

+8 -5
+8 -5
drivers/gpu/drm/nouveau/nouveau_dp.c
··· 225 225 u8 *dpcd = nv_encoder->dp.dpcd; 226 226 int ret = NOUVEAU_DP_NONE, hpd; 227 227 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. 230 230 */ 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 + } 234 237 235 238 // Ensure that the aux bus is enabled for probing 236 239 drm_dp_dpcd_set_powered(&nv_connector->aux, true);