diff options
author | Hai Lan <hai.lan@intel.com> | 2011-04-26 11:03:39 +0800 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-26 07:47:12 +0100 |
commit | 9bfda1a809b6606e06bb96158cc103e12428e9c2 (patch) | |
tree | e71262a1dc4cc8ed8937a82bf4181859603a2928 /tests/testdisplay.c | |
parent | c56cd106f969d223b17e7d9a6113e63d6befd9bc (diff) |
Fix a bug of testing preferred mode
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/testdisplay.c')
-rw-r--r-- | tests/testdisplay.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 5bf5183c..48684e19 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -157,7 +157,7 @@ struct connector { static void dump_mode(drmModeModeInfo *mode) { - printf(" %s %d %d %d %d %d %d %d %d %d\n", + printf(" %s %d %d %d %d %d %d %d %d %d 0x%x 0x%x\n", mode->name, mode->vrefresh, mode->hdisplay, @@ -167,7 +167,9 @@ static void dump_mode(drmModeModeInfo *mode) mode->vdisplay, mode->vsync_start, mode->vsync_end, - mode->vtotal); + mode->vtotal, + mode->flags, + mode->type); } static void dump_connectors(void) @@ -199,7 +201,7 @@ static void dump_connectors(void) printf(" modes:\n"); printf(" name refresh (Hz) hdisp hss hse htot vdisp " - "vss vse vtot)\n"); + "vss vse vtot flags type\n"); for (j = 0; j < connector->count_modes; j++) dump_mode(&connector->modes[j]); @@ -271,7 +273,7 @@ static void connector_find_preferred_mode(struct connector *c) for (j = 0; j < connector->count_modes; j++) { c->mode = connector->modes[j]; - if (c->mode.flags & DRM_MODE_TYPE_PREFERRED) { + if (c->mode.type & DRM_MODE_TYPE_PREFERRED) { c->mode_valid = 1; break; } |