HTPC setups on Linux with discrete GPUs can opt to use an active DP to HDMI adaptor in order to carry CEC over DP AUX, as most GPUs do not wire up CEC pin 13.
Currently under s3 suspend, amdgpu invalidates native HDMI CEC state but leaves DP AUX CEC physical address valid, which can leave these adapter's CEC states stale across suspend and make wake transmissions to fail before adapter is reconfigured. This patch allows invalidating the DP AUX CEC physical address during suspend for AUX mode connectors. Normal connector detection reattaches adaptor using the physical address from EDID. Tested on a 9070xt HTPC on steamOS and UGREEN DP to HDMI adapter on amd-staging-drm-next at d8ab7636160e20bf6a2ad69cd975f4d63319f1d4 where unmodified tree reproduced resume NACK, with this patch, multiple cycles succeeded with ImageViewOn and ActiveSource transmission, and intended behavior on wake was observed with cecd. Assisted-by: LLM Signed-off-by: xXJSONDeruloXx <[email protected]> --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c index 0b446133edd8..919394778a25 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c @@ -372,10 +372,13 @@ void amdgpu_dm_s3_handle_hdmi_cec(struct drm_device *ddev, bool suspend) continue; aconnector = to_amdgpu_dm_connector(connector); - if (suspend) + if (suspend) { hdmi_cec_unset_edid(aconnector); - else + if (aconnector->dc_link && aconnector->dc_link->aux_mode) + drm_dp_cec_unset_edid(&aconnector->dm_dp_aux.aux); + } else { amdgpu_dm_hdmi_cec_set_edid(aconnector); + } } drm_connector_list_iter_end(&conn_iter); } -- 2.50.1 (Apple Git-155)
