summaryrefslogtreecommitdiff
path: root/tests/testdisplay.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-09-30 17:42:33 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2013-09-30 18:04:22 +0100
commite836b60d3751475e768a339f29d231509ac1596c (patch)
tree11a3b56545e5cd538a677d5315c9f2a5d452836e /tests/testdisplay.c
parent8393bb41a1717691674809361908050974d71fbf (diff)
testdisplay: Make -o and -3 work together
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/testdisplay.c')
-rw-r--r--tests/testdisplay.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 3d1456e6..55c0d48c 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -539,10 +539,17 @@ static void do_set_stereo_mode(struct connector *c)
static void
set_stereo_mode(struct connector *c)
{
- int i;
+ int i, n;
- for (i = 0; i < c->connector->count_modes; i++) {
- c->mode = c->connector->modes[i];
+
+ if (specified_mode_num != -1)
+ n = 1;
+ else
+ n = c->connector->count_modes;
+
+ for (i = 0; i < n; i++) {
+ if (specified_mode_num == -1)
+ c->mode = c->connector->modes[i];
if (!c->mode_valid)
continue;
@@ -589,7 +596,8 @@ int update_display(void)
if (!connectors)
return 0;
- if (test_preferred_mode || test_all_modes || force_mode || specified_disp_id != -1) {
+ if (test_preferred_mode || test_all_modes ||
+ force_mode || specified_disp_id != -1) {
unsigned long crtc_idx_mask = -1UL;
/* Find any connected displays */