* [PATCH] intel_infoframes: Dump HDMI vendor infoframes
@ 2012-09-26 17:17 Damien Lespiau
2012-09-26 23:01 ` Rodrigo Vivi
0 siblings, 1 reply; 3+ messages in thread
From: Damien Lespiau @ 2012-09-26 17:17 UTC (permalink / raw)
To: intel-gfx
From: Damien Lespiau <damien.lespiau@intel.com>
Those infoframes are programmed when using stereo 3D modes.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
tools/intel_infoframes.c | 63 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 62 insertions(+), 1 deletions(-)
diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
index d74df64..66351ac 100644
--- a/tools/intel_infoframes.c
+++ b/tools/intel_infoframes.c
@@ -125,6 +125,8 @@ typedef enum {
#define SPD_INFOFRAME_VERSION 0x01
#define SPD_INFOFRAME_LENGTH 0x19
+#define VENDOR_ID_HDMI 0x000c03
+
typedef struct {
uint8_t type;
uint8_t version;
@@ -175,6 +177,21 @@ typedef union {
} __attribute__((packed)) spd;
struct {
DipInfoFrameHeader header;
+ uint8_t checksum;
+
+ uint8_t id[3];
+
+ uint8_t Rsvd0 :5;
+ uint8_t video_format :3;
+
+ uint8_t Rsvd1 :4;
+ uint8_t s3d_structure :4;
+
+ uint8_t Rsvd2 :4;
+ uint8_t s3d_ext_data :4;
+ } __attribute__((packed)) vendor;
+ struct {
+ DipInfoFrameHeader header;
uint8_t body[27];
} generic;
uint8_t data8[128];
@@ -424,10 +441,45 @@ static void dump_avi_info(Transcoder transcoder)
printf("Invalid InfoFrame checksum!\n");
}
+static const char *vendor_id_to_string(uint32_t id)
+{
+ switch (id) {
+ case VENDOR_ID_HDMI:
+ return "HDMI";
+ default:
+ return "Unknown";
+ }
+}
+
+static const char *s3d_structure_to_string(int format)
+{
+ switch (format) {
+ case 0:
+ return "Frame Packing";
+ case 6:
+ return "Top Bottom";
+ case 8:
+ return "Side By Side (half)";
+ default:
+ return "Reserved";
+ }
+}
+
+static void dump_vendor_hdmi(DipInfoFrame *frame)
+{
+ 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)
+ printf("- 3D Format: %s\n",
+ s3d_structure_to_string(frame->vendor.s3d_structure));
+}
+
static void dump_vendor_info(Transcoder transcoder)
{
Register reg = get_dip_ctl_reg(transcoder);
- uint32_t val;
+ uint32_t val, vendor_id;
DipFrequency freq;
DipInfoFrame frame;
@@ -446,6 +498,15 @@ static void dump_vendor_info(Transcoder transcoder)
dump_raw_infoframe(&frame);
+ vendor_id = frame.vendor.id[2] << 16 | frame.vendor.id[1] << 8 |
+ frame.vendor.id[0];
+
+ printf("- vendor Id: 0x%06x (%s)\n", vendor_id,
+ vendor_id_to_string(vendor_id));
+
+ if (vendor_id == VENDOR_ID_HDMI)
+ dump_vendor_hdmi(&frame);
+
if (!infoframe_valid_checksum(&frame))
printf("Invalid InfoFrame checksum!\n");
}
--
1.7.7.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] intel_infoframes: Dump HDMI vendor infoframes
2012-09-26 17:17 [PATCH] intel_infoframes: Dump HDMI vendor infoframes Damien Lespiau
@ 2012-09-26 23:01 ` Rodrigo Vivi
2012-09-27 6:44 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Rodrigo Vivi @ 2012-09-26 23:01 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
On Wed, Sep 26, 2012 at 2:17 PM, Damien Lespiau
<damien.lespiau@gmail.com> wrote:
> From: Damien Lespiau <damien.lespiau@intel.com>
>
> Those infoframes are programmed when using stereo 3D modes.
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> tools/intel_infoframes.c | 63 +++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 62 insertions(+), 1 deletions(-)
>
> diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
> index d74df64..66351ac 100644
> --- a/tools/intel_infoframes.c
> +++ b/tools/intel_infoframes.c
> @@ -125,6 +125,8 @@ typedef enum {
> #define SPD_INFOFRAME_VERSION 0x01
> #define SPD_INFOFRAME_LENGTH 0x19
>
> +#define VENDOR_ID_HDMI 0x000c03
> +
> typedef struct {
> uint8_t type;
> uint8_t version;
> @@ -175,6 +177,21 @@ typedef union {
> } __attribute__((packed)) spd;
> struct {
> DipInfoFrameHeader header;
> + uint8_t checksum;
> +
> + uint8_t id[3];
> +
> + uint8_t Rsvd0 :5;
> + uint8_t video_format :3;
> +
> + uint8_t Rsvd1 :4;
> + uint8_t s3d_structure :4;
> +
> + uint8_t Rsvd2 :4;
> + uint8_t s3d_ext_data :4;
> + } __attribute__((packed)) vendor;
> + struct {
> + DipInfoFrameHeader header;
> uint8_t body[27];
> } generic;
> uint8_t data8[128];
> @@ -424,10 +441,45 @@ static void dump_avi_info(Transcoder transcoder)
> printf("Invalid InfoFrame checksum!\n");
> }
>
> +static const char *vendor_id_to_string(uint32_t id)
> +{
> + switch (id) {
> + case VENDOR_ID_HDMI:
> + return "HDMI";
> + default:
> + return "Unknown";
> + }
> +}
> +
> +static const char *s3d_structure_to_string(int format)
> +{
> + switch (format) {
> + case 0:
> + return "Frame Packing";
> + case 6:
> + return "Top Bottom";
> + case 8:
> + return "Side By Side (half)";
> + default:
> + return "Reserved";
> + }
> +}
> +
> +static void dump_vendor_hdmi(DipInfoFrame *frame)
> +{
> + 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)
> + printf("- 3D Format: %s\n",
> + s3d_structure_to_string(frame->vendor.s3d_structure));
> +}
> +
> static void dump_vendor_info(Transcoder transcoder)
> {
> Register reg = get_dip_ctl_reg(transcoder);
> - uint32_t val;
> + uint32_t val, vendor_id;
> DipFrequency freq;
> DipInfoFrame frame;
>
> @@ -446,6 +498,15 @@ static void dump_vendor_info(Transcoder transcoder)
>
> dump_raw_infoframe(&frame);
>
> + vendor_id = frame.vendor.id[2] << 16 | frame.vendor.id[1] << 8 |
> + frame.vendor.id[0];
> +
> + printf("- vendor Id: 0x%06x (%s)\n", vendor_id,
> + vendor_id_to_string(vendor_id));
> +
> + if (vendor_id == VENDOR_ID_HDMI)
> + dump_vendor_hdmi(&frame);
> +
> if (!infoframe_valid_checksum(&frame))
> printf("Invalid InfoFrame checksum!\n");
> }
> --
> 1.7.7.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] intel_infoframes: Dump HDMI vendor infoframes
2012-09-26 23:01 ` Rodrigo Vivi
@ 2012-09-27 6:44 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-09-27 6:44 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx
On Wed, Sep 26, 2012 at 08:01:09PM -0300, Rodrigo Vivi wrote:
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>
> On Wed, Sep 26, 2012 at 2:17 PM, Damien Lespiau
> <damien.lespiau@gmail.com> wrote:
> > From: Damien Lespiau <damien.lespiau@intel.com>
> >
> > Those infoframes are programmed when using stereo 3D modes.
> >
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Applied, thanks for the patch.
-Daniel
> > ---
> > tools/intel_infoframes.c | 63 +++++++++++++++++++++++++++++++++++++++++++++-
> > 1 files changed, 62 insertions(+), 1 deletions(-)
> >
> > diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
> > index d74df64..66351ac 100644
> > --- a/tools/intel_infoframes.c
> > +++ b/tools/intel_infoframes.c
> > @@ -125,6 +125,8 @@ typedef enum {
> > #define SPD_INFOFRAME_VERSION 0x01
> > #define SPD_INFOFRAME_LENGTH 0x19
> >
> > +#define VENDOR_ID_HDMI 0x000c03
> > +
> > typedef struct {
> > uint8_t type;
> > uint8_t version;
> > @@ -175,6 +177,21 @@ typedef union {
> > } __attribute__((packed)) spd;
> > struct {
> > DipInfoFrameHeader header;
> > + uint8_t checksum;
> > +
> > + uint8_t id[3];
> > +
> > + uint8_t Rsvd0 :5;
> > + uint8_t video_format :3;
> > +
> > + uint8_t Rsvd1 :4;
> > + uint8_t s3d_structure :4;
> > +
> > + uint8_t Rsvd2 :4;
> > + uint8_t s3d_ext_data :4;
> > + } __attribute__((packed)) vendor;
> > + struct {
> > + DipInfoFrameHeader header;
> > uint8_t body[27];
> > } generic;
> > uint8_t data8[128];
> > @@ -424,10 +441,45 @@ static void dump_avi_info(Transcoder transcoder)
> > printf("Invalid InfoFrame checksum!\n");
> > }
> >
> > +static const char *vendor_id_to_string(uint32_t id)
> > +{
> > + switch (id) {
> > + case VENDOR_ID_HDMI:
> > + return "HDMI";
> > + default:
> > + return "Unknown";
> > + }
> > +}
> > +
> > +static const char *s3d_structure_to_string(int format)
> > +{
> > + switch (format) {
> > + case 0:
> > + return "Frame Packing";
> > + case 6:
> > + return "Top Bottom";
> > + case 8:
> > + return "Side By Side (half)";
> > + default:
> > + return "Reserved";
> > + }
> > +}
> > +
> > +static void dump_vendor_hdmi(DipInfoFrame *frame)
> > +{
> > + 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)
> > + printf("- 3D Format: %s\n",
> > + s3d_structure_to_string(frame->vendor.s3d_structure));
> > +}
> > +
> > static void dump_vendor_info(Transcoder transcoder)
> > {
> > Register reg = get_dip_ctl_reg(transcoder);
> > - uint32_t val;
> > + uint32_t val, vendor_id;
> > DipFrequency freq;
> > DipInfoFrame frame;
> >
> > @@ -446,6 +498,15 @@ static void dump_vendor_info(Transcoder transcoder)
> >
> > dump_raw_infoframe(&frame);
> >
> > + vendor_id = frame.vendor.id[2] << 16 | frame.vendor.id[1] << 8 |
> > + frame.vendor.id[0];
> > +
> > + printf("- vendor Id: 0x%06x (%s)\n", vendor_id,
> > + vendor_id_to_string(vendor_id));
> > +
> > + if (vendor_id == VENDOR_ID_HDMI)
> > + dump_vendor_hdmi(&frame);
> > +
> > if (!infoframe_valid_checksum(&frame))
> > printf("Invalid InfoFrame checksum!\n");
> > }
> > --
> > 1.7.7.5
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-27 6:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 17:17 [PATCH] intel_infoframes: Dump HDMI vendor infoframes Damien Lespiau
2012-09-26 23:01 ` Rodrigo Vivi
2012-09-27 6:44 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.