summaryrefslogtreecommitdiffstats
path: root/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch')
-rw-r--r--0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch105
1 files changed, 105 insertions, 0 deletions
diff --git a/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch b/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch
new file mode 100644
index 000000000..b93c9f13b
--- /dev/null
+++ b/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch
@@ -0,0 +1,105 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Ben Skeggs <bskeggs@redhat.com>
+Date: Wed, 6 May 2020 14:41:01 +1000
+Subject: [PATCH] disp/hda/gv100-: NV_PDISP_SF_AUDIO_CNTRL0 register moved
+
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+---
+ .../gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 +
+ .../drm/nouveau/nvkm/engine/disp/hdagv100.c | 30 +++++++++++++++++++
+ .../gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 ++
+ .../drm/nouveau/nvkm/engine/disp/sorgv100.c | 2 +-
+ .../drm/nouveau/nvkm/engine/disp/sortu102.c | 2 +-
+ 5 files changed, 35 insertions(+), 2 deletions(-)
+ create mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c
+
+diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
+index f7af648e0c17..571687ba85b8 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
++++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
+@@ -47,6 +47,7 @@ nvkm-y += nvkm/engine/disp/dp.o
+
+ nvkm-y += nvkm/engine/disp/hdagt215.o
+ nvkm-y += nvkm/engine/disp/hdagf119.o
++nvkm-y += nvkm/engine/disp/hdagv100.o
+
+ nvkm-y += nvkm/engine/disp/hdmi.o
+ nvkm-y += nvkm/engine/disp/hdmig84.o
+diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c
+new file mode 100644
+index 000000000000..57d374ecfeef
+--- /dev/null
++++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c
+@@ -0,0 +1,30 @@
++/*
++ * Copyright 2020 Red Hat Inc.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++#include "ior.h"
++
++void
++gv100_hda_device_entry(struct nvkm_ior *ior, int head)
++{
++ struct nvkm_device *device = ior->disp->engine.subdev.device;
++ const u32 hoff = 0x800 * head;
++ nvkm_mask(device, 0x616528 + hoff, 0x00000070, head << 4);
++}
+diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
+index eb1155e47ecd..c1d7a36e4d3c 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
++++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
+@@ -165,6 +165,8 @@ void gf119_hda_hpd(struct nvkm_ior *, int, bool);
+ void gf119_hda_eld(struct nvkm_ior *, int, u8 *, u8);
+ void gf119_hda_device_entry(struct nvkm_ior *, int);
+
++void gv100_hda_device_entry(struct nvkm_ior *, int);
++
+ #define IOR_MSG(i,l,f,a...) do { \
+ struct nvkm_ior *_ior = (i); \
+ nvkm_##l(&_ior->disp->engine.subdev, "%s: "f"\n", _ior->name, ##a); \
+diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
+index 565cfbc65550..d11a0dff10c6 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
++++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
+@@ -103,7 +103,7 @@ gv100_sor = {
+ .hda = {
+ .hpd = gf119_hda_hpd,
+ .eld = gf119_hda_eld,
+- .device_entry = gf119_hda_device_entry,
++ .device_entry = gv100_hda_device_entry,
+ },
+ };
+
+diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
+index b16ecea098c7..fa6d74251237 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
++++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
+@@ -88,7 +88,7 @@ tu102_sor = {
+ .hda = {
+ .hpd = gf119_hda_hpd,
+ .eld = gf119_hda_eld,
+- .device_entry = gf119_hda_device_entry,
++ .device_entry = gv100_hda_device_entry,
+ },
+ };
+
+--
+2.26.2
+