From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2 2/6] lib/igt_edid: s/vsd/vsdb/
Date: Wed, 3 Jul 2019 15:02:22 +0300 [thread overview]
Message-ID: <20190703120226.24693-2-simon.ser@intel.com> (raw)
In-Reply-To: <20190703120226.24693-1-simon.ser@intel.com>
"VSDB" (Vendor-Specific Data Block) is the wording used by CEA 861D.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_edid.c | 38 +++++++++++++++++++-------------------
lib/igt_edid.h | 12 ++++++------
lib/igt_kms.c | 14 +++++++-------
3 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/lib/igt_edid.c b/lib/igt_edid.c
index cbb7eefff70d..df5b6611e22c 100644
--- a/lib/igt_edid.c
+++ b/lib/igt_edid.c
@@ -315,29 +315,29 @@ void cea_sad_init_pcm(struct cea_sad *sad, int channels,
}
/**
- * cea_vsd_get_hdmi_default:
+ * cea_vsdb_get_hdmi_default:
*
* Returns the default Vendor Specific Data block for HDMI.
*/
-const struct cea_vsd *cea_vsd_get_hdmi_default(size_t *size)
+const struct cea_vsdb *cea_vsdb_get_hdmi_default(size_t *size)
{
- static char raw[sizeof(struct cea_vsd) + 4] = {0};
- struct cea_vsd *vsd;
+ static char raw[sizeof(struct cea_vsdb) + 4] = {0};
+ struct cea_vsdb *vsdb;
*size = sizeof(raw);
/* Magic incantation. Works better if you orient your screen in the
* direction of the VESA headquarters. */
- vsd = (struct cea_vsd *) raw;
- vsd->ieee_oui[0] = 0x03;
- vsd->ieee_oui[1] = 0x0C;
- vsd->ieee_oui[2] = 0x00;
- vsd->data[0] = 0x10;
- vsd->data[1] = 0x00;
- vsd->data[2] = 0x38;
- vsd->data[3] = 0x2D;
-
- return vsd;
+ vsdb = (struct cea_vsdb *) raw;
+ vsdb->ieee_oui[0] = 0x03;
+ vsdb->ieee_oui[1] = 0x0C;
+ vsdb->ieee_oui[2] = 0x00;
+ vsdb->data[0] = 0x10;
+ vsdb->data[1] = 0x00;
+ vsdb->data[2] = 0x38;
+ vsdb->data[3] = 0x2D;
+
+ return vsdb;
}
static void edid_cea_data_block_init(struct edid_cea_data_block *block,
@@ -360,15 +360,15 @@ 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_vsd(struct edid_cea_data_block *block,
- const struct cea_vsd *vsd, size_t vsd_size)
+size_t edid_cea_data_block_set_vsdb(struct edid_cea_data_block *block,
+ const struct cea_vsdb *vsdb, size_t vsdb_size)
{
edid_cea_data_block_init(block, EDID_CEA_DATA_VENDOR_SPECIFIC,
- vsd_size);
+ vsdb_size);
- memcpy(block->data.vsds, vsd, vsd_size);
+ memcpy(block->data.vsdbs, vsdb, vsdb_size);
- return sizeof(struct edid_cea_data_block) + vsd_size;
+ return sizeof(struct edid_cea_data_block) + vsdb_size;
}
size_t edid_cea_data_block_set_speaker_alloc(struct edid_cea_data_block *block,
diff --git a/lib/igt_edid.h b/lib/igt_edid.h
index 47581bb778b0..6fcb50a3e95e 100644
--- a/lib/igt_edid.h
+++ b/lib/igt_edid.h
@@ -191,8 +191,8 @@ struct cea_sad {
uint8_t bitrate;
} __attribute__((packed));
-/* Vendor Specific Data */
-struct cea_vsd {
+/* Vendor-Specific Data Block */
+struct cea_vsdb {
uint8_t ieee_oui[3];
char data[];
};
@@ -223,7 +223,7 @@ struct edid_cea_data_block {
uint8_t type_len; /* type is from enum edid_cea_data_type */
union {
struct cea_sad sads[0];
- struct cea_vsd vsds[0];
+ struct cea_vsdb vsdbs[0];
struct cea_speaker_alloc speakers[0];
} data;
} __attribute__((packed));
@@ -310,11 +310,11 @@ void detailed_timing_set_string(struct detailed_timing *dt,
void cea_sad_init_pcm(struct cea_sad *sad, int channels,
uint8_t sampling_rates, uint8_t sample_sizes);
void edid_ext_update_cea_checksum(struct edid_ext *ext);
-const struct cea_vsd *cea_vsd_get_hdmi_default(size_t *size);
+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_vsd(struct edid_cea_data_block *block,
- const struct cea_vsd *vsd, size_t vsd_size);
+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_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,
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index a66a685009cd..36e3b821275a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -186,7 +186,7 @@ const unsigned char *igt_kms_get_alt_edid(void)
static void
generate_audio_edid(unsigned char raw_edid[static AUDIO_EDID_LENGTH],
- bool with_vsd, struct cea_sad *sad,
+ bool with_vsdb, struct cea_sad *sad,
struct cea_speaker_alloc *speaker_alloc)
{
struct edid *edid;
@@ -194,8 +194,8 @@ generate_audio_edid(unsigned char raw_edid[static AUDIO_EDID_LENGTH],
struct edid_cea *edid_cea;
char *cea_data;
struct edid_cea_data_block *block;
- const struct cea_vsd *vsd;
- size_t cea_data_size, vsd_size;
+ const struct cea_vsdb *vsdb;
+ size_t cea_data_size, vsdb_size;
/* Create a new EDID from the base IGT EDID, and add an
* extension that advertises audio support. */
@@ -212,11 +212,11 @@ generate_audio_edid(unsigned char raw_edid[static AUDIO_EDID_LENGTH],
cea_data_size += edid_cea_data_block_set_sad(block, sad, 1);
/* A Vendor Specific Data block is needed for HDMI audio */
- if (with_vsd) {
+ if (with_vsdb) {
block = (struct edid_cea_data_block *) &cea_data[cea_data_size];
- vsd = cea_vsd_get_hdmi_default(&vsd_size);
- cea_data_size += edid_cea_data_block_set_vsd(block, vsd,
- vsd_size);
+ vsdb = cea_vsdb_get_hdmi_default(&vsdb_size);
+ cea_data_size += edid_cea_data_block_set_vsdb(block, vsdb,
+ vsdb_size);
}
/* Speaker Allocation Data block */
--
2.22.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-07-03 12:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 12:02 [igt-dev] [PATCH i-g-t v2 1/6] lib/igt_kms: remove length parameter from kmstest_force_edid Simon Ser
2019-07-03 12:02 ` Simon Ser [this message]
2019-07-03 12:57 ` [igt-dev] [PATCH i-g-t v2 2/6] lib/igt_edid: s/vsd/vsdb/ Ville Syrjälä
2019-07-03 12:02 ` [igt-dev] [PATCH i-g-t v2 3/6] lib/igt_edid: add hdmi_vsdb Simon Ser
2019-07-03 12:02 ` [igt-dev] [PATCH i-g-t v2 4/6] lib/igt_edid: add support for native DTDs in CEA extension blocks Simon Ser
2019-07-03 12:02 ` [igt-dev] [PATCH i-g-t v2 5/6] lib/igt_edid: add support for Short Video Descriptors Simon Ser
2019-07-03 12:02 ` [igt-dev] [PATCH i-g-t v2 6/6] lib/igt_kms: use igt_edid to generate a 4K EDID Simon Ser
2019-07-03 17:18 ` Ville Syrjälä
2019-07-04 7:16 ` Ser, Simon
2019-07-03 13:08 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,v2,1/6] lib/igt_kms: remove length parameter from kmstest_force_edid Patchwork
2019-07-04 7:13 ` Ser, Simon
2019-07-04 7:35 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,v2,1/6] lib/igt_kms: remove length parameter from kmstest_force_edid (rev2) Patchwork
2019-07-04 8:26 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-07-05 8:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190703120226.24693-2-simon.ser@intel.com \
--to=simon.ser@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox