[igt-dev] [PATCH i-g-t v2 4/6] lib/igt_edid: add support for native DTDs in CEA extension blocks
Simon Ser
simon.ser at intel.com
Wed Jul 3 12:02:24 UTC 2019
Native Detailed Timing Descriptors follow the Data Block Collection in the CEA
extension.
Signed-off-by: Simon Ser <simon.ser at intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
lib/igt_edid.c | 6 ++++--
lib/igt_edid.h | 2 +-
lib/igt_kms.c | 3 +--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/igt_edid.c b/lib/igt_edid.c
index 096668e68956..d1aebf32c456 100644
--- a/lib/igt_edid.c
+++ b/lib/igt_edid.c
@@ -404,15 +404,17 @@ size_t edid_cea_data_block_set_speaker_alloc(struct edid_cea_data_block *block,
}
void edid_ext_set_cea(struct edid_ext *ext, size_t data_blocks_size,
- uint8_t flags)
+ uint8_t num_native_dtds, uint8_t flags)
{
struct edid_cea *cea = &ext->data.cea;
ext->tag = EDID_EXT_CEA;
+ assert(num_native_dtds <= 0x0F);
+ assert((flags & 0x0F) == 0);
cea->revision = 3;
cea->dtd_start = 4 + data_blocks_size;
- cea->misc = flags; /* just flags, no DTD */
+ cea->misc = flags | num_native_dtds;
}
void edid_ext_update_cea_checksum(struct edid_ext *ext)
diff --git a/lib/igt_edid.h b/lib/igt_edid.h
index 7907baee08a9..cbd77ab63f86 100644
--- a/lib/igt_edid.h
+++ b/lib/igt_edid.h
@@ -362,6 +362,6 @@ size_t edid_cea_data_block_set_hdmi_vsdb(struct edid_cea_data_block *block,
size_t edid_cea_data_block_set_speaker_alloc(struct edid_cea_data_block *block,
const struct cea_speaker_alloc *speakers);
void edid_ext_set_cea(struct edid_ext *ext, size_t data_blocks_size,
- uint8_t flags);
+ uint8_t num_native_dtds, uint8_t flags);
#endif
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 36e3b821275a..424c83159c78 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -226,8 +226,7 @@ generate_audio_edid(unsigned char raw_edid[static AUDIO_EDID_LENGTH],
assert(cea_data_size <= sizeof(edid_cea->data));
- edid_ext_set_cea(edid_ext, cea_data_size,
- EDID_CEA_BASIC_AUDIO);
+ edid_ext_set_cea(edid_ext, cea_data_size, 0, EDID_CEA_BASIC_AUDIO);
edid_update_checksum(edid);
edid_ext_update_cea_checksum(edid_ext);
--
2.22.0
More information about the igt-dev
mailing list