All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@gmail.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 1/2] lib: Dump information about the supported 3D stereo formats
Date: Thu, 27 Sep 2012 19:42:07 +0100	[thread overview]
Message-ID: <1348771328-3655-1-git-send-email-damien.lespiau@gmail.com> (raw)

From: Damien Lespiau <damien.lespiau@intel.com>

When dumping the details of a mode, let's add the 3D formats the mode
supports.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/drmtest.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 8df9797..4d5a67c 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -812,7 +812,15 @@ unsigned int kmstest_create_fb(int fd, int width, int height, int bpp,
 
 void kmstest_dump_mode(drmModeModeInfo *mode)
 {
-	printf("  %s %d %d %d %d %d %d %d %d %d 0x%x 0x%x %d\n",
+	bool stereo_3d = mode->flags & DRM_MODE_FLAG_3D_MASK;
+	char flags_str[32];
+
+	snprintf(flags_str, sizeof(flags_str), " (3D:%s%s%s)",
+		 mode->flags & DRM_MODE_FLAG_3D_TOP_BOTTOM ? " TB": "",
+		 mode->flags & DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF ? " SBSH": "",
+		 mode->flags & DRM_MODE_FLAG_3D_FRAME_PACKING ? " FP": "");
+
+	printf("  %s %d %d %d %d %d %d %d %d %d 0x%x 0x%x %d%s\n",
 	       mode->name,
 	       mode->vrefresh,
 	       mode->hdisplay,
@@ -825,7 +833,8 @@ void kmstest_dump_mode(drmModeModeInfo *mode)
 	       mode->vtotal,
 	       mode->flags,
 	       mode->type,
-	       mode->clock);
+	       mode->clock,
+	       stereo_3d ? flags_str : "");
 	fflush(stdout);
 }
 
-- 
1.7.11.4

             reply	other threads:[~2012-09-27 18:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 18:42 Damien Lespiau [this message]
2012-09-27 18:42 ` [PATCH 2/2] tests/testdisplay: Test the stereo 3D modes Damien Lespiau
2012-09-29  0:43   ` Rodrigo Vivi
2012-09-29  0:45 ` [PATCH 1/2] lib: Dump information about the supported 3D stereo formats Rodrigo Vivi
  -- strict thread matches above, loose matches on Subject: below --
2012-09-12 17:48 Damien Lespiau

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=1348771328-3655-1-git-send-email-damien.lespiau@gmail.com \
    --to=damien.lespiau@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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.