Exclude build/ from code coverage, otherwise build/pnp-id-table.c
is included in the stats. Also add subprojects/ which is added by
default by Meson unless there is a custom config file.
Signed-off-by: Simon Ser <contact@emersion.fr>
This prevents the Alpine image from being upgraded to a new major
version when re-generated. ci-templates defaults FDO_BASE_IMAGE to
alpine:latest.
Signed-off-by: Simon Ser <contact@emersion.fr>
Since a001cab480 ("build: split off di-edid-decode into separate
file"), di-edid-decode is located in a subdirectory.
Signed-off-by: Simon Ser <contact@emersion.fr>
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>
This is needed for the following patch to find pnp.ids.
This is not available in the Alpine release we are using right now.
That --disable-blacklist works around the error:
install: unrecognized option: T
BusyBox v1.35.0 (2022-08-01 15:14:44 UTC) multi-call binary.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This seems to be what the existing python file uses, and trying to write
python when your editor is constantly resetting its settings according
to the previous "incorrect" editorconfig was infuriating.
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>
The functionality of these new high-level functions as implemented here
follows what Weston 11.0's ad hoc EDID parser extracted. There are
differences to Weston though:
- get_model() falls back to the numeric model field
- unusual characters are escaped as hex rather than replaced with dash
The documentation of the new functions allows to change the behavior of
get_model and get_make to e.g. convert PNP ID to a company name. The
notes about UTF-8 allow us to make use of UTF-8 fields if such appear
useful in the future.
Weston's ad hoc parser shall be replaced with this. After another API
addition, the high-level API semantics will match what Weston expects.
The memory_stream stuff is for convenience and will see more complex
use in the future.
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 was used as an example of what a high-level API function would
look like, but is too opinionated to be useful across many
compositors.
Signed-off-by: Simon Ser <contact@emersion.fr>
I believe this is what we intended, and it is what I want.
It could lead to duplicating low-level API in high-level API at first,
but once we start seeing DisplayID in the wild, the high-level functions
need to start looking into both EDID and DisplayID APIs to deliver the
desired information.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
I was scratching my head for a good while, why does the test suite fail
straight out of upstream on one EDID file. Turns out I was using a
different version of edid-decode than CI, which caused the recorded diff
patch to fail to apply. I was missing
41507c0b5f "ci: update edid-decode"
Make an explicit note about this dependency.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
../../git/weston/subprojects/display-info/edid.c: In function ‘decode_chromaticity_coord’:
../../git/weston/subprojects/display-info/edid.c:250:8: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Wconversion]
250 | raw = (uint16_t) (hi << 2) | lo;
| ^
Apparently the cast applies to (hi << 2), then bitwise-or implicitly
promotes to signed int, and that gets assigned to uint16_t raw. At least
gcc 10.2.1 from Debian seems to think so.
Fix it by forcing the cast on the complete result.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Leverages gyosu [1] to generate HTML documentation from the header
files.
[1]: https://sr.ht/~emersion/gyosu/
Signed-off-by: Simon Ser <contact@emersion.fr>