Commit graph

92 commits

Author SHA1 Message Date
Sebastian Wick
4698004913 cta: Add new data blocks from CTA-861.6
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-30 16:53:47 +01:00
Simon Ser
b439985324 cta: add VIC table
Add a small Python tool to extract VIC information from the spec.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-13 02:37:01 +01:00
Sebastian Wick
5c2255047b cta: add support for YCbCr 4:2:0 Capability Map
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-11 22:02:20 +00:00
Sebastian Wick
f7bd527557 cta: add support for YCbCr 4:2:0 Video
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-11 21:21:27 +01:00
Simon Ser
2ebc104594 cta: add support for speaker allocation data block
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-11 21:04:48 +01:00
Sebastian Wick
a55e759f7c cta: parse HDR Dynamic Metadata Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-11 19:11:37 +00:00
Sebastian Wick
c32df33fe7 cta: include stddef.h for size_t
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-10 15:12:09 +01:00
Simon Ser
67b5d67a64 cta: add support for VESA DDDB
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-10 12:23:38 +00:00
Simon Ser
fc13fb4d53 displayid: add support for tiled display topology data block
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-09 22:49:01 +00:00
Sebastian Wick
4a8684d1b0 edid: add support for CVT timing code descriptors
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-04 02:12:22 +01:00
Simon Ser
f7160730cc Introduce di_cvt_compute()
Same as di_gtf_compute(), but for CVT.

Code imported from edid-decode, fixed up [1] [2], edited for
code style and extended to return all output parameters.

Will help with CVT timing code descriptors in EDID [3].

[1]: https://lore.kernel.org/linux-media/20221005121221.14882-1-contact@emersion.fr/T/#u
[2]: https://lore.kernel.org/linux-media/20221028142405.81894-1-contact@emersion.fr/T/#u
[3]: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/merge_requests/93

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-12-16 15:37:38 +01:00
Sebastian Wick
8fbc366c7c cta: parse short audio descriptors
Co-authored-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-12-14 15:19:27 +01:00
Joshua Ashton
c63ca40ef7 memory-stream: Add memory_stream_cleanup helper
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2022-11-25 12:15:14 +00:00
Joshua Ashton
a10c478558 memory-stream: Factor out memory-stream related code to a new file
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2022-11-25 12:15:14 +00:00
Simon Ser
7d5003c5ac dmt: add reduced_blanking field
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-11-23 15:30:33 +01:00
Pekka Paalanen
b3231b85dd info: add getters for make, model and serial
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>
2022-11-09 14:14:27 +02:00
Simon Ser
add5d0bd76 info: drop di_info_get_product_name()
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>
2022-10-15 19:01:08 +02:00
Pekka Paalanen
50ce9c73f5 Get size_t definition for info.h
VScode told me that this header wasn't self-contained. Fix it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-10-14 13:26:30 +03:00
Simon Ser
97a8f16d1f di-edid-decode: split into multiple files
di-edid-decode.c is getting bit and messy.

Use one file per spec.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-07 05:05:27 +00:00
Simon Ser
f2d6819f04 displayid: add missing includes in public header
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-07 05:05:27 +00:00
Simon Ser
cad7de92c7 displayid: add support for display parameters data block
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-03 08:56:03 +02:00
Simon Ser
d7144ad9b9 displayid: parse type I timings
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-03 06:32:38 +00:00
Simon Ser
87e264f7fb Introduce di_gtf_compute()
This is a function to compute a timing according to GTF.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-29 11:50:09 +00:00
Sebastian Wick
11f48480d8 cta: add support for VESA Display Transfer Characteristic data block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-09-28 23:56:46 +02:00
Simon Ser
40d8018a7e displayid: parse data blocks
Just parse the tag for now.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-27 07:56:09 +00:00
Simon Ser
3b8816ba3f displayid: add logging helpers
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-27 07:56:09 +00:00
Simon Ser
ceabc884fd displayid: parse product type
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-27 07:56:09 +00:00
Sebastian Wick
ef67125056 edid: add support for Color Management Data descriptors
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-09-26 21:51:58 +02:00
Simon Ser
28beee232c edid: parse established timings III
This display descriptor contains a bitfield indicating support for
DMT timings.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-26 09:18:59 +02:00
Simon Ser
047e8bb305 edid: expose struct di_dmt_timing
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>
2022-09-17 06:53:39 +00:00
Simon Ser
ad4c9b467c dmt: add public header
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-17 06:53:39 +00:00
Simon Ser
4ead11c64b dmt: add more timing info
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-17 06:53:39 +00:00
Sebastian Wick
cc7597d9cc edid: add support for color point descriptors
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-09-15 16:26:03 +02:00
Simon Ser
a382b96645 cta: add missing <stdint.h> include in public header
cta.h:246 uses uint8_t but we never include <stdint.h>.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-14 12:03:36 +00:00
Simon Ser
fbec9839fa cta: add EDID_CTA_MAX_DATA_BLOCKS
Use a constant for the max number of data blocks, with a comment
explaining the reasoning.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-12 06:21:12 +00:00
Simon Ser
c637a9daf8 edid: parse timing data from CVT range limit descriptor
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-06 09:27:32 +02:00
Simon Ser
7c8bcb09eb edid: parse timing data from secondary GTF range limit descriptor
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-06 09:26:32 +02:00
Simon Ser
407b309904 cta: add support for video capability data block
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-05 18:11:56 +00:00
Simon Ser
edb952756d cta: rename di_edid_cta_flags.underscan to it_underscan
Make it clear this is only about IT video formats.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-05 18:11:56 +00:00
Simon Ser
7a6d694b1a Add basic support for DisplayID in EDID extension blocks
Establish the new headers and structs, and just parse the
version/revision for now.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-02 06:42:06 +00:00
Simon Ser
0c8673af02 cta: add support for video data blocks
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>
2022-08-31 13:18:34 +00:00
Sebastian Wick
9806eb214e cta: make HDR eotfs and descriptors directly accessible from the block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-08-30 15:17:57 +02:00
Sebastian Wick
44e1810f2b edid: split the detailed timing signal union into separate structs
Nested structs makes it impossible to extend the nested struct after
extending the base struct. The union acts as a single struct in this
case but the nesting is still an issue. Use pointers to those structs instead
to keep all of them extensible. Only the struct which is applicable for the
signal type is not a null pointer to make sure only valid data is accessed.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-08-30 12:24:46 +02:00
Simon Ser
93b0fd18de edid: add support for standard timings descriptor
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-29 11:54:48 +00:00
Simon Ser
355a3aca80 cta: parse HDR static metadata blocks
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-29 13:52:50 +02:00
Simon Ser
92c0933b44 edid: parse analog video input params
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-09 09:07:17 +00:00
Simon Ser
febb8b56f9 edid: parse digital video input flags for EDID 1.3-
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-09 09:05:44 +00:00
Simon Ser
c784d978fb cta: parse detailed timing definitions
After the data blocks, the CTA extension contains a list of DTDs.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-08 18:41:18 +02:00
Simon Ser
7275f65131 edid: expose _di_edid_parse_detailed_timing_def
This is a private function which parses DTDs. This will be useful
in the next commit to parse DTDs from the CTA extension.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-08 18:37:52 +02:00
Simon Ser
501c20f854 edid: parse established timings I and II
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-08 16:33:14 +00:00