From patchwork Thu Dec 8 13:11:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9466367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D4FB607D4 for ; Thu, 8 Dec 2016 13:12:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4190928536 for ; Thu, 8 Dec 2016 13:12:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34E062855A; Thu, 8 Dec 2016 13:12:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 918DE28555 for ; Thu, 8 Dec 2016 13:12:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E738A6E772; Thu, 8 Dec 2016 13:12:50 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wj0-x241.google.com (mail-wj0-x241.google.com [IPv6:2a00:1450:400c:c01::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2BBEE6E772; Thu, 8 Dec 2016 13:12:49 +0000 (UTC) Received: by mail-wj0-x241.google.com with SMTP id he10so40248585wjc.2; Thu, 08 Dec 2016 05:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=+iegW3MCfhOTnG+MJXzn+fnYYBJZhD2R6eADYZwi5+M=; b=tpcHDB8VA9aKyJkR4YqXSx5jTmtWPxm4V7ILWEEhAUwwzgyhKakfZdVlpa7vaWWyqD iXj7W1CURjBeZVuOAPteZEMieslYbATfvl88qbmxqTz+DBuXu0DX8uVr2jCcMdqwq2eu spPjApapkxEtrynqQB8BIpKdCouJEPaJtYZFF5hOidCmTIQYGH4S3seQU7bKyYi4qFdc jSYO1igxc4gk61xZYdo+P3iERcgrIAFS2bhNfatSNRrMq/ynjDq4CMJd+b+vgczA6Hiz PYLZXuMN2h+VKUn6FspLApGdmRPKJNE/bh8SkXR/zcTpxsqggDEMZJQ7HDzx/mn8/+V/ a8bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=+iegW3MCfhOTnG+MJXzn+fnYYBJZhD2R6eADYZwi5+M=; b=FQz6tUcJytNAMyXDWrPLb640b/9Dw2MByw8wUWZBhIt10ihMNTZvNtDjB7FPkfzaK0 WuhSV2Zd/5gzepnpGgYWiPsvtOORS4ZmIQE1Um/6Ye4yzwEpKt3mWQO2uoh8Ju/7alYG vDh+/5t32ja8BIZtTvkZsXnasaPDEe+SsntkZGZZ50CbKsLmSTyo/pIw675wQ8GKDm2m q3H28iC4TelHWcdFDk1F5Aaj2ewgX6awIStdpVHderBjI3lcRFJ/EdrCVRSQsuQ4+Ry/ jXYXdJr7bL4kPKLyeoYARP0zUjcxXYczT/v9lZQKc/JMbKrMumtrZunhuqa6Fa708Rm3 LoNA== X-Gm-Message-State: AKaTC03rQ6+e7qyfwrsJZnwxQV7AzMZK1/nrd80ddfDnVFs2cmtl9JKAaUnc8k64uukigA== X-Received: by 10.194.94.132 with SMTP id dc4mr62446280wjb.231.1481202767637; Thu, 08 Dec 2016 05:12:47 -0800 (PST) Received: from cizrna.lan ([109.72.12.145]) by smtp.gmail.com with ESMTPSA id j1sm36976762wjm.26.2016.12.08.05.12.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 05:12:46 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Date: Thu, 8 Dec 2016 14:11:56 +0100 Message-Id: <1481202716-31317-1-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.7.4 Cc: Tomeu Vizoso , Tomi Sarvela , intel-gfx@lists.freedesktop.org, David Airlie , dri-devel@lists.freedesktop.org, Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/edid: Don't print an error if the checksum of a CEA block is wrong X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Tomi Sarvela Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/drm_edid.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 6798c3ad9d53..db79bc949216 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1128,16 +1128,19 @@ 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 */