Amended and added issue link, thanks!

>From 2916fc883b80cf106ba2b06d8dadbdae45eff7db Mon Sep 17 00:00:00 2001
From: Daniel Kurt Himebauch <[email protected]>
Date: Fri, 11 Sep 2026 21:11:10 -0400
Subject: [PATCH v2] drm/amd/display: invalidate DP CEC state on s3 suspend

Some Linux HTPCs with discrete GPUs use active DisplayPort-to-HDMI
adapters to carry CEC over DP AUX. This provides a CEC path on systems
where the GPU does not expose native HDMI CEC.

During S3 suspend, amdgpu invalidates native HDMI CEC state but leaves
the DP AUX CEC physical address valid. The adapter can retain stale CEC
state across suspend, causing transmissions during resume to fail before
the adapter is reconfigured.

For AUX-mode connectors, invalidate the DP AUX CEC physical address
during suspend. Normal connector detection on resume then reattaches the
adapter using the EDID-derived physical address.

Tested on a Radeon RX 9070 XT HTPC running SteamOS with a UGREEN
DP-to-HDMI adapter on amd-staging-drm-next at commit d8ab7636160e
("drm/amd/amdgpu: remove duplicated code in gfx_v11 and gfx_v12").
The unmodified tree reproduced resume NACKs. With this change, multiple
cycles showed Image View On and Active Source transmissions.

Link: https://gitlab.steamos.cloud/holo/linux-cec/-/issues/5
Assisted-by: Codex:GPT-5.6-Luna
Signed-off-by: Daniel Kurt Himebauch <[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)

Reply via email to