From patchwork Thu Sep 27 18:42:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 1515541 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id CC362E00FF for ; Thu, 27 Sep 2012 18:49:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C6EA3A0244 for ; Thu, 27 Sep 2012 11:49:46 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E6AC9F0D5; Thu, 27 Sep 2012 11:42:13 -0700 (PDT) Received: by weyu50 with SMTP id u50so842294wey.36 for ; Thu, 27 Sep 2012 11:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=mSwYuAMeVkkegkHtH275LFRU3feL4WWHPVGLzV8egxY=; b=FQoAT1y5YmNAiXMhEB/z3zyo75mU6OXU+UB+fUOgq88EGzI6LiGZTO9/O6LGIasHvV XK1h1QAw+X8p1B9Rtk5tfIS+ImLQ+OY/b4uD9g/4bE++UoEQVHSfDak6NeZqJbFCraF+ M8zsOoWAIxIkd4szxMFr/f0ZckvRnZKmXVwO2gwJHOG5ufVtghf3BReIssNJFR70XaBK SRG7JZM2HumhweFLeTAWCNKIc9kOZ5okPGZuuxENtHsJSQz4Jj5QWWNiRmsJWZPhQeGW u3RO/8IZPiOm4dN4hqDS9e6LoKyIXDm0xIDlzFuqCW+k/ZhD4cfl+qqPY8kRoj0sLPgy fpRQ== Received: by 10.216.243.1 with SMTP id j1mr1808897wer.29.1348771332809; Thu, 27 Sep 2012 11:42:12 -0700 (PDT) Received: from localhost.localdomain ([83.217.123.106]) by mx.google.com with ESMTPS id cn6sm5435409wib.9.2012.09.27.11.42.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 11:42:11 -0700 (PDT) From: Damien Lespiau 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 Message-Id: <1348771328-3655-1-git-send-email-damien.lespiau@gmail.com> X-Mailer: git-send-email 1.7.11.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Damien Lespiau When dumping the details of a mode, let's add the 3D formats the mode supports. Signed-off-by: Damien Lespiau Reviewed-by: Rodrigo Vivi Tested-by: Rodrigo Vivi --- 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); }