* [PATCH v2] drm/edid: Don't mark DisplayID Type VII YCbCr 4:2:0 timings preferred
@ 2026-12-02 10:15 Arun Iyengar via B4 Relay
0 siblings, 0 replies; only message in thread
From: Arun Iyengar via B4 Relay @ 2026-12-02 10:15 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Jani Nikula, Yaroslav Bolyukin
Cc: dri-devel, linux-kernel, stable, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
In a DisplayID Type VII timing data block of revision 2 or later, bit 7
of the timing options means YCbCr 4:2:0 support, not preferred timing.
Only treat it as preferred in Type I and older Type VII blocks.
Fixes: 80ecb5d7c0f2 ("drm/edid: Support type 7 timings")
Cc: stable@vger.kernel.org # v5.18+
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
edid-decode reads bit 7 the same way. Local KUnit case: a Type VII
revision 2 timing with bit 7 set was preferred before and is not after;
Type I and Type VII revisions 0 and 1 are unchanged. No such display tested.
If "drm/edid: Add the modes of CTA Type VII video timing data blocks"
lands first, I will send a new version that passes the revision there too.
Developed with Claude (Anthropic), which wrote the code and commit message; I reviewed it.
---
Changes in v2:
- int block_rev, check the revision before the flag, Cc stable (Jani)
- Link to v1: https://patch.msgid.link/20261201-displayid-t7-y420-v1-1-da4e2c15ec3f@gmail.com
---
drivers/gpu/drm/drm_edid.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index b8f882a17c8f..93e7b1fb8e46 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -7053,7 +7053,7 @@ static void update_display_info(struct drm_connector *connector,
static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *dev,
const struct displayid_detailed_timings_1 *timings,
- bool type_7)
+ bool type_7, int block_rev)
{
struct drm_display_mode *mode;
unsigned int pixel_clock = (timings->pixel_clock[0] |
@@ -7091,7 +7091,8 @@ static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *d
mode->flags |= vsync_positive ? DRM_MODE_FLAG_PVSYNC : DRM_MODE_FLAG_NVSYNC;
mode->type = DRM_MODE_TYPE_DRIVER;
- if (timings->flags & 0x80)
+ /* Type VII block revision 2+ uses bit 7 for YCbCr 4:2:0, not preferred */
+ if ((!type_7 || block_rev < 2) && (timings->flags & 0x80))
mode->type |= DRM_MODE_TYPE_PREFERRED;
drm_mode_set_name(mode);
@@ -7115,7 +7116,8 @@ static int add_displayid_detailed_1_modes(struct drm_connector *connector,
for (i = 0; i < num_timings; i++) {
struct displayid_detailed_timings_1 *timings = &det->timings[i];
- newmode = drm_mode_displayid_detailed(connector->dev, timings, type_7);
+ newmode = drm_mode_displayid_detailed(connector->dev, timings, type_7,
+ block->rev & 0x7);
if (!newmode)
continue;
---
base-commit: c408466a4dfaee4b12587e926c5b85e68c8b3c40
change-id: 20261130-displayid-t7-y420-058c00501fb0
Best regards,
--
Arun Iyengar <aiyengar1990@gmail.com>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-02 10:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 10:15 [PATCH v2] drm/edid: Don't mark DisplayID Type VII YCbCr 4:2:0 timings preferred Arun Iyengar via B4 Relay
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®