From nobody Mon Apr 6 23:23:28 2026 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA1613AE1A0 for ; Tue, 17 Mar 2026 12:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773749966; cv=none; b=LKfbigMIP6l7MLmj6Ib6cRd3PJxWhi/yUv375UqvciHf6UHQYbh/nycknOdZn4RK23+ueOSzU/WE/uhjV2WtVWH/+0meRgQooMRB19NYi2MvOjK0kxSpjHvbsxBOUv05adkgYttQrVjrHGTpf4n9B2+R9dGlJRnWbNFxQFUMcCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773749966; c=relaxed/simple; bh=wpmMxM5QpJ7hVAi29ctGpcPvvJxVELkq50UlpmK+n1M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=ZxDMy2Uyc3WVqU+YQ13JMrT3uTBPIVonwIVySYsNBCz4zol0oUF0m2qQwwogGkyjElJERR+4k3QrIICQNghShUWY9D4pk2RM0oj3rMaSPOGn/IpKwB+6YKsSD4HQJitNGE0tHzRZfAlku+Q1GfLfiolW15uapxtFembf4L01oMk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 17 Mar 2026 20:19:21 +0800 Received: from [127.0.1.1] (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Tue, 17 Mar 2026 20:19:21 +0800 From: Jammy Huang Date: Tue, 17 Mar 2026 20:19:00 +0800 Subject: [PATCH v2] drm/ast: DisplayPort edid supports 256 bytes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260317-upstream_ast_dp_edid-v2-1-31166703c491@aspeedtech.com> X-B4-Tracking: v=1; b=H4sIALNGuWkC/4WNQQ6CMBBFr2JmbQ0tAaIr72EIGTqDzAJoOpVoC He3cgGX7yX//Q2Uo7DC7bRB5FVUljmDO5/Ajzg/2QhlBle4uihtaV5BU2ScOtTUUeiYhEw1cI0 0NEhlDXkaIg/yPrKPNvMompb4OV5W+7N/gqs11jhsqr7xxdX27o4amCmxHy9+maDd9/0LJNesh 70AAAA= X-Change-ID: 20260313-upstream_ast_dp_edid-5fe6adf7ad36 To: Dave Airlie , Thomas Zimmermann , Jocelyn Falempe , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter CC: , , "Jammy Huang" X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1773749961; l=2289; i=jammy_huang@aspeedtech.com; s=20251124; h=from:subject:message-id; bh=wpmMxM5QpJ7hVAi29ctGpcPvvJxVELkq50UlpmK+n1M=; b=IxBu9HasiKRWWPtTyKP5QRDNgXmdeZjGcavGV22Inz/klwPSh4QpDrlWxWcc1FgWZbwNCU4zV Tr0dNw3SzBUC7/nCVOJO3wazPFguDM/AGOuJg04NAjxbWc4VAJ8sA0O X-Developer-Key: i=jammy_huang@aspeedtech.com; a=ed25519; pk=E5YwijeJZZcuDR6srvwNlXrNHvLxwipUg3Mb/xxUF9o= 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. Signed-off-by: Jammy Huang --- 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 =3D 0; unsigned int i; =20 - if (block > 0) - return -EIO; /* extension headers not supported */ + if (block > 1) + return 0; =20 /* * Protect access to I/O registers from concurrent modesetting @@ -154,20 +154,6 @@ static int ast_astdp_read_edid_block(void *data, u8 *b= uf, unsigned int block, si ediddata[2] =3D ast_get_index_reg(ast, AST_IO_VGACRI, 0xda); ediddata[3] =3D ast_get_index_reg(ast, AST_IO_VGACRI, 0xdb); =20 - if (i =3D=3D 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] =3D ediddata[3] + ediddata[2]; - ediddata[2] =3D 0; - } - memcpy(buf, ediddata, min((len - i), 4)); buf +=3D 4; } --- base-commit: 5ee8dbf54602dc340d6235b1d6aa17c0f283f48c change-id: 20260313-upstream_ast_dp_edid-5fe6adf7ad36 Best regards, --=20 Jammy Huang