From patchwork Fri Sep 27 11:27:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 2954131 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 1A2BFBFF0B for ; Fri, 27 Sep 2013 11:29:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 156CE20221 for ; Fri, 27 Sep 2013 11:29:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0B6E820160 for ; Fri, 27 Sep 2013 11:29:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 033FBE7DC9 for ; Fri, 27 Sep 2013 04:29:24 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by gabe.freedesktop.org (Postfix) with ESMTP id BE07AE5FA8 for ; Fri, 27 Sep 2013 04:27:05 -0700 (PDT) Received: by mail-wi0-f170.google.com with SMTP id cb5so700039wib.3 for ; Fri, 27 Sep 2013 04:27:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=nWZIuunxrLSbd5Hmws4Ng50vUmBePukqrtYe/aiB+Ss=; b=M93f4gQwvaVSeFxOzfXG2k+hPzmHwz3XIpfqKbW33LcmRTZGMIUNWoiz6WpiIhDMNc 6qsEqcSQ9/uZacHgSOIwxdBkEdHLQR1qAVpsn6SvcTEmJB4WhmEmNv6fZVmrG4xt3Tag 5oeFW7PWWVvjsWsS8r0AfGmeWHLgvN/fmAndowWgszBu/1Wmdhsep3Mv6mH2Rr1N2pbA 3MTuT7WKyWvK/m4+ErRgslDpGlIuXvz//MLKHKPTxU97Zw8pq/Ty37dDytjDW5me3v5P zlEQk9iuoRoyNYwi/+eRoo6n3073VxoOeHHcXovdUY0Xu1AkwayEEsALa9fKen0MPQ8N 5c7Q== X-Gm-Message-State: ALoCoQmB48gPyo9Nbag6LZRMGcL7Fh7bts8tT/X6JB1WArXzbX8wAUsxnzfFJrnJc/V9F9JQtseH X-Received: by 10.194.123.227 with SMTP id md3mr5264564wjb.17.1380281224771; Fri, 27 Sep 2013 04:27:04 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id gp9sm37633435wib.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 27 Sep 2013 04:27:04 -0700 (PDT) From: Thomas Wood To: dri-devel@lists.freedesktop.org Subject: [PATCH edid-decode 3/3] Print the correct VIC number next to the mode Date: Fri, 27 Sep 2013 12:27:01 +0100 Message-Id: <1380281221-2116-3-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1380281221-2116-1-git-send-email-thomas.wood@intel.com> References: <1380281221-2116-1-git-send-email-thomas.wood@intel.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Signed-off-by: Thomas Wood --- edid-decode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/edid-decode.c b/edid-decode.c index b710bb5..4265843 100644 --- a/edid-decode.c +++ b/edid-decode.c @@ -715,10 +715,11 @@ cea_video_block(unsigned char *x) unsigned char vic = x[i] & 0x7f; unsigned char native = x[i] & 0x80; const char *mode; + int index; - vic--; - if (vic < ARRAY_SIZE(edid_cea_modes)) - mode = edid_cea_modes[vic]; + index = vic - 1; + if (index < ARRAY_SIZE(edid_cea_modes)) + mode = edid_cea_modes[index]; else mode = "Unknown mode";