Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82d75356 authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Daniel Vetter
Browse files

drm/edid: Don't print an error if the checksum of a CEA block is wrong

It's common to share screens within CI labs, and it's also common for
KVM switches to alter the contents of the CEA block but leave the
checksum outdated.

So in this case, print a debug message instead of an error.

References: https://bugs.freedesktop.org/show_bug.cgi?id=98228


Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: default avatarJari Tahvanainen <jari.tahvanainen@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1481202716-31317-1-git-send-email-tomeu.vizoso@collabora.com
parent 2776b1c1
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1131,17 +1131,20 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,

	csum = drm_edid_block_checksum(raw_edid);
	if (csum) {
		if (print_bad_edid) {
			DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum);
		}

		if (edid_corrupt)
			*edid_corrupt = true;

		/* allow CEA to slide through, switches mangle this */
		if (raw_edid[0] != 0x02)
		if (raw_edid[0] == CEA_EXT) {
			DRM_DEBUG("EDID checksum is invalid, remainder is %d\n", csum);
			DRM_DEBUG("Assuming a KVM switch modified the CEA block but left the original checksum\n");
		} else {
			if (print_bad_edid)
				DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum);

			goto bad;
		}
	}

	/* per-block-type checks */
	switch (raw_edid[0]) {