diff mbox series

EDID debug patch for Dmitry

Message ID 1536364728-15367-1-git-send-email-john.stultz@linaro.org
State New
Headers show
Series EDID debug patch for Dmitry | expand

Commit Message

John Stultz Sept. 7, 2018, 11:58 p.m. UTC
Signed-off-by: John Stultz <john.stultz@linaro.org>

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |  6 +++---
 drivers/gpu/drm/drm_edid.c                   | 12 ++++++++----
 2 files changed, 11 insertions(+), 7 deletions(-)

-- 
2.7.4
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 98bdfde..c913bab 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -651,7 +651,7 @@  static int adv7511_mode_valid(struct adv7511 *adv7511,
 	/*
 	 * some work well modes which want to put in the front of the mode list.
 	 */
-	DRM_DEBUG("Checking mode %ix%i@%i clock: %i...",
+	printk("Checking mode %ix%i@%i clock: %i...",
 		  mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode), mode->clock);
 	if ((mode->hdisplay == 1920 && mode->vdisplay == 1080 && mode->clock == 148500) ||
 	    (mode->hdisplay == 1920 && mode->vdisplay == 1080 && mode->clock == 148352) ||
@@ -678,10 +678,10 @@  static int adv7511_mode_valid(struct adv7511 *adv7511,
 	    (mode->hdisplay == 800  && mode->vdisplay == 600  && mode->clock == 40000)  ||
 	    (mode->hdisplay == 800  && mode->vdisplay == 480  && mode->clock == 32000)) {
 		mode->type |= DRM_MODE_TYPE_PREFERRED;
-		DRM_DEBUG("OK\n");
+		printk("OK\n");
 		return MODE_OK;
 	}
-	DRM_DEBUG("BAD\n");
+	printk("BAD\n");
 	return MODE_BAD;
 }
 
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 6b31e04..4139616 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1141,14 +1141,18 @@  bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
 	if (csum) {
 		if (print_bad_edid) {
 			DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum);
+			printk(KERN_ERR "Raw EDID:\n");
+			print_hex_dump(KERN_ERR, " \t", DUMP_PREFIX_NONE, 16, 1,
+			       raw_edid, EDID_LENGTH, false);
+			printk(KERN_ERR "Ignoring EDID error\n");
 		}
 
-		if (edid_corrupt)
-			*edid_corrupt = true;
+//		if (edid_corrupt)
+//			*edid_corrupt = true;
 
 		/* allow CEA to slide through, switches mangle this */
-		if (raw_edid[0] != 0x02)
-			goto bad;
+//		if (raw_edid[0] != 0x02)
+//			goto bad;
 	}
 
 	/* per-block-type checks */