From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] lib/igt_edid: add docs
Date: Fri, 12 Jul 2019 17:28:48 +0300 [thread overview]
Message-ID: <20190712142848.31796-1-simon.ser@intel.com> (raw)
Add a description of the library, and add misisng function docs.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_edid.c | 40 ++++++++++++++++++++++++++++++++++++++++
lib/igt_edid.h | 6 ++++++
2 files changed, 46 insertions(+)
diff --git a/lib/igt_edid.c b/lib/igt_edid.c
index 1a59edb63546..af31d66f3a57 100644
--- a/lib/igt_edid.c
+++ b/lib/igt_edid.c
@@ -34,6 +34,21 @@
#include "igt_core.h"
#include "igt_edid.h"
+/**
+ * SECTION:igt_edid
+ * @short_description: EDID generation library
+ * @title: EDID
+ * @include: igt_edid.h
+ *
+ * This library contains helpers to generate custom EDIDs.
+
+ * The E-EDID specification is available at:
+ * https://glenwing.github.io/docs/VESA-EEDID-A2.pdf
+ *
+ * The EDID CEA extension is defined in CEA-861-D section 7. The HDMI VSDB is
+ * defined in the HDMI spec.
+ */
+
static const char edid_header[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00
};
@@ -351,6 +366,10 @@ static void edid_cea_data_block_init(struct edid_cea_data_block *block,
block->type_len = type << 5 | size;
}
+/**
+ * edid_cea_data_block_set_sad: initialize a CEA data block to contain Short
+ * Audio Descriptors
+ */
size_t edid_cea_data_block_set_sad(struct edid_cea_data_block *block,
const struct cea_sad *sads, size_t sads_len)
{
@@ -364,6 +383,10 @@ size_t edid_cea_data_block_set_sad(struct edid_cea_data_block *block,
return sizeof(struct edid_cea_data_block) + sads_size;
}
+/**
+ * edid_cea_data_block_set_svd: initialize a CEA data block to contain Short
+ * Video Descriptors
+ */
size_t edid_cea_data_block_set_svd(struct edid_cea_data_block *block,
const uint8_t *svds, size_t svds_len)
{
@@ -372,6 +395,10 @@ size_t edid_cea_data_block_set_svd(struct edid_cea_data_block *block,
return sizeof(struct edid_cea_data_block) + svds_len;
}
+/**
+ * edid_cea_data_block_set_vsdb: initialize a CEA data block to contain a
+ * Vendor Specific Data Block
+ */
size_t edid_cea_data_block_set_vsdb(struct edid_cea_data_block *block,
const struct cea_vsdb *vsdb, size_t vsdb_size)
{
@@ -383,6 +410,10 @@ size_t edid_cea_data_block_set_vsdb(struct edid_cea_data_block *block,
return sizeof(struct edid_cea_data_block) + vsdb_size;
}
+/**
+ * edid_cea_data_block_set_hdmi_vsdb: initialize a CEA data block to contain an
+ * HDMI VSDB
+ */
size_t edid_cea_data_block_set_hdmi_vsdb(struct edid_cea_data_block *block,
const struct hdmi_vsdb *hdmi,
size_t hdmi_size)
@@ -399,6 +430,10 @@ size_t edid_cea_data_block_set_hdmi_vsdb(struct edid_cea_data_block *block,
CEA_VSDB_HEADER_SIZE + hdmi_size);
}
+/**
+ * edid_cea_data_block_set_speaker_alloc: initialize a CEA data block to
+ * contain a Speaker Allocation Data block
+ */
size_t edid_cea_data_block_set_speaker_alloc(struct edid_cea_data_block *block,
const struct cea_speaker_alloc *speakers)
{
@@ -411,6 +446,11 @@ size_t edid_cea_data_block_set_speaker_alloc(struct edid_cea_data_block *block,
return sizeof(struct edid_cea_data_block) + size;
}
+/**
+ * edid_ext_set_cea: initialize an EDID extension block to contain a CEA
+ * extension. CEA extensions contain a Data Block Collection (with multiple
+ * CEA data blocks) followed by multiple Detailed Timing Descriptors.
+ */
void edid_ext_set_cea(struct edid_ext *ext, size_t data_blocks_size,
uint8_t num_native_dtds, uint8_t flags)
{
diff --git a/lib/igt_edid.h b/lib/igt_edid.h
index 2e3224e8015e..606541ac63b4 100644
--- a/lib/igt_edid.h
+++ b/lib/igt_edid.h
@@ -32,6 +32,9 @@
#include <xf86drmMode.h>
+/**
+ * est_timings: set of established timings
+ */
struct est_timings {
uint8_t t1;
uint8_t t2;
@@ -47,6 +50,9 @@ enum std_timing_aspect {
STD_TIMING_16_9 = 0b11,
};
+/**
+ * std_timing: a standard timing
+ */
struct std_timing {
uint8_t hsize;
uint8_t vfreq_aspect;
--
2.22.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-07-12 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-12 14:28 Simon Ser [this message]
2019-07-12 15:47 ` [igt-dev] ✗ Fi.CI.BAT: failure for lib/igt_edid: add docs Patchwork
2019-07-15 8:44 ` Arkadiusz Hiler
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=20190712142848.31796-1-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.