All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hai Lan <hai.lan@intel.com>
To: jbarnes@virtuousgeek.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH] Fix a bug of testing preferred mode
Date: Tue, 26 Apr 2011 11:03:39 +0800	[thread overview]
Message-ID: <1303787019-6456-1-git-send-email-hai.lan@intel.com> (raw)

---
 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

             reply	other threads:[~2011-04-26  3:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26  3:03 Hai Lan [this message]
2011-04-26  6:48 ` [PATCH] Fix a bug of testing preferred mode Chris Wilson

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=1303787019-6456-1-git-send-email-hai.lan@intel.com \
    --to=hai.lan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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.