diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 13:46:34 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2022-11-09 03:43:10 +0300 |
commit | 016dacb60e6d4b301c5941a0dedb49d337926832 (patch) | |
tree | e1ba6b0ad9521ebea08b39bb1a85d0c7d7b87288 /drivers/gpu/drm/nouveau/nouveau_dp.c | |
parent | d62f8e982cb857f451a9055d8cc446b1212a6500 (diff) | |
download | linux-016dacb60e6d4b301c5941a0dedb49d337926832.tar.xz |
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_dp.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index b7104e676eb2..d349dc24a003 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c @@ -29,8 +29,7 @@ #include "nouveau_encoder.h" #include "nouveau_crtc.h" -#include <nvif/class.h> -#include <nvif/cl5070.h> +#include <nvif/event.h> MODULE_PARM_DESC(mst, "Enable DisplayPort multi-stream (default: enabled)"); static int nouveau_mst = 1; @@ -218,8 +217,8 @@ void nouveau_dp_irq(struct nouveau_drm *drm, struct drm_connector *connector = &nv_connector->base; struct nouveau_encoder *outp = find_encoder(connector, DCB_OUTPUT_DP); struct nv50_mstm *mstm; + u64 hpd = 0; int ret; - bool send_hpd = false; if (!outp) return; @@ -231,14 +230,14 @@ void nouveau_dp_irq(struct nouveau_drm *drm, if (mstm && mstm->is_mst) { if (!nv50_mstm_service(drm, nv_connector, mstm)) - send_hpd = true; + hpd |= NVIF_NOTIFY_CONN_V0_UNPLUG; } else { drm_dp_cec_irq(&nv_connector->aux); if (nouveau_dp_has_sink_count(connector, outp)) { ret = drm_dp_read_sink_count(&nv_connector->aux); if (ret != outp->dp.sink_count) - send_hpd = true; + hpd |= NVIF_NOTIFY_CONN_V0_PLUG; if (ret >= 0) outp->dp.sink_count = ret; } @@ -246,8 +245,7 @@ void nouveau_dp_irq(struct nouveau_drm *drm, mutex_unlock(&outp->dp.hpd_irq_lock); - if (send_hpd) - nouveau_connector_hpd(connector); + nouveau_connector_hpd(nv_connector, NVIF_NOTIFY_CONN_V0_IRQ | hpd); } /* TODO: |