[Nouveau] [PATCH 4/6] drm/nouveau: Use supplied HDMI InfoFrames on GK104 hardware

Alastair Bridgewater alastair.bridgewater at gmail.com
Tue Jan 17 22:42:02 UTC 2017


Now that we have the InfoFrame data being provided, for the most
part, program the hardware to use it.

While we're here, and since the functionality will come in handy
for supporting 3D stereoscopy, implement setting the Vendor
("generic"?) InfoFrame.

Also don't enable any InfoFrame that is not provided, and disable
the Vendor InfoFrame when disabling the output.

Ignore the Audio InfoFrame: We don't supply it, and there is no
indication that the hardware supports it through this interface.

Signed-off-by: Alastair Bridgewater <alastair.bridgewater at gmail.com>
---
 .../gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c   | 26 +++++++++++++++++-----
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c
index 6c38d6d..64b21a4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c
@@ -86,6 +86,7 @@ gk104_hdmi_ctrl(NV50_DISP_MTHD_V1)
 
 	if (!(ctrl & 0x40000000)) {
 		nvkm_mask(device, 0x616798 + hoff, 0x40000000, 0x00000000);
+		nvkm_mask(device, 0x690100 + hdmi, 0x00000001, 0x00000000);
 		nvkm_mask(device, 0x6900c0 + hdmi, 0x00000001, 0x00000000);
 		nvkm_mask(device, 0x690000 + hdmi, 0x00000001, 0x00000000);
 		return 0;
@@ -93,12 +94,25 @@ gk104_hdmi_ctrl(NV50_DISP_MTHD_V1)
 
 	/* AVI InfoFrame */
 	nvkm_mask(device, 0x690000 + hdmi, 0x00000001, 0x00000000);
-	nvkm_wr32(device, 0x690008 + hdmi, 0x000d0282);
-	nvkm_wr32(device, 0x69000c + hdmi, 0x0000006f);
-	nvkm_wr32(device, 0x690010 + hdmi, 0x00000000);
-	nvkm_wr32(device, 0x690014 + hdmi, 0x00000000);
-	nvkm_wr32(device, 0x690018 + hdmi, 0x00000000);
-	nvkm_mask(device, 0x690000 + hdmi, 0x00000001, 0x00000001);
+	if (avi_infoframe) {
+		nvkm_wr32(device, 0x690008 + hdmi, avi_infoframe->header);
+		nvkm_wr32(device, 0x69000c + hdmi, avi_infoframe->subpack0_low);
+		nvkm_wr32(device, 0x690010 + hdmi, avi_infoframe->subpack0_high);
+		nvkm_wr32(device, 0x690014 + hdmi, avi_infoframe->subpack1_low);
+		nvkm_wr32(device, 0x690018 + hdmi, avi_infoframe->subpack1_high);
+		nvkm_mask(device, 0x690000 + hdmi, 0x00000001, 0x00000001);
+	}
+
+	/* GENERIC(?) / Vendor InfoFrame? */
+	nvkm_mask(device, 0x690100 + hdmi, 0x00010001, 0x00000000);
+	if (vendor_infoframe) {
+		nvkm_wr32(device, 0x690108 + hdmi, vendor_infoframe->header);
+		nvkm_wr32(device, 0x69010c + hdmi, vendor_infoframe->subpack0_low);
+		nvkm_wr32(device, 0x690110 + hdmi, vendor_infoframe->subpack0_high);
+		/* Is there a second (or further?) set of subpack registers here? */
+		nvkm_mask(device, 0x690100 + hdmi, 0x00000001, 0x00000001);
+	}
+
 
 	/* ??? InfoFrame? */
 	nvkm_mask(device, 0x6900c0 + hdmi, 0x00000001, 0x00000000);
-- 
2.10.2



More information about the Nouveau mailing list