Commit graph

18 commits

Author SHA1 Message Date
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
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
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
Bernd Kuhls
5c9801a75f displayid.c: Include sys/types.h
Fixes build error
../displayid.c:377:10: error: ‘ssize_t’ undeclared (first use in this function); did you mean ‘size_t’?

seen with:
arc-linux-gcc.br_real (Buildroot 2021.11-4428-g6b6741b) 10.2.0

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
2023-05-07 14:23:26 +02:00
Consolatis
480f72510a displayid.c: prevent int promotion warning
Fixes following warning

```
../displayid.c: In function ‘parse_tiled_topo_block’:
../displayid.c:298:29: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Werror=conversion]
  298 |  tiled_topo->product_code = data[0x13] | (uint16_t)(data[0x14] << 8);
      |                             ^~~~
```

Signed-off-by: Consolatis <40171-Consolatis@users.noreply.gitlab.freedesktop.org>
2023-03-26 10:26:53 +02: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
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
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
186e78c128 displayid: validate checksum
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
Simon Ser
106947ac1f displayid: parse section size
The section size might be smaller than the provided buffer size,
because the buffer might have padding at the end.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-27 07:56:09 +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