Skip to content

Fields "product_id" and "serial" have Incorrect Endianness #6

@Repkap11

Description

@Repkap11

According to the VESA spec (and Wikipedia), some fields in the EDID should be interpreted as little-endian. This library treats all data as big-endian.

https://glenwing.github.io/docs/VESA-EEDID-A2.pdf
https://en.wikipedia.org/wiki/Extended_Display_Identification_Data#EDID_1.4_data_format

This includes the "Manufacturer product code" aka "product_id", and
"ID Serial Number" aka "serial".

The following code can be used to swap endianness.

def swap(num: int, length_bytes: int) -> int:
    return int.from_bytes(num.to_bytes(length_bytes, "little"), "big")

swap(edid.product_id, 2)
swap(edid.serial, 4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions