@@ -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
10681074static 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 );
0 commit comments