From patchwork Wed Sep 12 17:48:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 1445911 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 48B253FE79 for ; Wed, 12 Sep 2012 17:56:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 489EF9E911 for ; Wed, 12 Sep 2012 10:56:56 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@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 EEB1F9ED03; Wed, 12 Sep 2012 10:48:23 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id r3so1190524wey.36 for ; Wed, 12 Sep 2012 10:48:23 -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=yJix057memZJ+Yf7GeF0w5XZAcj6YkuI0GKndNeOp30u2OT+odwevONml+r8fsdVpv yJPFK5yEXnJsI8+86Ja+a2lYC9RYlqEZiq08zg5HLHNSFrytd9pmT/I01tISzz+1IJb4 9adkD46t3wynzyUObN3az+9z1PqNgvYgYkslaXfNTC3lh8yNSfGz0/tnRFWDZ8iI2nt6 JW6awxaNLdptL4bILZSALbqOSVrcicJDpdx1G4q8sLE7gcc0A3TGkvKiwLK0JZpMvEVw L0WqyJm97XMBsFd0lSqO9OdbGJAF0RlBfXpd4j2hjUk6tt4vG9lXB6/Xwwk9Qbyl9u8q mC8g== Received: by 10.216.131.196 with SMTP id m46mr10633150wei.35.1347472103450; Wed, 12 Sep 2012 10:48:23 -0700 (PDT) Received: from localhost.localdomain ([83.217.123.106]) by mx.google.com with ESMTPS id hv8sm9403583wib.0.2012.09.12.10.48.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 10:48:22 -0700 (PDT) From: Damien Lespiau To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Wed, 12 Sep 2012 18:48:18 +0100 Message-Id: <1347472099-3704-1-git-send-email-damien.lespiau@gmail.com> X-Mailer: git-send-email 1.7.11.4 Subject: [Intel-gfx] [PATCH 1/2] lib: Dump information about the supported 3D stereo formats X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=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 --- 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); }