diff options
| author | Simon Ser <simon.ser@intel.com> | 2019-07-02 13:28:34 +0300 |
|---|---|---|
| committer | Simon Ser <simon.ser@intel.com> | 2019-07-05 16:06:40 +0300 |
| commit | d3cd74d0656eb4e5e909e2c1ce9bcf15a605a4f0 (patch) | |
| tree | bcd26e8434aef725c32dd6d3dac2c978357be7ca /lib | |
| parent | 1e711065ea8e96d06a4ad778db369f22395ea595 (diff) | |
lib/igt_edid: add support for Short Video Descriptors
Short Video Descriptors (SVDs, not to be confused with Vendor-Specific Data
blocks) describe CEA video formats supported by the monitor.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/igt_edid.c | 8 | ||||
| -rw-r--r-- | lib/igt_edid.h | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/igt_edid.c b/lib/igt_edid.c index d1aebf32..1a59edb6 100644 --- a/lib/igt_edid.c +++ b/lib/igt_edid.c @@ -364,6 +364,14 @@ size_t edid_cea_data_block_set_sad(struct edid_cea_data_block *block, return sizeof(struct edid_cea_data_block) + sads_size; } +size_t edid_cea_data_block_set_svd(struct edid_cea_data_block *block, + const uint8_t *svds, size_t svds_len) +{ + edid_cea_data_block_init(block, EDID_CEA_DATA_VIDEO, svds_len); + memcpy(block->data.svds, svds, svds_len); + return sizeof(struct edid_cea_data_block) + svds_len; +} + size_t edid_cea_data_block_set_vsdb(struct edid_cea_data_block *block, const struct cea_vsdb *vsdb, size_t vsdb_size) { diff --git a/lib/igt_edid.h b/lib/igt_edid.h index cbd77ab6..eb909686 100644 --- a/lib/igt_edid.h +++ b/lib/igt_edid.h @@ -191,6 +191,9 @@ struct cea_sad { uint8_t bitrate; } __attribute__((packed)); +/* Indicates that a Short Video Descriptor is native */ +#define CEA_SVD_NATIVE (1 << 7) + enum hdmi_vsdb_flags1 { HDMI_VSDB_DVI_DUAL = 1 << 0, HDMI_VSDB_DC_Y444 = 1 << 3, /* supports YCbCr 4:4:4 */ @@ -264,6 +267,7 @@ struct edid_cea_data_block { uint8_t type_len; /* type is from enum edid_cea_data_type */ union { struct cea_sad sads[0]; + uint8_t svds[0]; /* Short Video Descriptors */ struct cea_vsdb vsdbs[0]; struct cea_speaker_alloc speakers[0]; } data; @@ -354,6 +358,8 @@ void edid_ext_update_cea_checksum(struct edid_ext *ext); const struct cea_vsdb *cea_vsdb_get_hdmi_default(size_t *size); size_t edid_cea_data_block_set_sad(struct edid_cea_data_block *block, const struct cea_sad *sads, size_t sads_len); +size_t edid_cea_data_block_set_svd(struct edid_cea_data_block *block, + const uint8_t *svds, size_t svds_len); size_t edid_cea_data_block_set_vsdb(struct edid_cea_data_block *block, const struct cea_vsdb *vsdb, size_t vsdb_size); size_t edid_cea_data_block_set_hdmi_vsdb(struct edid_cea_data_block *block, |
