This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM814x EZSDK edid checksum calc seems wrong

TI,

EDID data is accessed with:

  1. ioctl(TI81XXHDMI_READ_EDID) calls hdmi_get_edid()
  2. hdmi_get_edid() calls HDMI_CORE_DDC_READEDID()
  3. HDMI_CORE_DDC_READEDID() calls read_edid()
  4. read_edid() calls hdmi_core_ddc_edid() for each 128-byte segment

The  hdmi_core_ddc_edid() in arch/arm/plat-omap/hdmi_lib.c reads in extension data at an offset of 128 * extension_number:

i = ext * 128;
j = 0;
while (((FLD_GET(hdmi_read_reg(ins, sts), 4, 4) == 1) ||
    (FLD_GET(hdmi_read_reg(ins, sts), 2, 2) == 0)) && j < 128) {
    if (FLD_GET(hdmi_read_reg(ins, sts), 2, 2) == 0) {
        /* FIFO not empty */
        pEDID[i++] = FLD_GET(
        hdmi_read_reg(ins, HDMI_CORE_DDC_DATA), 7, 0);
        j++;
    }
}

But just after that, when you check the checksum, you always read bytes 0 to 127:

for (j = 0; j < 128; j++)
    checksum += pEDID[j];

It seems to me that you are mistakenly always checking the checksum of block 0 (bytes 0 to 127), not the actual new extension (bytes ext*128 to ext*128 + 127).  You should consider simply accumulating the checksum in the first snippet, after each byte is read into pEDID[i].

Dan -