mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Jammy Huang" <jammy_huang@aspeedtech.com>,
	"Jani Nikula" <jani.nikula@linux.intel.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>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] drm/ast: DisplayPort edid supports 256 bytes
Date: Tue, 18 Aug 2026 09:42:54 +0200	[thread overview]
Message-ID: <35bf3f76-c1fc-41a8-9b88-1b773f337e32@suse.de> (raw)
In-Reply-To: <SI6PR06MB7590EB0C73CC9229B3A867D9F1A62@SI6PR06MB7590.apcprd06.prod.outlook.com>

Hi Jammy

Am 18.08.26 um 08:43 schrieb Jammy Huang:
> Hi Thomas,
>
> I'd like to get your thoughts on Jani's point that the kernel should avoid modifying EDID and instead expose the data as-is to userspace.

I agree with Jani that the EDID should best be unmodified. But I've 
found that returning unprocessed EDID makes other components fail. In 
some cases, such as ast, at least the checksum needs to be corrected.

>
> In practice, most monitors I have encountered only contain two EDID blocks, so simply returning block 0 and block 1 already works for the majority of cases.
>
> Given that, would you agree that it may be acceptable to stop modifying the EDID in the driver and only support the blocks the hardware can actually read now?

AFAIK there's currently no clear way to signal an EOF to the EDID 
parser.  Returning any errno code will make it fail hard.   IMHO that 
next best thing is to zero-out the EDID buffer, so that the parser stops 
silently. (Your v3, I think.) That's also easy enough to revert if/when 
the EDID parser gets a real EOF state.

Best regards
Thomas


>
> Best regards,
> Jammy
>
>> Hi Jani,
>>
>> Thanks for your input. So, your suggestion is go back to return -EIO for block >
>> 1, and stop trying to modify the EDID.
>> In this way, we can handle EDID whose blocks is less than 2.
>>
>> BR,
>> Jammy
>>
>>>> Hi Thomas,
>>>>
>>>> Good catch - returning 0 without writing to buf wasn't safe. But I
>>>> also found that returning -EIO isn't right either:
>>>> _drm_do_get_edid() treats EDID_BLOCK_READ_FAIL as fatal for any
>>>> block index, not just block 0, so that would have discarded the
>>>> whole EDID for any monitor reporting more than one extension.
>>>>
>>>> In v3, for block > 1 I now zero the buffer explicitly and return 0.
>>>> That makes drm_edid's block checker classify it as EDID_BLOCK_ZERO
>>>> instead, which is non-fatal - it gets trimmed via
>>>> edid_filter_invalid_blocks() (extensions count reduced, checksum
>>>> recomputed), and blocks 0 and 1 still come through fine. This also
>>>> directly addresses your point about the buffer not being guaranteed
>>>> zeroed, since we zero it ourselves now.
>>> There's a long-term goal to *not* modify the EDID in kernel, but
>>> rather return even the broken EDID extensions to userspace, if that's what
>> the display has.
>>> There are probably a bunch of hurdles in making that happen, but
>>> intentionally returning zeroed out EDID blocks is just adding another
>> unnecessary hurdle.
>>>
>>> BR,
>>> Jani.
>>>
>>>
>>> --
>>> Jani Nikula, Intel

-- 
--
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)



  reply	other threads:[~2026-08-18  7:43 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
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 [this message]
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=35bf3f76-c1fc-41a8-9b88-1b773f337e32@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®