Skip to content

Commit 46094b2

Browse files
author
Hans Verkuil
committed
drm/nouveau: add DisplayPort CEC-Tunneling-over-AUX support
Add DisplayPort CEC-Tunneling-over-AUX support to nouveau. Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a4c30a4 commit 46094b2

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

drivers/gpu/drm/nouveau/nouveau_connector.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,10 @@ nouveau_connector_destroy(struct drm_connector *connector)
400400
kfree(nv_connector->edid);
401401
drm_connector_unregister(connector);
402402
drm_connector_cleanup(connector);
403-
if (nv_connector->aux.transfer)
403+
if (nv_connector->aux.transfer) {
404+
drm_dp_cec_unregister_connector(&nv_connector->aux);
404405
drm_dp_aux_unregister(&nv_connector->aux);
406+
}
405407
kfree(connector);
406408
}
407409

@@ -608,6 +610,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
608610

609611
nouveau_connector_set_encoder(connector, nv_encoder);
610612
conn_status = connector_status_connected;
613+
drm_dp_cec_set_edid(&nv_connector->aux, nv_connector->edid);
611614
goto out;
612615
}
613616

@@ -1108,11 +1111,14 @@ nouveau_connector_hotplug(struct nvif_notify *notify)
11081111

11091112
if (rep->mask & NVIF_NOTIFY_CONN_V0_IRQ) {
11101113
NV_DEBUG(drm, "service %s\n", name);
1114+
drm_dp_cec_irq(&nv_connector->aux);
11111115
if ((nv_encoder = find_encoder(connector, DCB_OUTPUT_DP)))
11121116
nv50_mstm_service(nv_encoder->dp.mstm);
11131117
} else {
11141118
bool plugged = (rep->mask != NVIF_NOTIFY_CONN_V0_UNPLUG);
11151119

1120+
if (!plugged)
1121+
drm_dp_cec_unset_edid(&nv_connector->aux);
11161122
NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", name);
11171123
if ((nv_encoder = find_encoder(connector, DCB_OUTPUT_DP))) {
11181124
if (!plugged)
@@ -1302,7 +1308,6 @@ nouveau_connector_create(struct drm_device *dev, int index)
13021308
kfree(nv_connector);
13031309
return ERR_PTR(ret);
13041310
}
1305-
13061311
funcs = &nouveau_connector_funcs;
13071312
break;
13081313
default:
@@ -1356,6 +1361,14 @@ nouveau_connector_create(struct drm_device *dev, int index)
13561361
break;
13571362
}
13581363

1364+
switch (type) {
1365+
case DRM_MODE_CONNECTOR_DisplayPort:
1366+
case DRM_MODE_CONNECTOR_eDP:
1367+
drm_dp_cec_register_connector(&nv_connector->aux,
1368+
connector->name, dev->dev);
1369+
break;
1370+
}
1371+
13591372
ret = nvif_notify_init(&disp->disp.object, nouveau_connector_hotplug,
13601373
true, NV04_DISP_NTFY_CONN,
13611374
&(struct nvif_notify_conn_req_v0) {

0 commit comments

Comments
 (0)