diff options
| author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 20:46:34 +1000 |
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2022-11-09 10:43:10 +1000 |
| commit | 016dacb60e6d4b301c5941a0dedb49d337926832 (patch) | |
| tree | e1ba6b0ad9521ebea08b39bb1a85d0c7d7b87288 /drivers/gpu/drm/nouveau/nouveau_connector.c | |
| parent | d62f8e982cb857f451a9055d8cc446b1212a6500 (diff) | |
drm/nouveau/kms: pass event mask to hpd handler
Will be moving the DP link status check / re-train here so it's safe
from racing with modeset routing changes.
MST message handling etc. will remain where it is.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_connector.c')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index c2ff8e91d90d..bbd17ee60853 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -1162,14 +1162,15 @@ nouveau_connector_funcs_lvds = { }; void -nouveau_connector_hpd(struct drm_connector *connector) +nouveau_connector_hpd(struct nouveau_connector *nv_connector, u64 bits) { - struct nouveau_drm *drm = nouveau_drm(connector->dev); - u32 mask = drm_connector_mask(connector); + struct nouveau_drm *drm = nouveau_drm(nv_connector->base.dev); + u32 mask = drm_connector_mask(&nv_connector->base); unsigned long flags; spin_lock_irqsave(&drm->hpd_lock, flags); if (!(drm->hpd_pending & mask)) { + nv_connector->hpd_pending |= bits; drm->hpd_pending |= mask; schedule_work(&drm->hpd_work); } @@ -1185,15 +1186,13 @@ nouveau_connector_hotplug(struct nvif_notify *notify) struct drm_device *dev = connector->dev; struct nouveau_drm *drm = nouveau_drm(dev); const struct nvif_notify_conn_rep_v0 *rep = notify->data; - bool plugged = (rep->mask != NVIF_NOTIFY_CONN_V0_UNPLUG); if (rep->mask & NVIF_NOTIFY_CONN_V0_IRQ) { nouveau_dp_irq(drm, nv_connector); return NVIF_NOTIFY_KEEP; } - NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", connector->name); - nouveau_connector_hpd(connector); + nouveau_connector_hpd(nv_connector, rep->mask); return NVIF_NOTIFY_KEEP; } |