All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH 3/4] testdisplay: use first available option values
Date: Wed,  5 Jun 2019 10:44:49 -0700	[thread overview]
Message-ID: <20190605174450.7235-3-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20190605174450.7235-1-lucas.demarchi@intel.com>

Now that core options are set to 500 and above, start from the lowest
values without causing problems with conflicts. This also rename the
constants to follow the names from the core.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
---
 tests/testdisplay.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index b4f0d45f..32590547 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -69,8 +69,10 @@
 #include <stdlib.h>
 #include <signal.h>
 
-#define Yb_OPT		 5
-#define Yf_OPT		 6
+enum {
+	OPT_YB,
+	OPT_YF,
+};
 
 static int tio_fd;
 struct termios saved_tio;
@@ -573,8 +575,8 @@ static void set_termio_mode(void)
 
 static char optstr[] = "3iaf:s:d:p:mrto:j:y";
 static struct option long_opts[] = {
-	{"yb", 0, 0, Yb_OPT},
-	{"yf", 0, 0, Yf_OPT},
+	{"yb", 0, 0, OPT_YB},
+	{"yf", 0, 0, OPT_YF},
 	{ 0, 0, 0, 0 }
 };
 
@@ -648,10 +650,10 @@ static int opt_handler(int opt, int opt_index, void *data)
 		tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
 		break;
 	case 'y':
-	case Yb_OPT:
+	case OPT_YB:
 		tiling = LOCAL_I915_FORMAT_MOD_Y_TILED;
 		break;
-	case Yf_OPT:
+	case OPT_YF:
 		tiling = LOCAL_I915_FORMAT_MOD_Yf_TILED;
 		break;
 	case 'r':
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-06-05 17:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 17:44 [igt-dev] [PATCH 1/4] lib/igt_core: reserve long options for individual tests Lucas De Marchi
2019-06-05 17:44 ` [igt-dev] [PATCH 2/4] lib/igt_core: 0 is a valid val for long options Lucas De Marchi
2019-06-05 17:44 ` Lucas De Marchi [this message]
2019-06-05 17:44 ` [igt-dev] [PATCH 4/4] lib/igt_core: add -h to usage Lucas De Marchi
2019-06-05 18:24 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/4] lib/igt_core: reserve long options for individual tests Patchwork
2019-06-06  9:20 ` [igt-dev] [PATCH 1/4] " Petri Latvala
2019-06-06 16:50   ` Lucas De Marchi
2019-06-07 11:53 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [1/4] " Patchwork

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=20190605174450.7235-3-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    /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.