From patchwork Wed Aug 7 13:58:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 2840317 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B58A9F479 for ; Wed, 7 Aug 2013 14:15:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B0D12010E for ; Wed, 7 Aug 2013 14:15:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 24FD120108 for ; Wed, 7 Aug 2013 14:15:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F0CFDE7168 for ; Wed, 7 Aug 2013 07:15:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 729F8E6377; Wed, 7 Aug 2013 06:59:01 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 07 Aug 2013 06:59:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,833,1367996400"; d="scan'208";a="382678373" Received: from unknown (HELO strange.amr.corp.intel.com) ([10.255.14.166]) by fmsmga002.fm.intel.com with ESMTP; 07 Aug 2013 06:58:33 -0700 From: Damien Lespiau To: ajax@redhat.com Subject: [edid-decode 7/7] Decode the Video Capability Data Block Date: Wed, 7 Aug 2013 14:58:23 +0100 Message-Id: <1375883903-702-8-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1375883903-702-1-git-send-email-damien.lespiau@intel.com> References: <1375883903-702-1-git-send-email-damien.lespiau@intel.com> Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org 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.2 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 Signed-off-by: Damien Lespiau --- edid-decode.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/edid-decode.c b/edid-decode.c index 7aed3c6..58297c9 100644 --- a/edid-decode.c +++ b/edid-decode.c @@ -861,6 +861,44 @@ cea_hdmi_block(unsigned char *x) } } +DEFINE_FIELD("YCbCr quantization", YCbCr_quantization, 7, 7, + { 0, "No Data" }, + { 1, "Selectable (via AVI YQ)" }); +DEFINE_FIELD("RGB quantization", RGB_quantization, 6, 6, + { 0, "No Data" }, + { 1, "Selectable (via AVI Q)" }); +DEFINE_FIELD("PT scan behaviour", PT_scan, 4, 5, + { 0, "No Data" }, + { 1, "Always Overscannned" }, + { 2, "Always Underscanned" }, + { 3, "Support both over- and underscan" }); +DEFINE_FIELD("IT scan behaviour", IT_scan, 2, 3, + { 0, "IT video formats not supported" }, + { 1, "Always Overscannned" }, + { 2, "Always Underscanned" }, + { 3, "Support both over- and underscan" }); +DEFINE_FIELD("CE scan behaviour", CE_scan, 0, 1, + { 0, "CE video formats not supported" }, + { 1, "Always Overscannned" }, + { 2, "Always Underscanned" }, + { 3, "Support both over- and underscan" }); + +static struct field *vcdb_fields[] = { + &YCbCr_quantization, + &RGB_quantization, + &PT_scan, + &IT_scan, + &CE_scan, +}; + +static void +cea_vcdb(unsigned char *x) +{ + unsigned char d = x[2]; + + decode(vcdb_fields, d, " "); +} + static void cea_block(unsigned char *x) { @@ -895,6 +933,7 @@ cea_block(unsigned char *x) switch (x[1]) { case 0x00: printf("video capability data block\n"); + cea_vcdb(x); break; case 0x01: printf("vendor-specific video data block\n");