From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Jammy Huang" <jammy_huang@aspeedtech.com>,
"Dave Airlie" <airlied@redhat.com>,
"Jocelyn Falempe" <jfalempe@redhat.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/ast: DisplayPort edid supports 256 bytes
Date: Wed, 18 Mar 2026 08:29:17 +0100 [thread overview]
Message-ID: <2efefedd-a36a-4b3c-a2cd-89db3499ebdb@suse.de> (raw)
In-Reply-To: <20260317-upstream_ast_dp_edid-v2-1-31166703c491@aspeedtech.com>
(cc Villa, Jani)
Hi
Am 17.03.26 um 13:19 schrieb Jammy Huang:
> DisplayPort supports EDID up to 256 bytes (blocks 0 and 1). Update the
> block check to allow these two blocks while returning 0 for any
> additional extension blocks.
>
> Furthermore, remove the manual EDID byte manipulation logic. The DRM
> core (drm_edid) already handles error correction and checksum
> validation.
Does that really work? AFAICT
- The allocations in _drm_do_get_edid() [1] do not guarantee that the
memory is cleared to zero.
- If the helper detects an error, it will conditionally print an error [2].
- As ast is polling the EDID, it'll fill the kernel log over time with
these warnings.
I think we'd still need some sort of 'valid error state' that signals an
EOF that is not an error, but still counts as an invalid header.
Best regards
Thomas
[1]
https://elixir.bootlin.com/linux/v6.19.8/source/drivers/gpu/drm/drm_edid.c#L2366
[2]
https://elixir.bootlin.com/linux/v6.19.8/source/drivers/gpu/drm/drm_edid.c#L1919
>
> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
> ---
> ASPEED DisplayPort's EDID size can be 256 bytes at most. Thus, EDID
> blocks fetched can be 0 and 1.
> ---
> Changes in v2:
> Becasue drm-edid will handle invalid EDID if happen, we have 2 changes
> below.
> - Return 0 for the number of block more than 1.
> - Remove modification of EDID
> - Link to v1: https://lore.kernel.org/r/20260313-upstream_ast_dp_edid-v1-1-2a75b7c091b2@aspeedtech.com
> ---
> drivers/gpu/drm/ast/ast_dp.c | 18 ++----------------
> 1 file changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c
> index 9d07dad358c..282c694218c 100644
> --- a/drivers/gpu/drm/ast/ast_dp.c
> +++ b/drivers/gpu/drm/ast/ast_dp.c
> @@ -88,8 +88,8 @@ static int ast_astdp_read_edid_block(void *data, u8 *buf, unsigned int block, si
> int ret = 0;
> unsigned int i;
>
> - if (block > 0)
> - return -EIO; /* extension headers not supported */
> + if (block > 1)
> + return 0;
>
> /*
> * Protect access to I/O registers from concurrent modesetting
> @@ -154,20 +154,6 @@ static int ast_astdp_read_edid_block(void *data, u8 *buf, unsigned int block, si
> ediddata[2] = ast_get_index_reg(ast, AST_IO_VGACRI, 0xda);
> ediddata[3] = ast_get_index_reg(ast, AST_IO_VGACRI, 0xdb);
>
> - if (i == 31) {
> - /*
> - * For 128-bytes EDID_1.3,
> - * 1. Add the value of Bytes-126 to Bytes-127.
> - * The Bytes-127 is Checksum. Sum of all 128bytes should
> - * equal 0 (mod 256).
> - * 2. Modify Bytes-126 to be 0.
> - * The Bytes-126 indicates the Number of extensions to
> - * follow. 0 represents noextensions.
> - */
> - ediddata[3] = ediddata[3] + ediddata[2];
> - ediddata[2] = 0;
> - }
> -
> memcpy(buf, ediddata, min((len - i), 4));
> buf += 4;
> }
>
> ---
> base-commit: 5ee8dbf54602dc340d6235b1d6aa17c0f283f48c
> change-id: 20260313-upstream_ast_dp_edid-5fe6adf7ad36
>
> Best regards,
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-03-18 7:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 12:19 Jammy Huang
2026-03-18 7:29 ` Thomas Zimmermann [this message]
2026-07-21 5:55 ` Jammy Huang
2026-07-27 8:54 ` Jani Nikula
2026-07-30 9:33 ` Jammy Huang
2026-08-18 6:43 ` Jammy Huang
2026-08-18 7:42 ` Thomas Zimmermann
2026-08-19 5:49 ` Jammy Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2efefedd-a36a-4b3c-a2cd-89db3499ebdb@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jammy_huang@aspeedtech.com \
--cc=jani.nikula@linux.intel.com \
--cc=jfalempe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®