dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Wood <thomas.wood@intel.com>
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	[thread overview]
Message-ID: <1380281221-2116-3-git-send-email-thomas.wood@intel.com> (raw)
In-Reply-To: <1380281221-2116-1-git-send-email-thomas.wood@intel.com>

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 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";
 
-- 
1.8.3.1

  parent reply	other threads:[~2013-09-27 11:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 11:26 [PATCH edid-decode 1/3] Add a missing comma to the list of CEA VICs Thomas Wood
2013-09-27 11:27 ` [PATCH edid-decode 2/3] Include the last VIC in the CEA video block Thomas Wood
2013-09-27 11:27 ` Thomas Wood [this message]
2013-09-27 12:35 ` [PATCH edid-decode 1/3] Add a missing comma to the list of CEA VICs Damien Lespiau
2013-09-27 14:06 ` Damien Lespiau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380281221-2116-3-git-send-email-thomas.wood@intel.com \
    --to=thomas.wood@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox