From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94E723A543A for ; Thu, 20 Aug 2026 06:29:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787207391; cv=none; b=Jg4IWewDdlhYphhNhrZvWCStWyvKtSgiKlM4Se2EM6oEaLBY5f9R6DU23IJrnfVl71AOLX4VSJW2KOqVd+WrQUsmR/GtWJ9+X9AiwZ6b+kzc674KiG+L4MLt9llcPkjQpGKOamCCgJ2exqpY/ef06vU0neNczCT0Yz+98Bn/X5A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787207391; c=relaxed/simple; bh=PaLblViM/Fgsoud4uhOUo20jGjoNzeq99csWKcn9PfY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Pw33/JJtM4db+D6cyrGIjGfQHBOFeZ/dBEyhi2FGYpTeLwGUhz1/8coSRLTcMwDMRpYbtpiO0/PgY0HHue9vsdg4Mcd/xzNLCKfFrlpeinaWF4269AQftDjUvXiM/+W5jQAQdKTKxfj8uSkNet2GCiCyJbDpCWEilDEuqJUkMfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=dfU8pme9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=oUsTTSzW; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=WQRbSQry; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=hQa03A3N; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="dfU8pme9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="oUsTTSzW"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="WQRbSQry"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="hQa03A3N" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7B6223E39; Thu, 20 Aug 2026 06:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1787207363; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=jWJNliSjqKXplglCQf89wQTNkNzugiMJkNw3ySCIutY=; b=dfU8pme91hC0vRhkd86/oICYnRNhTllQNvolBTHaoR6BRmw2VyA+n9bTlbXB1Gi7lBe1px CA7UEOmJ7awTZXsK1eUy+ByGirrmN/36mf8qAcQcKKXI5UQfttjZhljqE60evSJhrdJHqz iQRq/RumWPfZSbveMnYwq696+fjLroY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1787207363; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=jWJNliSjqKXplglCQf89wQTNkNzugiMJkNw3ySCIutY=; b=oUsTTSzWK5yKpkl2NE/XX5VnHT5THw1GICucT3lFvCzRZc6rtplQHWKJAVRpbMBLP2wLOI tZ1j8GWh/6Ibw9Ag== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1787207359; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=jWJNliSjqKXplglCQf89wQTNkNzugiMJkNw3ySCIutY=; b=WQRbSQryk59JeL1Rj+EzbKZBlxdIpOfoXd5REOKbVAzs71aQooUd79x7kzGbbRjPl2/5wZ 2ti31ZXr1SXKwP0TxVDRAoHlLFSXrYH6SGk3NJHVDTgKNd2hmjqgzc+hDRsnkkzvezNwNr x8x2WIRNHFdJdy0KU+5HWHDKJioBcqY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1787207359; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=jWJNliSjqKXplglCQf89wQTNkNzugiMJkNw3ySCIutY=; b=hQa03A3N9ra5sqKhBEpAHqk9qdCtHX0T+gvCgnuAK66L9xt0tFfcHRTT7BM2vBSFLqYwV8 pieu93to9A/AK0CQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 33FCD27A8; Thu, 20 Aug 2026 06:29:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id KbpRCb+ehmpMGgAAD6G6ig (envelope-from ); Thu, 20 Aug 2026 06:29:19 +0000 Message-ID: Date: Thu, 20 Aug 2026 08:29:18 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] drm/ast: DisplayPort edid supports 256 bytes To: Jammy Huang , Dave Airlie , Jocelyn Falempe , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com References: <20260819-upstream_ast_dp_edid-v3-1-15d36c28afe2@aspeedtech.com> Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAHNJ1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPsLAjgQTAQgAOAIb AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftODH AAoJEGgNwR1TC3ojx1wH/0hKGWugiqDgLNXLRD/4TfHBEKmxIrmfu9Z5t7vwUKfwhFL6hqvo lXPJJKQpQ2z8+X2vZm/slsLn7J1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1-15d36c28afe2@aspeedtech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -4.30 X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[aspeedtech.com,redhat.com,linux.intel.com,kernel.org,gmail.com,ffwll.ch]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[aspeedtech.com:email,imap1.dmz-prg2.suse.org:helo,suse.com:url,suse.de:email,suse.de:mid] Hi Am 19.08.26 um 07:58 schrieb Jammy Huang: > 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 I know it's controversial, but there appears to be no better solution now. Therefore Reviewed-by: Thomas Zimmermann Best regards Thomas > --- > 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 = 0; > unsigned int i; > > - 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; > + } > > /* > * Protect access to I/O registers from concurrent modesetting > @@ -154,20 +160,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, (HRB 36809, AG Nürnberg)