drm/amd/display: switch to setting physical address directly
authorMelissa Wen <mwen@igalia.com>
Fri, 27 Sep 2024 23:05:57 +0000 (18:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2024 18:32:08 +0000 (14:32 -0400)
Connectors have source physical address available in display
info. Use drm_dp_cec_attach() to use it instead of parsing the EDID
again.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index dcdeccb..4c58ac7 100644 (file)
@@ -3579,8 +3579,7 @@ void amdgpu_dm_update_connector_after_detect(
                if (sink->dc_edid.length == 0) {
                        aconnector->drm_edid = NULL;
                        if (aconnector->dc_link->aux_mode) {
-                               drm_dp_cec_unset_edid(
-                                       &aconnector->dm_dp_aux.aux);
+                               drm_dp_cec_unset_edid(&aconnector->dm_dp_aux.aux);
                        }
                } else {
                        const struct edid *edid = (const struct edid *)sink->dc_edid.raw_edid;
@@ -3589,7 +3588,8 @@ void amdgpu_dm_update_connector_after_detect(
                        drm_edid_connector_update(connector, aconnector->drm_edid);
 
                        if (aconnector->dc_link->aux_mode)
-                               drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux, edid);
+                               drm_dp_cec_attach(&aconnector->dm_dp_aux.aux,
+                                                 connector->display_info.source_physical_address);
                }
 
                if (!aconnector->timing_requested) {