From nobody Mon Sep 28 18:36:01 2026 Received: from twmbx01.aspeedtech.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 5EA2B3CB918 for ; Wed, 19 Aug 2026 05:58:53 +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=1787119137; cv=none; b=PpP+g6XuBaslPcMO0Qxg+7MPnCl+fgSQpD/hmEJKWrj0cG4IkVS0hne7oBPy41bh0jZws6dDqJkbrjcw4GBW7Vn8Y2bMsy/VO3nWMZYYqJ9uih6wmLI5xk2oGSwM9eiogIuv0lJobqCNZ1ras0y6MT6d05UG/9r5OeGFRlhDxwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787119137; c=relaxed/simple; bh=mOF4mUY8m9fVNE8LqeVkJT2xXPKlpZXeHeztxFh1mws=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=o/dzQUBOe8kJfDm93hvK3GGBAiLQbiAfb3O+FjPEJ3b/IjLqdlH9LkSETqe0q00UOHaWgK0mrR2YrZ5RQC9yn8GHjvx1glM9j+Z4n/sSzXjb4tn52PVyQM9BUApAoEmyFr9Pc0W1xhaOcDhx6npT2QeJparpBeapYDJFuWpZJLE= 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; Wed, 19 Aug 2026 13:58:50 +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; Wed, 19 Aug 2026 13:58:50 +0800 From: Jammy Huang Date: Wed, 19 Aug 2026 13:58:37 +0800 Subject: [PATCH v3] 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: <20260819-upstream_ast_dp_edid-v3-1-15d36c28afe2@aspeedtech.com> X-B4-Tracking: v=1; b=H4sIAAxGhWoC/4XN0QrCIBTG8VcZXmd4tCnrqveIGE7PmhfbRE2Ks XfP7SqI6PL/wfmdhUQMDiM5VwsJmF1081RCHCpiBj3dkTpbmnDGJRMg6MPHFFCPrY6ptb5F6yy te5Ta9kpbIUk59QF799zZ66304GKaw2v/kmFb/4AZKFCuVd0pwxro+EVHj2gTmuFo5pFsauafk voh8SIJACkVE+bUwJe0rusbt/OquAcBAAA= 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=1787119130; l=2920; i=jammy_huang@aspeedtech.com; s=20251124; h=from:subject:message-id; bh=mOF4mUY8m9fVNE8LqeVkJT2xXPKlpZXeHeztxFh1mws=; b=NeYUgk5661rr81bAvbou0cJgbc2pDl6Dsyn+97b1WdEPVy91Hvjc6W62MGWkc0fzsHbhSkOV+ vKSVnTXrSCODlVOu1h9G5kOeV2a+OjkdPC+uCloMuL4TrMBwLZ+KLny 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. For any block beyond that (i.e. the monitor's EDID is larger than the 256 bytes ASPEED DP can hold), report it as an all-zero block instead of a read failure. Also remove the manual checksum/extension-count patch of block 0's last four bytes. That code was already dead, so the condition can never be true. Signed-off-by: Jammy Huang Reviewed-by: Thomas Zimmermann --- ASPEED DisplayPort's EDID size can be 256 bytes at most. Thus, EDID blocks fetched can be 0 and 1. --- Changes in v3: - For block > 1, write a zeroed buffer. Returning a zeroed block instead makes drm_edid's block checker classify it as EDID_BLOCK_ZERO, which is treated as a non-fatal invalid block. - Link to v2: https://lore.kernel.org/r/20260317-upstream_ast_dp_edid-v2-1-= 31166703c491@aspeedtech.com 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 | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c index 9d07dad358c..38530cd126c 100644 --- a/drivers/gpu/drm/ast/ast_dp.c +++ b/drivers/gpu/drm/ast/ast_dp.c @@ -88,8 +88,14 @@ 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) { + /* ASPEED DP's EDID buffer holds blocks 0 and 1 only (256 + * bytes). Report anything beyond that as an all-zero block + * rather than a read failure. + */ + memset(buf, 0, len); + return 0; + } =20 /* * Protect access to I/O registers from concurrent modesetting @@ -154,20 +160,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