All of lore.kernel.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 3/4] tools/intel_display_poller: Make pipe name alphabetic
Date: Wed,  9 Sep 2015 22:58:05 +0300	[thread overview]
Message-ID: <1441828686-22201-3-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1441828686-22201-1-git-send-email-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Instead of raw numbers the user can now specify the pipe
as 'a',b'... or 'A','B'...

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tools/intel_display_poller.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c
index 8b66b53..99fd592 100644
--- a/tools/intel_display_poller.c
+++ b/tools/intel_display_poller.c
@@ -1010,7 +1010,17 @@ int main(int argc, char *argv[])
 				usage(argv[0]);
 			break;
 		case 'p':
-			pipe = atoi(optarg);
+			if (optarg[1] != '\0')
+				usage(argv[0]);
+			pipe = optarg[0];
+			if (pipe >= 'a')
+				pipe -= 'a';
+			else if (pipe >= 'A')
+				pipe -= 'A';
+			else if (pipe >= '0')
+				pipe -= '0';
+			else
+				usage(argv[0]);
 			if (pipe < 0 || pipe > 2)
 				usage(argv[0]);
 			break;
-- 
2.4.6

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-09-09 19:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 19:58 [PATCH i-g-t 1/4] tools/intel_display_poller: Add CHV support ville.syrjala
2015-09-09 19:58 ` [PATCH i-g-t 2/4] tools/intel_display_poller: Try to fix pipe<->plane handling on gen2/3 ville.syrjala
2015-09-09 19:58 ` ville.syrjala [this message]
2015-09-09 19:58 ` [PATCH i-g-t 4/4] tools/intel_display_poller: Align DSPSURF to 128k to appease gen4/vlv/chv ville.syrjala

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=1441828686-22201-3-git-send-email-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.