From patchwork Thu Nov 20 02:25:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Br=C3=BCns?= X-Patchwork-Id: 5345531 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E2BA8C11AC for ; Thu, 20 Nov 2014 02:26:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B29B20154 for ; Thu, 20 Nov 2014 02:26:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BA6B120131 for ; Thu, 20 Nov 2014 02:26:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FFBD6F4C7; Wed, 19 Nov 2014 18:26:12 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx-out-1.rwth-aachen.de (mx-out-1.rwth-aachen.de [134.130.5.186]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D2646F4C7 for ; Wed, 19 Nov 2014 18:26:11 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.07,421,1413237600"; d="scan'208";a="360190893" Received: from hub1.rwth-ad.de (HELO mail.rwth-aachen.de) ([134.130.26.142]) by mx-1.rz.rwth-aachen.de with ESMTP; 20 Nov 2014 03:26:10 +0100 Received: from pebbles.de (134.61.101.25) by mail.rwth-aachen.de (134.130.26.142) with Microsoft SMTP Server (TLS) id 14.3.210.2; Thu, 20 Nov 2014 03:26:06 +0100 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: Subject: [PATCH] drm/edid: shorten log output in case of all zeroes edid block Date: Thu, 20 Nov 2014 03:25:36 +0100 X-Mailer: git-send-email 2.1.2 In-Reply-To: <1416103472-16923-1-git-send-email-stefan.bruens@rwth-aachen.de> References: <1416103472-16923-1-git-send-email-stefan.bruens@rwth-aachen.de> MIME-Version: 1.0 X-PMWin-Version: 3.1.3.0, Antivirus-Engine: 3.53.0, Antivirus-Data: 5.08 Message-ID: <33ad9757-ed50-486a-9fe1-8add160286e9@HUB1.rwth-ad.de> Cc: stefan.bruens@rwth-aachen.de X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need to dump the whole EDID block in case it contains no information. Just print a single line stating the block is empty instead of 8 lines containing only zeroes. Signed-off-by: Stefan BrĂ¼ns Reviewed-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 3bf9991..ec4f91f 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1080,9 +1080,13 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid) bad: if (print_bad_edid) { - printk(KERN_ERR "Raw EDID:\n"); - print_hex_dump(KERN_ERR, " \t", DUMP_PREFIX_NONE, 16, 1, + if (drm_edid_is_zero(raw_edid, EDID_LENGTH)) { + printk(KERN_ERR "EDID block is all zeroes\n"); + } else { + printk(KERN_ERR "Raw EDID:\n"); + print_hex_dump(KERN_ERR, " \t", DUMP_PREFIX_NONE, 16, 1, raw_edid, EDID_LENGTH, false); + } } return false; }