* [PATCH] Fix a bug of testing preferred mode
@ 2011-04-26 3:03 Hai Lan
2011-04-26 6:48 ` Chris Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Hai Lan @ 2011-04-26 3:03 UTC (permalink / raw)
To: jbarnes; +Cc: intel-gfx
---
tests/testdisplay.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 5bf5183..48684e1 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;
}
--
1.7.0.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix a bug of testing preferred mode
2011-04-26 3:03 [PATCH] Fix a bug of testing preferred mode Hai Lan
@ 2011-04-26 6:48 ` Chris Wilson
0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2011-04-26 6:48 UTC (permalink / raw)
To: Hai Lan, jbarnes; +Cc: intel-gfx
Good catch!
Thanks,
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-26 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 3:03 [PATCH] Fix a bug of testing preferred mode Hai Lan
2011-04-26 6:48 ` Chris Wilson
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.