summaryrefslogtreecommitdiff
path: root/lib/igt_edid.h
diff options
context:
space:
mode:
authorSimon Ser <simon.ser@intel.com>2019-05-06 17:30:33 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-05-09 08:43:27 +0300
commit23200bc1b008542bd4d744755540b07881d41fae (patch)
tree582d8a7d08c113e06ceaaffd5793e2ea855301a7 /lib/igt_edid.h
parent3e3ff0e48989abd25fce4916e85e8fef20a3c63a (diff)
lib/igt_edid: fix detailed pixel timing analog/digital
The generated EDIDs were wrongly indicating that they support analog sync. Fixup the detailed timings flags to advertise digital sync instead. Currently the Linux kernel seems to ignore this completely. However I'd prefer to fix this anyway to make sure we don't run into issues if an EDID consumer actually cares about it. The header definitions for EDID_PT_* values has been re-organized to make it clearer in which situations the flags are relevant. Changes from v1 to v2: - Fix misleading commit message - Revert the "misc" → "features" rename - Re-organize EDID_PT_* definitions to make them clearer Changes from v2 to v3: - Include review changelog in commit message - Fix "Fixes:" tag to conform to the kernel style - Re-order EDID_PT_* definitions to sort by descending bitshift Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Fixes: a2fd0489c87a ("lib/igt_edid: new library for generating EDIDs")
Diffstat (limited to 'lib/igt_edid.h')
-rw-r--r--lib/igt_edid.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/igt_edid.h b/lib/igt_edid.h
index bbcb939a..36eec7e9 100644
--- a/lib/igt_edid.h
+++ b/lib/igt_edid.h
@@ -52,11 +52,17 @@ struct std_timing {
#define DETAILED_TIMINGS_LEN 4
-#define EDID_PT_HSYNC_POSITIVE (1 << 1)
+#define EDID_PT_INTERLACED (1 << 7)
+#define EDID_PT_STEREO (1 << 5)
+
+/* Sync type */
+#define EDID_PT_SYNC_ANALOG (0b00 << 3)
+#define EDID_PT_SYNC_DIGITAL_COMPOSITE (0b10 << 3)
+#define EDID_PT_SYNC_DIGITAL_SEPARATE (0b11 << 3)
+
+/* Applies to EDID_PT_SYNC_DIGITAL_SEPARATE only */
#define EDID_PT_VSYNC_POSITIVE (1 << 2)
-#define EDID_PT_SEPARATE_SYNC (3 << 3)
-#define EDID_PT_STEREO (1 << 5)
-#define EDID_PT_INTERLACED (1 << 7)
+#define EDID_PT_HSYNC_POSITIVE (1 << 1)
struct detailed_pixel_timing {
uint8_t hactive_lo;
@@ -74,7 +80,7 @@ struct detailed_pixel_timing {
uint8_t width_height_mm_hi;
uint8_t hborder;
uint8_t vborder;
- uint8_t misc;
+ uint8_t misc; /* EDID_PT_* */
} __attribute__((packed));
struct detailed_data_string {