From patchwork Wed Feb 8 13:19:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tahvanainen, Jari" X-Patchwork-Id: 9562507 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 8AE38601E5 for ; Wed, 8 Feb 2017 13:19:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D7322522B for ; Wed, 8 Feb 2017 13:19:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 725742842E; Wed, 8 Feb 2017 13:19:28 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 DE2FE2522B for ; Wed, 8 Feb 2017 13:19:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6AEBE6E88F; Wed, 8 Feb 2017 13:19:27 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 138DF6E88F; Wed, 8 Feb 2017 13:19:27 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 08 Feb 2017 05:19:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="818469233" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by FMSMGA003.fm.intel.com with ESMTP; 08 Feb 2017 05:19:24 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.38]) by IRSMSX152.ger.corp.intel.com ([169.254.6.191]) with mapi id 14.03.0248.002; Wed, 8 Feb 2017 13:19:23 +0000 From: "Tahvanainen, Jari" To: "tomeu.vizoso@collabora.com" , "linux-kernel@vger.kernel.org" Thread-Topic: drm/edid: Don't print an error if the checksum of a CEA block is wrong Thread-Index: AdKCDfYPvtgw1Xf8TtyYKg9JUAcQTw== Date: Wed, 8 Feb 2017 13:19:23 +0000 Message-ID: References: <1481202716-31317-1-git-send-email-tomeu.vizoso@collabora.com> In-Reply-To: <1481202716-31317-1-git-send-email-tomeu.vizoso@collabora.com> Accept-Language: fi-FI, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] MIME-Version: 1.0 Cc: "Sarvela, Tomi P" , David Airlie , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "Vetter, Daniel" Subject: Re: [Intel-gfx] 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP I applied this change on the couple-days old drm-tip, and was not able to get any "EDID checksum is invalid" messages with it on my SKL. Without this patch I could generate the ERROR quite easily by switching the outputs and displays manually. I don't know if this hides something that it should not but it seem to work for the problem related the noise on Patchwork CI execution caused by these EDID checksum is invalid messages. Tested-by: Jari Tahvanainen -----Original Message----- From: Tomeu Vizoso [mailto:tomeu.vizoso@collabora.com] Sent: Thursday, December 8, 2016 3:12 PM To: linux-kernel@vger.kernel.org Cc: Tomeu Vizoso ; Tomi Sarvela ; intel-gfx@lists.freedesktop.org; David Airlie ; dri-devel@lists.freedesktop.org; Daniel Vetter Subject: 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 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 */