From: Damien Lespiau 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> References: <1375883903-702-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1375883903-702-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: ajax@redhat.com Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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"); -- 1.8.3.1