* [PATCH igt] intel_infoframes: Add support for decoding HDMI VICs
@ 2013-08-13 23:19 Damien Lespiau
2013-08-14 9:54 ` Simon Farnsworth
0 siblings, 1 reply; 3+ messages in thread
From: Damien Lespiau @ 2013-08-13 23:19 UTC (permalink / raw)
To: intel-gfx
The HDMI vendor infoframe can contain a HDMI VIC (as of HDMI 1.4, only
used for 4k formats).
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
tools/intel_infoframes.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
index 09fdcb9..b6d289f 100644
--- a/tools/intel_infoframes.c
+++ b/tools/intel_infoframes.c
@@ -184,8 +184,13 @@ typedef union {
uint8_t Rsvd0 :5;
uint8_t video_format :3;
- uint8_t Rsvd1 :4;
- uint8_t s3d_structure :4;
+ union {
+ uint8_t vic;
+ struct {
+ uint8_t Rsvd1 :4;
+ uint8_t s3d_structure :4;
+ } s3d;
+ } pb5;
uint8_t Rsvd2 :4;
uint8_t s3d_ext_data :4;
@@ -467,13 +472,26 @@ static const char *s3d_structure_to_string(int format)
static void dump_vendor_hdmi(DipInfoFrame *frame)
{
+ int vic_present = frame->vendor.video_format & 0x1;
int s3d_present = frame->vendor.video_format & 0x2;
printf("- video format: 0x%03x %s\n", frame->vendor.video_format,
s3d_present ? "(3D)" : "");
- if (s3d_present)
+
+ if (vic_present && s3d_present) {
+ printf("Error: HDMI VIC and S3D bits set. Only one of those "
+ " at a time is valid\n");
+ return;
+ }
+
+ if (vic_present)
+ printf("- HDMI VIC: %d\n", frame->vendor.pb5.vic);
+ else if (s3d_present) {
+ int s3d_structure = frame->vendor.pb5.s3d.s3d_structure;
+
printf("- 3D Format: %s\n",
- s3d_structure_to_string(frame->vendor.s3d_structure));
+ s3d_structure_to_string(s3d_structure));
+ }
}
static void dump_vendor_info(Transcoder transcoder)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH igt] intel_infoframes: Add support for decoding HDMI VICs
2013-08-13 23:19 [PATCH igt] intel_infoframes: Add support for decoding HDMI VICs Damien Lespiau
@ 2013-08-14 9:54 ` Simon Farnsworth
2013-08-15 15:49 ` Damien Lespiau
0 siblings, 1 reply; 3+ messages in thread
From: Simon Farnsworth @ 2013-08-14 9:54 UTC (permalink / raw)
To: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1960 bytes --]
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
On Wednesday 14 August 2013 00:19:14 Damien Lespiau wrote:
> The HDMI vendor infoframe can contain a HDMI VIC (as of HDMI 1.4, only
> used for 4k formats).
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> tools/intel_infoframes.c | 26 ++++++++++++++++++++++----
> 1 file changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
> index 09fdcb9..b6d289f 100644
> --- a/tools/intel_infoframes.c
> +++ b/tools/intel_infoframes.c
> @@ -184,8 +184,13 @@ typedef union {
> uint8_t Rsvd0 :5;
> uint8_t video_format :3;
>
> - uint8_t Rsvd1 :4;
> - uint8_t s3d_structure :4;
> + union {
> + uint8_t vic;
> + struct {
> + uint8_t Rsvd1 :4;
> + uint8_t s3d_structure :4;
> + } s3d;
> + } pb5;
>
> uint8_t Rsvd2 :4;
> uint8_t s3d_ext_data :4;
> @@ -467,13 +472,26 @@ static const char *s3d_structure_to_string(int format)
>
> static void dump_vendor_hdmi(DipInfoFrame *frame)
> {
> + int vic_present = frame->vendor.video_format & 0x1;
> int s3d_present = frame->vendor.video_format & 0x2;
>
> printf("- video format: 0x%03x %s\n", frame->vendor.video_format,
> s3d_present ? "(3D)" : "");
> - if (s3d_present)
> +
> + if (vic_present && s3d_present) {
> + printf("Error: HDMI VIC and S3D bits set. Only one of those "
> + " at a time is valid\n");
> + return;
> + }
> +
> + if (vic_present)
> + printf("- HDMI VIC: %d\n", frame->vendor.pb5.vic);
> + else if (s3d_present) {
> + int s3d_structure = frame->vendor.pb5.s3d.s3d_structure;
> +
> printf("- 3D Format: %s\n",
> - s3d_structure_to_string(frame->vendor.s3d_structure));
> + s3d_structure_to_string(s3d_structure));
> + }
> }
>
> static void dump_vendor_info(Transcoder transcoder)
>
--
Simon Farnsworth
Software Engineer
ONELAN Ltd
http://www.onelan.com
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH igt] intel_infoframes: Add support for decoding HDMI VICs
2013-08-14 9:54 ` Simon Farnsworth
@ 2013-08-15 15:49 ` Damien Lespiau
0 siblings, 0 replies; 3+ messages in thread
From: Damien Lespiau @ 2013-08-15 15:49 UTC (permalink / raw)
To: Simon Farnsworth; +Cc: intel-gfx
On Wed, Aug 14, 2013 at 10:54:17AM +0100, Simon Farnsworth wrote:
> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Thanks for the review, pushed this along with a patch to decode
3D_Ext_Data when Side-by-side (half) is programmed in 3D_structure
--
Damien
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-15 15:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 23:19 [PATCH igt] intel_infoframes: Add support for decoding HDMI VICs Damien Lespiau
2013-08-14 9:54 ` Simon Farnsworth
2013-08-15 15:49 ` Damien Lespiau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox