diff mbox

drm/edid: Kerneldoc for newly added edid_corrupt

Message ID 1431094603-26635-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter May 8, 2015, 2:16 p.m. UTC
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: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_edid.c      | 8 ++++----
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 include/drm/drm_crtc.h          | 1 +
 3 files changed, 6 insertions(+), 5 deletions(-)

Comments

Shuang He May 9, 2015, 7:13 a.m. UTC | #1
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6360
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  276/276              276/276
ILK                                  302/302              302/302
SNB                 -1              314/314              313/314
IVB                                  338/338              338/338
BYT                                  286/286              286/286
BDW                                  320/320              320/320
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 SNB  igt@pm_rpm@dpms-mode-unset-non-lpsp      DMESG_WARN(3)PASS(1)      DMESG_WARN(2)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
Note: You need to pay more attention to line start with '*'
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index be6713c2fc9d..e426223482fb 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -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);
 		if (score == 8) {
 			if (edid_corrupt)
-				*edid_corrupt = 0;
+				*edid_corrupt = false;
 		} else if (score >= edid_fixup) {
 			/* Displayport Link CTS Core 1.2 rev1.1 test 4.2.2.6
 			 * 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,
 			 * checksum is correct and the test fails
 			 */
 			if (edid_corrupt)
-				*edid_corrupt = 1;
+				*edid_corrupt = true;
 			DRM_DEBUG("Fixing EDID header, your hardware may be failing\n");
 			memcpy(raw_edid, edid_header, sizeof(edid_header));
 		} else {
 			if (edid_corrupt)
-				*edid_corrupt = 1;
+				*edid_corrupt = true;
 			goto bad;
 		}
 	}
@@ -1089,7 +1089,7 @@  bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
 		}
 
 		if (edid_corrupt)
-			*edid_corrupt = 1;
+			*edid_corrupt = true;
 
 		/* allow CEA to slide through, switches mangle this */
 		if (raw_edid[0] != 0x02)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2b1ed66c748f..9cf9208aeaff 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4120,7 +4120,7 @@  static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
 	struct drm_connector *connector = &intel_connector->base;
 
 	if (intel_connector->detect_edid == NULL ||
-	    connector->edid_corrupt == 1 ||
+	    connector->edid_corrupt ||
 	    intel_dp->aux.i2c_defer_count > 6) {
 		/* Check EDID read for NACKs, DEFERs and corruption
 		 * (DP CTS 1.2 Core r1.1)
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index b9fcdc824997..0a4a040d6bb7 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -647,6 +647,7 @@  struct drm_encoder {
  * @audio_latency: audio latency info from ELD, if found
  * @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
+ * @edid_corrupt: indicates whether the last read EDID was corrupt
  * @debugfs_entry: debugfs directory for this connector
  * @state: current atomic state for this connector
  * @has_tile: is this connector connected to a tiled monitor