* [PATCH] drm/amd/display: invalidate DP CEC state on s3 suspend
@ 2026-09-12 2:30 Dan Himebauch
2026-09-14 13:55 ` Alex Hung
0 siblings, 1 reply; 4+ messages in thread
From: Dan Himebauch @ 2026-09-12 2:30 UTC (permalink / raw)
To: amd-gfx
Cc: harry.wentland, sunpeng.li, siqueira, alexander.deucher,
christian.koenig, airlied, simona, alex.hung, bhawanpreet.lakha,
wayne.lin, george.zhang, jerry.zuo, chen-yu.chen, ivan.lipski,
evg28bur, Kun.Liu2, mario.limonciello, dri-devel, linux-kernel
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 <danielhimebauch@gmail.com>
---
.../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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amd/display: invalidate DP CEC state on s3 suspend
2026-09-12 2:30 [PATCH] drm/amd/display: invalidate DP CEC state on s3 suspend Dan Himebauch
@ 2026-09-14 13:55 ` Alex Hung
2026-09-15 2:27 ` [PATCH v2] " Dan Himebauch
0 siblings, 1 reply; 4+ messages in thread
From: Alex Hung @ 2026-09-14 13:55 UTC (permalink / raw)
To: Dan Himebauch, amd-gfx
Cc: harry.wentland, sunpeng.li, siqueira, alexander.deucher,
christian.koenig, airlied, simona, bhawanpreet.lakha, wayne.lin,
george.zhang, jerry.zuo, chen-yu.chen, ivan.lipski, evg28bur,
Kun.Liu2, mario.limonciello, dri-devel, linux-kernel
Please run ./scripts/checkpatch.pl patch_file and fix reported errors
and warnings. Thanks.
On 9/11/26 20:30, Dan Himebauch wrote:
> [You don't often get email from danielhimebauch@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 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 <danielhimebauch@gmail.com>
> ---
> .../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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] drm/amd/display: invalidate DP CEC state on s3 suspend
2026-09-14 13:55 ` Alex Hung
@ 2026-09-15 2:27 ` Dan Himebauch
2026-09-15 15:46 ` Mario Limonciello
0 siblings, 1 reply; 4+ messages in thread
From: Dan Himebauch @ 2026-09-15 2:27 UTC (permalink / raw)
To: Alex Hung
Cc: amd-gfx, harry.wentland, sunpeng.li, siqueira, alexander.deucher,
christian.koenig, airlied, simona, bhawanpreet.lakha, wayne.lin,
george.zhang, jerry.zuo, chen-yu.chen, ivan.lipski, evg28bur,
Kun.Liu2, mario.limonciello, dri-devel, linux-kernel
Amended and added issue link, thanks!
From 2916fc883b80cf106ba2b06d8dadbdae45eff7db Mon Sep 17 00:00:00 2001
From: Daniel Kurt Himebauch <danielhimebauch@gmail.com>
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 <danielhimebauch@gmail.com>
---
.../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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drm/amd/display: invalidate DP CEC state on s3 suspend
2026-09-15 2:27 ` [PATCH v2] " Dan Himebauch
@ 2026-09-15 15:46 ` Mario Limonciello
0 siblings, 0 replies; 4+ messages in thread
From: Mario Limonciello @ 2026-09-15 15:46 UTC (permalink / raw)
To: Dan Himebauch, Alex Hung
Cc: amd-gfx, harry.wentland, sunpeng.li, siqueira, alexander.deucher,
christian.koenig, airlied, simona, bhawanpreet.lakha, wayne.lin,
george.zhang, jerry.zuo, chen-yu.chen, ivan.lipski, evg28bur,
Kun.Liu2, dri-devel, linux-kernel
On 9/14/26 21:27, Dan Himebauch wrote:
> Amended and added issue link, thanks!
>
> From 2916fc883b80cf106ba2b06d8dadbdae45eff7db Mon Sep 17 00:00:00 2001
> From: Daniel Kurt Himebauch <danielhimebauch@gmail.com>
> 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 <danielhimebauch@gmail.com>
>
> ---
> .../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);
> }
Something is wrong with your whitespace. Can you send using git
send-email perhaps?
╰─❯ b4 shazam
https://lore.kernel.org/amd-gfx/CAJxfpZJDvFuz40a-euL0jRkPBR82M8Y5NxBrpABeP+EZScFxGw@mail.gmail.com/
Looking up
https://lore.kernel.org/all/CAJxfpZJDvFuz40a-euL0jRkPBR82M8Y5NxBrpABeP%2BEZScFxGw@mail.gmail.com/
Grabbing thread from
lore.kernel.org/all/CAJxfpZJDvFuz40a-euL0jRkPBR82M8Y5NxBrpABeP%2BEZScFxGw@mail.gmail.com/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 3 messages in the thread
Looking for additional code-review trailers on lore.kernel.org
Analyzing 0 code-review messages
Will use the latest revision: v2
You can pick other revisions using the -vN flag
Checking attestation on all messages, may take a moment...
---
✓ [PATCH v2] drm/amd/display: invalidate DP CEC state on s3 suspend
---
✓ Signed: DKIM/gmail.com
---
Total patches: 1
---
Applying: drm/amd/display: invalidate DP CEC state on s3 suspend
Patch failed at 0001 drm/amd/display: invalidate DP CEC state on s3 suspend
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: git diff header lacks filename information when removing 1
leading pathname component (line 6)
hint: Use 'git am --show-current-patch=diff' to see the failed patch
╰─❯ git am --show-current-patch=diff > patch
╰─❯ patch -p1 < patch
patching file drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
patch: **** malformed patch at line 11: drm_device *ddev, bool suspend)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-15 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-12 2:30 [PATCH] drm/amd/display: invalidate DP CEC state on s3 suspend Dan Himebauch
2026-09-14 13:55 ` Alex Hung
2026-09-15 2:27 ` [PATCH v2] " Dan Himebauch
2026-09-15 15:46 ` Mario Limonciello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®