Commit graph

281 commits

Author SHA1 Message Date
Sebastian Wick
211fa636a3 cta: Return a block struct for type vii timings
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
9534dea0df cta: Return a block struct for video format preferences
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
9ed2eeedee cta: Fix name of InfoFrame private base
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
d013195750 cta: Return a block struct for speaker locations
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
a274fed156 cta: Rename room_configuration struct
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
84b48d58dc cta: Move detailed timing definitions over the CTA blocks
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
9814d7dd96 cta: Rename ycbcr420_cap_map struct
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
a08ac0af14 cta: Rename transfer characteristics struct
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
f48bd08f26 cta: Return block structs instead of SVDs directly
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
e4c750fab0 cta: Rename dynamic metadata types
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
bf86fa80c7 cta: Rename static metadata types
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
6689ef604e cta: Rename dddb to display_device_block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
db6f0a86ce cta: Return a block struct for audio blocks
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-08-06 12:41:17 +00:00
Sebastian Wick
8d04de834a gtf: Initialize variables which might not get initialized
If the gtf options contain a bad enum di_gtf_ip_param, some variables do
not get initialized to any value but will later be read.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-07-29 14:37:23 +02:00
Sebastian Wick
9cc806c512 readme: List the relevant specifications and where to get them
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-07-02 18:11:55 +02:00
Simon Ser
82f520583d build: bump version to 0.3.0-dev
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-06-20 18:40:01 +02:00
Simon Ser
66b802d05b build: bump version to 0.2.0
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-06-20 18:36:17 +02:00
Pekka Paalanen
12341a70b8 test: di_info_get_default_gamma()
Notifies us if the result ever changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:26:33 +03:00
Pekka Paalanen
5d2af9a882 info: add di_info_get_default_gamma()
Wayland compositors may be interested in this.

DI-EXT is ignored, because libdisplay-info does not parse it yet.

EDID Color Point Descriptors are ignored, because they have not been
found in shipped products.

https://github.com/linuxhw/EDID.git database contains 373 samples for
which edid-decode complains:
  Basic Display Parameters & Features: sRGB is signaled, but the gamma != 2.2.

Therefore I assume that the sRGB flag is more correct when set.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:26:33 +03:00
Pekka Paalanen
0de6fd5f10 test: di_info_get_supported_signal_colorimetry()
Notifies us if the result ever changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:26:33 +03:00
Pekka Paalanen
af7d091dc9 info: add di_info_get_supported_signal_colorimetry()
Add a high-level function to get the supported additional signal
colorimetries. This is only an interesting sub-set of the CTA-861-H
defined colorimetries, for driving WCG and HDR displays.

Wayland compositors will be interested in this.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:26:33 +03:00
Pekka Paalanen
6bc398e6db test: di_info_get_hdr_static_metadata()
Makes sure the results won't change unnoticed.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:26:33 +03:00
Pekka Paalanen
f2c1b01bd2 info: add di_info_get_hdr_static_metadata()
The low-level struct di_cta_hdr_static_metadata_block is essentially
duplicated in struct di_hdr_static_metadata to make the high-level API
independent of low-level API headers. It's also simpler in form, while
new fields can still be added in the end while maintaining ABI backward
compatibility.

If new sources for HDR static metadata appear, they can be parsed into
this same structure in the future when compatible.

Wayland compositors will be interested in this.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:26:33 +03:00
Pekka Paalanen
ef69f6276c test: di_info_get_default_color_primaries()
Notifies us if the result ever changes.

The 3 decimal precision is taken from E-EDID 1.4 spec which says that
the numbers have that precision.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:26:33 +03:00
Pekka Paalanen
85043a07d5 info: add di_info_get_default_color_primaries()
Add a high-level function to retrieve color primaries. Wayland
compositors will be interested in this.

A high-level function may later be extended to support stand-alone
DisplayID and other sources.

The high-level data is derived from low-level API calls in
di_info_parse_edid(). As we stash the results in struct di_info to avoid
requiring the callers to explicitly free the high-level structures, this
allows keeping struct di_info deeply const in high-level API
implementation. We also avoid some dynamic allocations.

https://github.com/linuxhw/EDID.git database contains 20399 samples for
which edid-decode complains:
  Basic Display Parameters & Features: sRGB is signaled, but the chromaticities do not match.

Therefore I assume that the sRGB flag is more correct when set.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-12 16:25:44 +03:00
Pekka Paalanen
7b4d87b2d2 info: drop unused includes
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-11 15:33:38 +03:00
Sebastian Wick
fbd0022272 build: build edid-decode as subproject
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-06-07 17:05:47 +02:00
Sebastian Wick
c0c0c8acc5 cta: HDMI Audio: Add a failure when NonMixed is supported without MS
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-06-06 10:58:48 +02:00
Sebastian Wick
08a4d543c8 cta: Add support for the HDMI Audio Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-05-29 11:29:37 +02:00
Sebastian Wick
5741163901 edid: Record failures instead of aborting parsing
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-05-08 12:43:20 +02:00
Simon Ser
f48cc61166 edid: ignore malformed CTA extension blocks
Same as previous commit, but for CTA instead of DisplayID.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-05-08 09:10:58 +02:00
Simon Ser
204576ecff edid: ignore unsupported/malformed DisplayID extension blocks
Some EDIDs have DisplayID 2 extension blocks which we don't support
at the moment. Skip the extension block in that case. While at it,
also skip malformed DisplayID blocks.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/issues/42
2024-04-29 11:12:44 +02:00
Simon Ser
7067ab6ad1 displayid: add support for type III timings
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-03-21 17:15:27 +01:00
Simon Ser
245207e5ef displayid: extract timing_aspect_ratio_is_valid()
This will be used by the type III timing parsing logic in the next
commit.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-03-21 17:12:08 +01:00
Simon Ser
179f481c8f displayid: rename enum di_displayid_type_i_ii_vii_timing_aspect_ratio
This is also used by type III timings, and there is no other
competing aspect ratio enum in the DisplayID standard.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-03-21 17:09:18 +01:00
Sebastian Wick
8f4b0f768f edid: Change error messages and di-edid-decode printing
Following the changes in edid-decode.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-21 15:47:34 +01:00
Sebastian Wick
dda7c12642 test: Bump edid-decode to newer version
It has updated the calculation of the PQ level for Dolby Video.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-21 15:44:53 +01:00
Sebastian Wick
2d48bf1d54 di-edid-decode/displayid: Print Type II Detailed Timings
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-20 14:00:59 +01:00
Sebastian Wick
4f1a7ca5a0 displayid: Add support for Type II Detailed Timing Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-20 14:00:59 +01:00
Sebastian Wick
bedd81f1b6 displayid: Handle Type II timings in di_displayid_type_i_ii_vii_timing
Type II timings are exactly the same as Type I except more tightly
packed and no information on the aspect ratio. As such, they fit neatly
into the Type I and Type VII structure.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-19 18:02:47 +01:00
Sebastian Wick
0eb10bda9e cta: Parse DisplayID Type VII Video Timing Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-19 17:13:30 +01:00
Sebastian Wick
f36771f732 di-edid-decode/displayid: Make print_displayid_type_i_vii_timing generic
Instead of hardcoding the type of timing to DTD let the caller decide.
Also lets the caller set the level of indentation.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-19 17:11:50 +01:00
Sebastian Wick
f96aa28c9b displayid: Make parsing type I & VII timings available for CTA
The CTA block contains a single type VII descriptor.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-19 17:11:47 +01:00
Sebastian Wick
adc25656c2 displayid: Use a single struct for Type I and Type VII timings
They only have a different resolution for the pixel clock which we can
represent by just using a type in the struct which fits the higher
resolution.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-19 16:52:28 +01:00
Simon Ser
8d221c1d3d di-edid-decode: don't print manufacture week if unspecified
Fixes philips-ftv-2017.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-02-15 14:12:18 +01:00
Sebastian Wick
1388f16e71 cta: add support for Video Format Preference
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-15 11:02:47 +01:00
Sebastian Wick
75b21671d0 cta: add support for Speaker Location data blocks
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-14 20:56:17 +01:00
Sebastian Wick
3edb81e68d cta: add support for Room Configuration data blocks
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-14 20:56:17 +01:00
Sebastian Wick
63b483cd46 cta: Pull out speaker allocation struct
The speaker allocation format is reused in multiple CTA data blocks.
This commit pulls it into its own struct so it can be embedded into
other data block structs.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-14 17:27:28 +01:00
Christian Meissl
ebee35935d di-edid-decode: fix rgb quantization output
the output accidentally used the ycc range for
testing support of rgb quantization

Signed-off-by: Christian Meissl <meissl.christian@gmail.com>
2023-12-03 16:23:10 +01:00