[Nouveau] [PATCH 3/6] drm/nouveau: Use supplied HDMI InfoFrames on GT215 hardware
Alastair Bridgewater
alastair.bridgewater at gmail.com
Tue Jan 17 22:42:01 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.
This change should have two net effects: The Audio infoframe will
no longer be configured (because it's not being supplied, not
that it appears to be necessary), and the AVI and Vendor
InfoFrames will start being emitted correctly for the selected
video mode... For GT215 hardware only.
Signed-off-by: Alastair Bridgewater <alastair.bridgewater at gmail.com>
---
.../gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 38 ++++++++++++++++------
1 file changed, 28 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c
index e2fbe4c..fc8e1e4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c
@@ -87,6 +87,7 @@ gt215_hdmi_ctrl(NV50_DISP_MTHD_V1)
if (!(ctrl & 0x40000000)) {
nvkm_mask(device, 0x61c5a4 + soff, 0x40000000, 0x00000000);
+ nvkm_mask(device, 0x61c53c + soff, 0x00000001, 0x00000000);
nvkm_mask(device, 0x61c520 + soff, 0x00000001, 0x00000000);
nvkm_mask(device, 0x61c500 + soff, 0x00000001, 0x00000000);
return 0;
@@ -94,19 +95,36 @@ gt215_hdmi_ctrl(NV50_DISP_MTHD_V1)
/* AVI InfoFrame */
nvkm_mask(device, 0x61c520 + soff, 0x00000001, 0x00000000);
- nvkm_wr32(device, 0x61c528 + soff, 0x000d0282);
- nvkm_wr32(device, 0x61c52c + soff, 0x0000006f);
- nvkm_wr32(device, 0x61c530 + soff, 0x00000000);
- nvkm_wr32(device, 0x61c534 + soff, 0x00000000);
- nvkm_wr32(device, 0x61c538 + soff, 0x00000000);
- nvkm_mask(device, 0x61c520 + soff, 0x00000001, 0x00000001);
+ if (avi_infoframe) {
+ nvkm_wr32(device, 0x61c528 + soff, avi_infoframe->header);
+ nvkm_wr32(device, 0x61c52c + soff, avi_infoframe->subpack0_low);
+ nvkm_wr32(device, 0x61c530 + soff, avi_infoframe->subpack0_high);
+ nvkm_wr32(device, 0x61c534 + soff, avi_infoframe->subpack1_low);
+ nvkm_wr32(device, 0x61c538 + soff, avi_infoframe->subpack1_high);
+ nvkm_mask(device, 0x61c520 + soff, 0x00000001, 0x00000001);
+ }
/* Audio InfoFrame */
nvkm_mask(device, 0x61c500 + soff, 0x00000001, 0x00000000);
- nvkm_wr32(device, 0x61c508 + soff, 0x000a0184);
- nvkm_wr32(device, 0x61c50c + soff, 0x00000071);
- nvkm_wr32(device, 0x61c510 + soff, 0x00000000);
- nvkm_mask(device, 0x61c500 + soff, 0x00000001, 0x00000001);
+ if (audio_infoframe) {
+ nvkm_wr32(device, 0x61c508 + soff, audio_infoframe->header);
+ nvkm_wr32(device, 0x61c50c + soff, audio_infoframe->subpack0_low);
+ nvkm_wr32(device, 0x61c510 + soff, audio_infoframe->subpack0_high);
+ /* Audio InfoFrame supposedly has only one subpack. */
+ nvkm_mask(device, 0x61c500 + soff, 0x00000001, 0x00000001);
+ }
+
+ /* Vendor InfoFrame */
+ nvkm_mask(device, 0x61c53c + soff, 0x00010001, 0x00010000);
+ if (vendor_infoframe) {
+ nvkm_wr32(device, 0x61c544 + soff, vendor_infoframe->header);
+ nvkm_wr32(device, 0x61c548 + soff, vendor_infoframe->subpack0_low);
+ nvkm_wr32(device, 0x61c54c + soff, vendor_infoframe->subpack0_high);
+ /* Is there a second (or up to fourth?) set of subpack registers here? */
+ /* nvkm_wr32(device, 0x61c550 + soff, vendor_infoframe->subpack1_low); */
+ /* nvkm_wr32(device, 0x61c554 + soff, vendor_infoframe->subpack1_high); */
+ nvkm_mask(device, 0x61c53c + soff, 0x00010001, 0x00010001);
+ }
nvkm_mask(device, 0x61c5d0 + soff, 0x00070001, 0x00010001); /* SPARE, HW_CTS */
nvkm_mask(device, 0x61c568 + soff, 0x00010101, 0x00000000); /* ACR_CTRL, ?? */
--
2.10.2
More information about the Nouveau
mailing list