]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/edid.h
edid: Add an edid_check_checksum() helper function
[karo-tx-uboot.git] / include / edid.h
index f153091f64976525fbfbdb8ef9012490e37f1dae..a69f43a20648381f79c3131acc018f9e477e1d84 100644 (file)
@@ -54,7 +54,7 @@ struct edid_detailed_timing {
         (_x).vertical_blanking)
        unsigned char hsync_offset;
        unsigned char hsync_pulse_width;
-       unsigned char sync_offset_pulse_width;
+       unsigned char vsync_offset_pulse_width;
        unsigned char hsync_vsync_offset_pulse_width_hi;
 #define EDID_DETAILED_TIMING_HSYNC_OFFSET(_x) \
        ((GET_BITS((_x).hsync_vsync_offset_pulse_width_hi, 7, 6) << 8) + \
@@ -86,6 +86,10 @@ struct edid_detailed_timing {
        GET_BITS((_x).flags, 4, 3)
 #define EDID_DETAILED_TIMING_FLAG_POLARITY(_x) \
        GET_BITS((_x).flags, 2, 1)
+#define EDID_DETAILED_TIMING_FLAG_VSYNC_POLARITY(_x) \
+       GET_BIT((_x).flags, 2)
+#define EDID_DETAILED_TIMING_FLAG_HSYNC_POLARITY(_x) \
+       GET_BIT((_x).flags, 1)
 #define EDID_DETAILED_TIMING_FLAG_INTERLEAVED(_x) \
        GET_BIT((_x).flags, 0)
 } __attribute__ ((__packed__));
@@ -241,6 +245,15 @@ void edid_print_info(struct edid1_info *edid_info);
  */
 int edid_check_info(struct edid1_info *info);
 
+/**
+ * Check checksum of a 128 bytes EDID data block
+ *
+ * @param edid_block   EDID block data
+ *
+ * @return 0 on success, or a negative errno on error
+ */
+int edid_check_checksum(u8 *edid_block);
+
 /**
  * Get the horizontal and vertical rate ranges of the monitor.
  *