From patchwork Wed Oct 16 16:36:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 3054741 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A9E2BF924 for ; Wed, 16 Oct 2013 16:41:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D15D20274 for ; Wed, 16 Oct 2013 16:41:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6A9EC201FF for ; Wed, 16 Oct 2013 16:41:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C8FD43F33 for ; Wed, 16 Oct 2013 09:41:41 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D39AE84F6 for ; Wed, 16 Oct 2013 09:36:50 -0700 (PDT) Received: by mail-wi0-f178.google.com with SMTP id hn9so1088707wib.17 for ; Wed, 16 Oct 2013 09:36:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=85BK2SqjhlgW1VGR5Xuyznfj77GoX1jaU13HtUDGi20=; b=kcmU2KB0w+AdjbH5Pw1EjQ+vYxbkzbM9Ar1aipLU6Cpyv3isNo4hMIc8KJ1alIgPP2 XcKjMWdjyBBEjjDmH7KEESX67Oy/dFLMLExFKMTQE9iluqBHkFCLElo8QWDERz5Dk1jz Y0fEJQVhzCcaVG8y28gKwbUGMUuyqxYKl2K/a5OQBNZG+Pcvg8zT1JsvQCx3wal4lu0M oShNA8hJAwSlxzCnSlIjZq0bJrwT6WX5HNEIwiOmo5JS1i8eWpdbg2M3yJ1LDSZ5DTev FCNEl7mnWjvT9gnUPd6/FydaihwE7xE6wPZobIEf5Rlr0b3pnbixh1+Oi4LMdHi+BxyP khZg== X-Gm-Message-State: ALoCoQm8joLN0ApWRMngqMamJ7vQL4WFDhpEISxieHzmaCgWv1opW8s9s31Zv5MHeGTRP9b7zIFj X-Received: by 10.194.175.133 with SMTP id ca5mr3202624wjc.19.1381941410210; Wed, 16 Oct 2013 09:36:50 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id mw9sm7818595wib.0.2013.10.16.09.36.49 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Wed, 16 Oct 2013 09:36:49 -0700 (PDT) From: Thomas Wood To: dri-devel@lists.freedesktop.org Subject: [PATCH edid-decode] Parse the list of additional 3D modes Date: Wed, 16 Oct 2013 17:36:48 +0100 Message-Id: <1381941408-16423-1-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.8.3.1 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 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Parse 2D_VIC_order_X and 3D_Structure_X from the list at the end of the HDMI Vendor Specific Block. Signed-off-by: Thomas Wood --- edid-decode.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/edid-decode.c b/edid-decode.c index 4265843..8441dec 100644 --- a/edid-decode.c +++ b/edid-decode.c @@ -851,6 +851,7 @@ cea_hdmi_block(unsigned char *x) if (x[10 + b] & 0x01) printf(" 3D: Frame-packing\n"); b += 2; + len_3d -= 2; } if (mask) { int i; @@ -864,14 +865,35 @@ cea_hdmi_block(unsigned char *x) printf(" %d", i + 8); printf("\n"); b += 2; + len_3d -= 2; } /* - * XXX list of nibbles: + * list of nibbles: * 2D_VIC_Order_X * 3D_Structure_X * (optionally: 3D_Detail_X and reserved) */ + if (len_3d > 0) { + int end = b + len_3d; + + while (b < end) { + printf(" VIC index %d supports ", x[9 + b] >> 4); + switch (x[9 + b] & 0x0f) { + case 0: printf("frame packing"); break; + case 6: printf("top-and-bottom"); break; + case 8: printf("side-by-side (half)"); break; + default: printf("unknown"); + } + if ((x[9 + b] & 0x0f) > 7) { + /* XXX Optional 3D_Detail_X and reserved */ + b++; + } + printf("\n"); + b++; + } + } + } }