diff options
author | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2022-03-16 16:45:01 +0530 |
---|---|---|
committer | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2022-03-16 19:27:41 +0530 |
commit | ba8e4acab562bc02848b8dd0206c5957e5bba329 (patch) | |
tree | caed1e295fe06c7ba96db6622a079cf51df4e585 /tests/kms_color_helper.h | |
parent | 1e16f23f496c37b7a5678ddebe89c9482b351bb9 (diff) |
tests/kms_color_helper: Read deep-color capability from EDID
Add a helper function to read the panel's deep-color capability
from EDID.
For EDID 1.3, we need to read deep color capability from Vendor
Specific Data Block, and for EDID 1.4 read bit depth from Video
Input Definition.
Vendor Specific Data Block for "HDMI Licensing LLC":
---------------------------------------------------------
| Byte| Bit | Description |
---------------------------------------------------------
| | Bit 6 | 16-bit-per-channel deep color (48-bit)|
| 6 | Bit 5 | 12-bit-per-channel deep color (36-bit)|
| | Bit 4 | 10-bit-per-channel deep color (30-bit)|
---------------------------------------------------------
Video Input Definition (1-byte):
* Video Signal Interface: Bit 7 (1:Digital, 0:Analog)
* Color Bit Depth: Bits 6 → 4
-----------------------------------------------------
| 7 | 6 5 4 | 3 2 1 0 | Color Bit Depth: Bits 6 → 4 |
|---|-------|---------|-----------------------------|
| 1 | 0 0 0 | x x x x | Color Bit Depth is undefined|
| 1 | 0 0 1 | x x x x | 6 Bits per Primary Color |
| 1 | 0 1 0 | x x x x | 8 Bits per Primary Color |
| 1 | 0 1 1 | x x x x | 10 Bits per Primary Color |
| 1 | 1 0 0 | x x x x | 12 Bits per Primary Color |
| 1 | 1 0 1 | x x x x | 14 Bits per Primary Color |
| 1 | 1 1 0 | x x x x | 16 Bits per Primary Color |
| 1 | 1 1 1 | x x x x | Reserved (Do Not Use) |
-----------------------------------------------------
For deep-color we need atleast 10-bits.
V2:
* Add EDID 1.3 support
V3:
* Fix reading VSDB flags1 for deep-color
V4:
* Separate functions for EDID 1.3 & EDID 1.4
* Other minor cleanups
V5:
* Fine tune the logic to identify DC support for RGB format
V6:
* Cleanup
V7:
* Cleanup: Fix typos, comments and rename function names
* Update max_bpc() to capture the prop value
Cc: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Diffstat (limited to 'tests/kms_color_helper.h')
-rw-r--r-- | tests/kms_color_helper.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/kms_color_helper.h b/tests/kms_color_helper.h index bb6f0054..4c38def4 100644 --- a/tests/kms_color_helper.h +++ b/tests/kms_color_helper.h @@ -36,6 +36,7 @@ #include "drm.h" #include "drmtest.h" #include "igt.h" +#include "igt_edid.h" /* Internal */ @@ -64,6 +65,8 @@ typedef struct { color_t coeffs[]; } gamma_lut_t; +bool panel_supports_deep_color(int fd, drmModeConnector *connector); +uint64_t get_max_bpc(igt_output_t *output); void paint_gradient_rectangles(data_t *data, drmModeModeInfo *mode, color_t *colors, |