Skip to content

Commit e86e894

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

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,17 +896,21 @@ amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector)
896896
aconnector->dc_sink = sink;
897897
if (sink->dc_edid.length == 0) {
898898
aconnector->edid = NULL;
899+
drm_dp_cec_unset_edid(&aconnector->dm_dp_aux.aux);
899900
} else {
900901
aconnector->edid =
901902
(struct edid *) sink->dc_edid.raw_edid;
902903

903904

904905
drm_connector_update_edid_property(connector,
905906
aconnector->edid);
907+
drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,
908+
aconnector->edid);
906909
}
907910
amdgpu_dm_add_sink_to_freesync_module(connector, aconnector->edid);
908911

909912
} else {
913+
drm_dp_cec_unset_edid(&aconnector->dm_dp_aux.aux);
910914
amdgpu_dm_remove_sink_from_freesync_module(connector);
911915
drm_connector_update_edid_property(connector, NULL);
912916
aconnector->num_modes = 0;
@@ -1061,8 +1065,10 @@ static void handle_hpd_rx_irq(void *param)
10611065
(dc_link->type == dc_connection_mst_branch))
10621066
dm_handle_hpd_rx_irq(aconnector);
10631067

1064-
if (dc_link->type != dc_connection_mst_branch)
1068+
if (dc_link->type != dc_connection_mst_branch) {
1069+
drm_dp_cec_irq(&aconnector->dm_dp_aux.aux);
10651070
mutex_unlock(&aconnector->hpd_lock);
1071+
}
10661072
}
10671073

10681074
static void register_hpd_handlers(struct amdgpu_device *adev)
@@ -2731,6 +2737,7 @@ static void amdgpu_dm_connector_destroy(struct drm_connector *connector)
27312737
dm->backlight_dev = NULL;
27322738
}
27332739
#endif
2740+
drm_dp_cec_unregister_connector(&aconnector->dm_dp_aux.aux);
27342741
drm_connector_unregister(connector);
27352742
drm_connector_cleanup(connector);
27362743
kfree(connector);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,
496496
aconnector->dm_dp_aux.ddc_service = aconnector->dc_link->ddc;
497497

498498
drm_dp_aux_register(&aconnector->dm_dp_aux.aux);
499+
drm_dp_cec_register_connector(&aconnector->dm_dp_aux.aux,
500+
aconnector->base.name, dm->adev->dev);
499501
aconnector->mst_mgr.cbs = &dm_mst_cbs;
500502
drm_dp_mst_topology_mgr_init(
501503
&aconnector->mst_mgr,

0 commit comments

Comments
 (0)