Skip to content

Commit f479c0b

Browse files
author
Ben Skeggs
committed
drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1 parent d665c7e commit f479c0b

4 files changed

Lines changed: 571 additions & 2 deletions

File tree

‎drivers/gpu/drm/nouveau/nouveau_connector.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,12 +1118,21 @@ nouveau_connector_hotplug(struct nvif_notify *notify)
11181118
struct nouveau_drm *drm = nouveau_drm(connector->dev);
11191119
const struct nvif_notify_conn_rep_v0 *rep = notify->data;
11201120
const char *name = connector->name;
1121+
struct nouveau_encoder *nv_encoder;
11211122

11221123
if (rep->mask & NVIF_NOTIFY_CONN_V0_IRQ) {
1124+
NV_DEBUG(drm, "service %s\n", name);
1125+
if ((nv_encoder = find_encoder(connector, DCB_OUTPUT_DP)))
1126+
nv50_mstm_service(nv_encoder->dp.mstm);
11231127
} else {
11241128
bool plugged = (rep->mask != NVIF_NOTIFY_CONN_V0_UNPLUG);
11251129

11261130
NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", name);
1131+
if ((nv_encoder = find_encoder(connector, DCB_OUTPUT_DP))) {
1132+
if (!plugged)
1133+
nv50_mstm_remove(nv_encoder->dp.mstm);
1134+
}
1135+
11271136
drm_helper_hpd_irq_event(connector->dev);
11281137
}
11291138

‎drivers/gpu/drm/nouveau/nouveau_dp.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
#include <nvif/class.h>
3434
#include <nvif/cl5070.h>
3535

36+
MODULE_PARM_DESC(mst, "Enable DisplayPort multi-stream (default: enabled)");
37+
static int nouveau_mst = 1;
38+
module_param_named(mst, nouveau_mst, int, 0400);
39+
3640
static void
3741
nouveau_dp_probe_oui(struct drm_device *dev, struct nvkm_i2c_aux *aux, u8 *dpcd)
3842
{
@@ -88,7 +92,9 @@ nouveau_dp_detect(struct nouveau_encoder *nv_encoder)
8892

8993
nouveau_dp_probe_oui(dev, aux, dpcd);
9094

91-
ret = nv50_mstm_detect(nv_encoder->dp.mstm, dpcd, 0);
95+
ret = nv50_mstm_detect(nv_encoder->dp.mstm, dpcd, nouveau_mst);
96+
if (ret == 1)
97+
return NOUVEAU_DP_MST;
9298
if (ret == 0)
9399
return NOUVEAU_DP_SST;
94100
return ret;

‎drivers/gpu/drm/nouveau/nouveau_encoder.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,6 @@ struct nouveau_connector *
103103
nouveau_encoder_connector_get(struct nouveau_encoder *encoder);
104104

105105
int nv50_mstm_detect(struct nv50_mstm *, u8 dpcd[8], int allow);
106+
void nv50_mstm_remove(struct nv50_mstm *);
107+
void nv50_mstm_service(struct nv50_mstm *);
106108
#endif /* __NOUVEAU_ENCODER_H__ */

0 commit comments

Comments
 (0)