This makes it easier to re-generate the test diffs. The build system
will properly set DI_EDID_DECODE/DI_EDID_PRINT (and will rebuild
these tools if they are out-of-date).
Signed-off-by: Simon Ser <contact@emersion.fr>
The three character PNP ID is a key to manufacturer name database. It
may be desirable to report the manufacturer's real name than just PNP ID
which can be misleading, e.g. MSI refers to Microstep and not MSI GmbH.
This builds the PNP ID database into libdisplay-info to avoid having to
find and parse files at runtime.
tool/gen-search-table.py started as a copy of Wayland 1.21.0's
src/embed.py and took influence from
10945c4ed8/conv.py
However, our script parses the text file shipped in hwdata package in
Debian (and presumably other distributions) rather than the original
CSV.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Having to define just DI_EDID_DECODE was tolerable when REF_EDID_DECODE
does not need setting, but now that there are two built tools, it is
getting inconvenient.
Change the defaults to match the build directory structure and add a new
overridable for the build directory.
Now I only need to set BUILDDIR for this to work. My build dirs are
completely elsewhere, but if someone uses the usual 'meson build'
incantation, the default value for BUILDDIR should be fine.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This new test exercises all existing high-level API to make sure the
output does not change unexpectedly.
Unlike with edid-decode tests, these new print tests do not have an
externally defined groundtruth. They are only to detect changes and
exercise code paths.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This is a hand-crafted EDID taken from edid-decode (test/cta-vesa.test).
It contains uncommon blocks: VESA Display Transfer Characteristics Data
Block and VESA Video Display Device Data Block in the CTA-861 extension.
While it's not as good as a real-world EDID, it can still improve our
test coverage and ensure we behave like edid-decode.
Signed-off-by: Simon Ser <contact@emersion.fr>
This allows callers to access the detailed DMT data.
di-edid-decode is updated to print the missing fields.
Signed-off-by: Simon Ser <contact@emersion.fr>
Report the SVDs inside the video data block.
We'll need to add additional APIs to get detailed SVD mode info
in the future (with a SVD table).
Signed-off-by: Simon Ser <contact@emersion.fr>
This makes it easier to perform an operation on all EDID files at
once, e.g. "test/edid-decode-diff.sh test/data/*.edid" to update all
diffs at once.
Signed-off-by: Simon Ser <contact@emersion.fr>
Call rm with the -f flag to ignore non-existing .diff files.
The .diff file doesn't exist if there is no difference in the
edid-decode output.
Signed-off-by: Simon Ser <contact@emersion.fr>
Upstream edid-decode uses a global variable to store the current
EDID section name and prefix failure messages.
Signed-off-by: Simon Ser <contact@emersion.fr>
EDID 1.4 forbids years < 2006, but EDID 1.3 allows them.
Error out when an EDID uses a reserved value. Correctly parse the
year on older EDID revisions.
Signed-off-by: Simon Ser <contact@emersion.fr>
Mirror upstream edid-decode.
samsung-s27a950d-dp and hp-5dq99aa-hdmi are missing some failures
about features we haven't implemented yet. panasonic-mei96a2-dp
has a bogus "Missing Display Product Name" failure, see [1].
[1]: https://lore.kernel.org/linux-media/20220802093219.30599-1-contact@emersion.fr/T/#u
Signed-off-by: Simon Ser <contact@emersion.fr>
This is a bit messy because the values depend on various misc flags
defined earlier in the spec, and the meaning changes between EDID 1.3
and 1.4. On top of that edid-decode prints something confusing in the
EDID 1.3 case.
Signed-off-by: Simon Ser <contact@emersion.fr>
The analog/digital flags are left for a future patch.
A join_str() function is introduced in di-edid-decode: upstream
edid-decode uses a comma-separated list with a handful of other
flags.
Signed-off-by: Simon Ser <contact@emersion.fr>