Commit ac6f2e29 authored by Daniel Vetter's avatar Daniel Vetter

drm/edid: Kerneldoc for newly added edid_corrupt

Also treat it as a proper boolean.

Cc: Todd Previte <tprevite@gmail.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent e7ded2d7
...@@ -1064,7 +1064,7 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid, ...@@ -1064,7 +1064,7 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
int score = drm_edid_header_is_valid(raw_edid); int score = drm_edid_header_is_valid(raw_edid);
if (score == 8) { if (score == 8) {
if (edid_corrupt) if (edid_corrupt)
*edid_corrupt = 0; *edid_corrupt = false;
} else if (score >= edid_fixup) { } else if (score >= edid_fixup) {
/* Displayport Link CTS Core 1.2 rev1.1 test 4.2.2.6 /* Displayport Link CTS Core 1.2 rev1.1 test 4.2.2.6
* The corrupt flag needs to be set here otherwise, the * The corrupt flag needs to be set here otherwise, the
...@@ -1072,12 +1072,12 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid, ...@@ -1072,12 +1072,12 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
* checksum is correct and the test fails * checksum is correct and the test fails
*/ */
if (edid_corrupt) if (edid_corrupt)
*edid_corrupt = 1; *edid_corrupt = true;
DRM_DEBUG("Fixing EDID header, your hardware may be failing\n"); DRM_DEBUG("Fixing EDID header, your hardware may be failing\n");
memcpy(raw_edid, edid_header, sizeof(edid_header)); memcpy(raw_edid, edid_header, sizeof(edid_header));
} else { } else {
if (edid_corrupt) if (edid_corrupt)
*edid_corrupt = 1; *edid_corrupt = true;
goto bad; goto bad;
} }
} }
...@@ -1089,7 +1089,7 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid, ...@@ -1089,7 +1089,7 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
} }
if (edid_corrupt) if (edid_corrupt)
*edid_corrupt = 1; *edid_corrupt = true;
/* allow CEA to slide through, switches mangle this */ /* allow CEA to slide through, switches mangle this */
if (raw_edid[0] != 0x02) if (raw_edid[0] != 0x02)
......
...@@ -4120,7 +4120,7 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp) ...@@ -4120,7 +4120,7 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
struct drm_connector *connector = &intel_connector->base; struct drm_connector *connector = &intel_connector->base;
if (intel_connector->detect_edid == NULL || if (intel_connector->detect_edid == NULL ||
connector->edid_corrupt == 1 || connector->edid_corrupt ||
intel_dp->aux.i2c_defer_count > 6) { intel_dp->aux.i2c_defer_count > 6) {
/* Check EDID read for NACKs, DEFERs and corruption /* Check EDID read for NACKs, DEFERs and corruption
* (DP CTS 1.2 Core r1.1) * (DP CTS 1.2 Core r1.1)
......
...@@ -647,6 +647,7 @@ struct drm_encoder { ...@@ -647,6 +647,7 @@ struct drm_encoder {
* @audio_latency: audio latency info from ELD, if found * @audio_latency: audio latency info from ELD, if found
* @null_edid_counter: track sinks that give us all zeros for the EDID * @null_edid_counter: track sinks that give us all zeros for the EDID
* @bad_edid_counter: track sinks that give us an EDID with invalid checksum * @bad_edid_counter: track sinks that give us an EDID with invalid checksum
* @edid_corrupt: indicates whether the last read EDID was corrupt
* @debugfs_entry: debugfs directory for this connector * @debugfs_entry: debugfs directory for this connector
* @state: current atomic state for this connector * @state: current atomic state for this connector
* @has_tile: is this connector connected to a tiled monitor * @has_tile: is this connector connected to a tiled monitor
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment