* [RESEND PATCH v2 0/2] drm/amd: fix HDMI output with non-HDMI EDID overrides
@ 2026-10-03 16:15 Johannes Wüller
2026-10-03 16:15 ` [RESEND PATCH v2 1/2] drm: add edid_overridden flag to drm_connector Johannes Wüller
2026-10-03 16:15 ` [RESEND PATCH v2 2/2] drm/amd: fix HDMI signal type for EDID overrides Johannes Wüller
0 siblings, 2 replies; 7+ messages in thread
From: Johannes Wüller @ 2026-10-03 16:15 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
Cc: Johannes Wüller, Rodrigo Siqueira, David Airlie,
Simona Vetter, Jani Nikula, amd-gfx, dri-devel, linux-kernel
Resend: my first attempt at sending v2 went out without any of the Cc
recipients, including the mailing lists. This is the same series,
unchanged. Sorry for the noise! I'm doing these for the first time.
This series lets amdgpu drive an HDMI display at its native resolution
when a non-HDMI EDID is injected via drm.edid_firmware or debugfs
edid_override.
The motivating case is a Dell U3011 (2560x1600) connected via HDMI,
whose native HDMI EDID only advertises CEA modes up to 1920x1080. By
injecting the monitor's DisplayPort EDID (which contains the native
2560x1600 mode), the correct resolution becomes available. However,
the injected EDID lacks an HDMI VSDB, so amdgpu treats the physical
HDMI connector as a passive HDMI-DVI dongle and rejects the required
pixel clock.
Patch 1 adds an edid_overridden flag to drm_connector, set by the
existing EDID override mechanisms in _drm_do_get_edid(), so that
drivers can detect when an override is in effect and adjust their
behavior accordingly, without duplicating the override mechanism.
Patch 2 uses that flag in amdgpu to trust the physical connector type
over the EDID when selecting the signal type.
Tested on AMD Ryzen 9 7950X (Raphael iGPU, DCN 3.1.5) with a Dell U3011
connected via HDMI and drm.edid_firmware=HDMI-A-1:<DisplayPort EDID>:
- amd-staging-drm-next at 53750a937420: the override EDID is loaded,
but 2560x1600 is pruned from the connector's mode list.
- with this series applied: 2560x1600@60Hz RGB 8bpc works, alongside
another Dell U3011 connected via DisplayPort in the same mode.
Changes in v2:
- Rebased onto current amd-staging-drm-next.
- Patch 2: follow the move of create_eml_sink() to
amdgpu_dm_connector.c.
- Dropped "drm/amd: treat max_tmds_clock==0 as unconstrained": The
return value of adjust_colour_depth_from_display_info() is no longer
used to reject the stream, so the patch has no effect anymore.
- Dropped "drm/amd: fix force_yuv420/422_output being ignored": The
flags were replaced by force_yuv_pixel_format.
- I am (hopefully) sending this version to the right people, since v1's
cover letter only went to the lists. Please let me know otherwise!
v1: https://lore.kernel.org/amd-gfx/20260315223307.45807-1-johanneswueller@gmail.com/
Johannes Wüller (2):
drm: add edid_overridden flag to drm_connector
drm/amd: fix HDMI signal type for EDID overrides
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c | 9 ++++++++-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 9 ++++++++-
drivers/gpu/drm/drm_edid.c | 2 ++
include/drm/drm_connector.h | 8 ++++++++
4 files changed, 26 insertions(+), 2 deletions(-)
base-commit: 53750a937420a01acf41bf74010557666f679aab
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RESEND PATCH v2 1/2] drm: add edid_overridden flag to drm_connector
2026-10-03 16:15 [RESEND PATCH v2 0/2] drm/amd: fix HDMI output with non-HDMI EDID overrides Johannes Wüller
@ 2026-10-03 16:15 ` Johannes Wüller
2026-10-03 17:56 ` sashiko-bot
2026-10-03 16:15 ` [RESEND PATCH v2 2/2] drm/amd: fix HDMI signal type for EDID overrides Johannes Wüller
1 sibling, 1 reply; 7+ messages in thread
From: Johannes Wüller @ 2026-10-03 16:15 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
Cc: Johannes Wüller, Rodrigo Siqueira, David Airlie,
Simona Vetter, Jani Nikula, amd-gfx, dri-devel, linux-kernel
When an EDID override is in effect, the physical connector may not
match reported capabilities. Adds a drm_connector flag that allows
drivers to detect such mismatches.
Signed-off-by: Johannes Wüller <johanneswueller@gmail.com>
---
v2: rebased, no functional change.
drivers/gpu/drm/drm_edid.c | 2 ++
include/drm/drm_connector.h | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 42f4e41c459f..9ea6f5f19131 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2424,6 +2424,7 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
struct edid *edid, *new;
size_t alloc_size = EDID_LENGTH;
+ connector->edid_overridden = false;
override = drm_edid_override_get(connector);
if (override) {
alloc_size = override->size;
@@ -2431,6 +2432,7 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
drm_edid_free(override);
if (!edid)
return NULL;
+ connector->edid_overridden = true;
goto ok;
}
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 899643586bb3..d242fb922741 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -2394,6 +2394,14 @@ struct drm_connector {
/** @bad_edid_counter: track sinks that give us an EDID with invalid checksum */
unsigned bad_edid_counter;
+ /**
+ * @edid_overridden: Indicates whether the last read EDID was an
+ * override (e.g. via debugfs edid_override or drm.edid_firmware kernel
+ * parameter), which can cause the physical connector to differ from
+ * the advertised capabilities.
+ */
+ bool edid_overridden;
+
/**
* @edid_corrupt: Indicates whether the last read EDID was corrupt. Used
* in Displayport compliance testing - Displayport Link CTS Core 1.2
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND PATCH v2 2/2] drm/amd: fix HDMI signal type for EDID overrides
2026-10-03 16:15 [RESEND PATCH v2 0/2] drm/amd: fix HDMI output with non-HDMI EDID overrides Johannes Wüller
2026-10-03 16:15 ` [RESEND PATCH v2 1/2] drm: add edid_overridden flag to drm_connector Johannes Wüller
@ 2026-10-03 16:15 ` Johannes Wüller
2026-10-03 17:56 ` sashiko-bot
1 sibling, 1 reply; 7+ messages in thread
From: Johannes Wüller @ 2026-10-03 16:15 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
Cc: Johannes Wüller, Rodrigo Siqueira, David Airlie,
Simona Vetter, Jani Nikula, amd-gfx, dri-devel, linux-kernel
If an EDID override is in effect (e.g. via debugfs edid_override or
drm.edid_firmware kernel parameter), the overriding EDID may not
advertise capabilities matching the physical connector being used.
In that case, trust the physical connector type over the EDID in
create_eml_sink() and dm_helpers_parse_edid_caps().
Signed-off-by: Johannes Wüller <johanneswueller@gmail.com>
---
v2: rebased; create_eml_sink() now lives in amdgpu_dm_connector.c.
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c | 9 ++++++++-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 9 ++++++++-
2 files changed, 16 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 ad3383169d83..2bce57b06037 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
@@ -2134,7 +2134,14 @@ VISIBLE_IF_KUNIT void create_eml_sink(struct amdgpu_dm_connector *aconnector)
return;
}
- if (connector->display_info.is_hdmi)
+ /*
+ * If an EDID override is active, it may not advertise HDMI capability
+ * even though the physical connector is HDMI. Trust the connector type.
+ */
+ if (connector->display_info.is_hdmi ||
+ (connector->edid_overridden &&
+ (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+ connector->connector_type == DRM_MODE_CONNECTOR_HDMIB)))
init_params.sink_signal = SIGNAL_TYPE_HDMI_TYPE_A;
aconnector->drm_edid = drm_edid;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 5c74f19fc33a..9f4465682088 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -223,7 +223,14 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
edid_caps->display_name,
AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS);
- edid_caps->edid_hdmi = connector->display_info.is_hdmi;
+ /*
+ * If an EDID override is active, it may not advertise HDMI capability
+ * even though the physical connector is HDMI. Trust the connector type.
+ */
+ edid_caps->edid_hdmi = connector->display_info.is_hdmi ||
+ (connector->edid_overridden &&
+ (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+ connector->connector_type == DRM_MODE_CONNECTOR_HDMIB));
if (edid_caps->edid_hdmi) {
edid_caps->qs_bit = connector->display_info.rgb_quant_range_selectable;
--
2.56.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH v2 2/2] drm/amd: fix HDMI signal type for EDID overrides
2026-10-03 16:15 ` [RESEND PATCH v2 2/2] drm/amd: fix HDMI signal type for EDID overrides Johannes Wüller
@ 2026-10-03 17:56 ` sashiko-bot
2026-10-04 8:49 ` Johannes Wüller
0 siblings, 1 reply; 7+ messages in thread
From: sashiko-bot @ 2026-10-03 17:56 UTC (permalink / raw)
To: Johannes Wüller; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] amdgpu: missing EDID override check in rgb_output_is_limited_range()
--
commit 8529835fe6f32deeb33be0fa62706033cd8f1243
Author: Johannes Wüller <johanneswueller@gmail.com>
drm/amd: fix HDMI signal type for EDID overrides
This commit updates AMD display code to trust the physical connector type
over the EDID for HDMI capabilities when an EDID override is active. This
fixes cases where the overriding EDID does not advertise HDMI capabilities.
> 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 ad3383169d83f..2bce57b060374 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
> @@ -2134,7 +2134,14 @@ VISIBLE_IF_KUNIT void create_eml_sink(struct amdgpu_dm_connector *aconnector)
> return;
> }
>
> - if (connector->display_info.is_hdmi)
> + /*
> + * If an EDID override is active, it may not advertise HDMI capability
> + * even though the physical connector is HDMI. Trust the connector type.
> + */
> + if (connector->display_info.is_hdmi ||
> + (connector->edid_overridden &&
> + (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> + connector->connector_type == DRM_MODE_CONNECTOR_HDMIB)))
[Severity: Medium]
Does this same logic need to be applied to rgb_output_is_limited_range()
in the same file?
Looking at rgb_output_is_limited_range(), it relies directly on
display_info.is_hdmi to determine the default RGB range:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c:rgb_output_is_limited_range()
{
switch (connector_state->hdmi.broadcast_rgb) {
...
default:
return connector_state->connector->display_info.is_hdmi &&
dc_crtc_timing->vic > 1;
}
If a user supplies an EDID override without HDMI capabilities for a physical
HDMI connector, display_info.is_hdmi evaluates to false here. This causes
the function to incorrectly default to Full Range RGB instead of Limited
Range RGB for standard TV formats (VIC > 1). This results in incorrect
color range output (crushed blacks and clipped whites).
Could this override check also be added to rgb_output_is_limited_range()
so TV formats correctly output limited range RGB?
> init_params.sink_signal = SIGNAL_TYPE_HDMI_TYPE_A;
>
> aconnector->drm_edid = drm_edid;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261003161525.23600-1-johanneswueller@gmail.com?part=2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH v2 1/2] drm: add edid_overridden flag to drm_connector
2026-10-03 16:15 ` [RESEND PATCH v2 1/2] drm: add edid_overridden flag to drm_connector Johannes Wüller
@ 2026-10-03 17:56 ` sashiko-bot
2026-10-04 8:49 ` Johannes Wüller
0 siblings, 1 reply; 7+ messages in thread
From: sashiko-bot @ 2026-10-03 17:56 UTC (permalink / raw)
To: Johannes Wüller; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm: edid_overridden flag not set in fallback override path
--
commit e2139c9168877ee02f537cbf19084a0d24c136be
Author: Johannes Wüller <johanneswueller@gmail.com>
drm: add edid_overridden flag to drm_connector
When an EDID override is in effect, the physical connector may not
match reported capabilities. Adds a drm_connector flag that allows
drivers to detect such mismatches.
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 42f4e41c459fd..9ea6f5f19131f 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2424,6 +2424,7 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
> struct edid *edid, *new;
> size_t alloc_size = EDID_LENGTH;
>
> + connector->edid_overridden = false;
> override = drm_edid_override_get(connector);
> if (override) {
> alloc_size = override->size;
> @@ -2431,6 +2432,7 @@ static struct edid *_drm_do_get_edid(struct drm_connector *connector,
> drm_edid_free(override);
> if (!edid)
> return NULL;
> + connector->edid_overridden = true;
[Severity: Medium]
Does this new flag also need to be set when falling back to an override EDID
after a failed DDC probe?
If an EDID override is provided but the physical DDC probe fails (e.g. due to
broken DDC lines), drm_helper_probe_get_modes() skips reading the EDID and
falls back to drm_edid_override_connector_update(). This fallback applies the
override but appears to miss setting this new flag:
drivers/gpu/drm/drm_edid.c:drm_edid_override_connector_update() {
const struct drm_edid *override;
int num_modes = 0;
override = drm_edid_override_get(connector);
if (override) {
if (drm_edid_connector_update(connector, override) == 0)
num_modes = drm_edid_connector_add_modes(connector);
drm_edid_free(override);
...
}
If a driver relies on this flag to apply HDMI signal type workarounds, could
this cause it to read a false value and fail to apply the necessary quirks?
> goto ok;
> }
>
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261003161525.23600-1-johanneswueller@gmail.com?part=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH v2 1/2] drm: add edid_overridden flag to drm_connector
2026-10-03 17:56 ` sashiko-bot
@ 2026-10-04 8:49 ` Johannes Wüller
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Wüller @ 2026-10-04 8:49 UTC (permalink / raw)
To: sashiko-reviews; +Cc: dri-devel
On Sat, 03 Oct 2026 17:56:19 +0000, sashiko-bot@kernel.org wrote:
> Does this new flag also need to be set when falling back to an override EDID
> after a failed DDC probe?
Yes, drm_edid_override_connector_update() applies the override without
setting the flag. I will fix that in v3.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH v2 2/2] drm/amd: fix HDMI signal type for EDID overrides
2026-10-03 17:56 ` sashiko-bot
@ 2026-10-04 8:49 ` Johannes Wüller
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Wüller @ 2026-10-04 8:49 UTC (permalink / raw)
To: sashiko-reviews; +Cc: dri-devel
On Sat, 03 Oct 2026 17:56:19 +0000, sashiko-bot@kernel.org wrote:
> Could this override check also be added to rgb_output_is_limited_range()
> so TV formats correctly output limited range RGB?
Yes. In v3, I'll move the check into a helper and use it there as well.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-10-04 8:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03 16:15 [RESEND PATCH v2 0/2] drm/amd: fix HDMI output with non-HDMI EDID overrides Johannes Wüller
2026-10-03 16:15 ` [RESEND PATCH v2 1/2] drm: add edid_overridden flag to drm_connector Johannes Wüller
2026-10-03 17:56 ` sashiko-bot
2026-10-04 8:49 ` Johannes Wüller
2026-10-03 16:15 ` [RESEND PATCH v2 2/2] drm/amd: fix HDMI signal type for EDID overrides Johannes Wüller
2026-10-03 17:56 ` sashiko-bot
2026-10-04 8:49 ` Johannes Wüller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.