On Thu, Oct 26, 2023 at 09:11:53PM +0200, Frieder Schrempf wrote: > [You don't often get email from frieder.schrempf@xxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > On 26.10.23 13:30, Emil Abildgaard Svendsen wrote: > > [Sie erhalten nicht häufig E-Mails von emas@xxxxxxxxxxxxxxx. Weitere Informationen, warum dies wichtig ist, finden Sie unter https://aka.ms/LearnAboutSenderIdentification ] > > > > Currently reading EDID only works because usually only two EDID blocks > > of 128 bytes is used. Where an EDID segment holds 256 bytes or two EDID > > blocks. And the first EDID segment read works fine but E-EDID specifies > > up to 128 segments. > > > > The logic is broken so change EDID segment index to multiple of 256 > > bytes and not 128 (block size). > > > > Also change check of DDC status. Instead of silently not reading EDID > > when in "IDLE" state [1]. Check if the DDC controller is in reset > > instead (no HPD). > > > > [1] > > ADV7511 Programming Guide: Table 11: DDCController Status: > > > > 0xC8 [3:0] DDC Controller State > > > > 0000 In Reset (No Hot Plug Detected) > > 0001 Reading EDID > > 0010 IDLE (Waiting for HDCP Requested) > > 0011 Initializing HDCP > > 0100 HDCP Enabled > > 0101 Initializing HDCP Repeater > > > > Signed-off-by: Emil Svendsen <emas@xxxxxxxxxxxxxxx> > > This patch somehow seems to break the reported display modes with my > setup (i.MX8MM DSI -> ADV7535 -> FullHD screen) when I test on current > linux-next. > > Without this patch I get 30 valid modes reported by modetest. > > With this patch applied I only get 5 valid modes. The screen still comes > up with the 1080p default mode though, that is now not even in the list > anymore. Okay, I believe it's because I return when DDC controller is in reset. I believe you hit this because HPD override is enabled for ADV7535 which in my experiments isn't needed. But I will see if I can address that in another commit. For this commit I will simply remove the return. Reading EDID clearly still works when DDC is in reset. Maybe because of the 200 ms wait?