aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/drm/hdmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/host1x/drm/hdmi.c')
-rw-r--r--drivers/gpu/host1x/drm/hdmi.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
index 01097da09f7f..b5489187a163 100644
--- a/drivers/gpu/host1x/drm/hdmi.c
+++ b/drivers/gpu/host1x/drm/hdmi.c
@@ -539,7 +539,7 @@ static void tegra_hdmi_setup_audio_infoframe(struct tegra_hdmi *hdmi)
539 539
540static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi) 540static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi)
541{ 541{
542 struct hdmi_vendor_infoframe frame; 542 struct hdmi_hdmi_infoframe frame;
543 unsigned long value; 543 unsigned long value;
544 u8 buffer[10]; 544 u8 buffer[10];
545 ssize_t err; 545 ssize_t err;
@@ -551,26 +551,10 @@ static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi)
551 return; 551 return;
552 } 552 }
553 553
554 memset(&frame, 0, sizeof(frame)); 554 hdmi_hdmi_infoframe_init(&frame);
555 frame.s3d_struct = HDMI_3D_STRUCTURE_FRAME_PACKING;
555 556
556 frame.type = HDMI_INFOFRAME_TYPE_VENDOR; 557 err = hdmi_hdmi_infoframe_pack(&frame, buffer, sizeof(buffer));
557 frame.version = 0x01;
558 frame.length = 6;
559
560 frame.data[0] = 0x03; /* regid0 */
561 frame.data[1] = 0x0c; /* regid1 */
562 frame.data[2] = 0x00; /* regid2 */
563 frame.data[3] = 0x02 << 5; /* video format */
564
565 /* TODO: 74 MHz limit? */
566 if (1) {
567 frame.data[4] = 0x00 << 4; /* 3D structure */
568 } else {
569 frame.data[4] = 0x08 << 4; /* 3D structure */
570 frame.data[5] = 0x00 << 4; /* 3D ext. data */
571 }
572
573 err = hdmi_vendor_infoframe_pack(&frame, buffer, sizeof(buffer));
574 if (err < 0) { 558 if (err < 0) {
575 dev_err(hdmi->dev, "failed to pack vendor infoframe: %zd\n", 559 dev_err(hdmi->dev, "failed to pack vendor infoframe: %zd\n",
576 err); 560 err);