]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/nouveau/disp/hda/gf119-: add HAL for programming device entry in SF
authorBen Skeggs <bskeggs@redhat.com>
Wed, 6 May 2020 04:40:56 +0000 (14:40 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:13:51 +0000 (11:13 +1000)
Register has moved on GV100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c

index 1080ba6ecd643fa8fb3b118d9c477fcb8650a36f..8a0ec7db51452a37c492b2c1804cb8c0e99d05f3 100644 (file)
  */
 #include "ior.h"
 
+void
+gf119_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, 0x616548 + hoff, 0x00000070, 0x00000000);
+}
+
 void
 gf119_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
 {
@@ -41,11 +49,10 @@ void
 gf119_hda_hpd(struct nvkm_ior *ior, int head, bool present)
 {
        struct nvkm_device *device = ior->disp->engine.subdev.device;
-       const u32 hoff = 0x800 * head;
        u32 data = 0x80000000;
        u32 mask = 0x80000001;
        if (present) {
-               nvkm_mask(device, 0x616548 + hoff, 0x00000070, 0x00000000);
+               ior->func->hda.device_entry(ior, head);
                data |= 0x00000001;
        } else {
                mask |= 0x00000002;
index c60acf71831e4bd23cc38fca648ccb0f5d2a9e82..eb1155e47ecdeb8f758f54286dd856aabb37d540 100644 (file)
@@ -88,6 +88,7 @@ struct nvkm_ior_func {
        struct {
                void (*hpd)(struct nvkm_ior *, int head, bool present);
                void (*eld)(struct nvkm_ior *, int head, u8 *data, u8 size);
+               void (*device_entry)(struct nvkm_ior *, int head);
        } hda;
 };
 
@@ -162,6 +163,7 @@ void gt215_hda_eld(struct nvkm_ior *, int, u8 *, u8);
 
 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);
 
 #define IOR_MSG(i,l,f,a...) do {                                               \
        struct nvkm_ior *_ior = (i);                                           \
index 456a5a143522ae19cb2cd1011a08da4811429fe3..3b3643fb101990a25f2b6817be15c0509a4c477b 100644 (file)
@@ -177,6 +177,7 @@ gf119_sor = {
        .hda = {
                .hpd = gf119_hda_hpd,
                .eld = gf119_hda_eld,
+               .device_entry = gf119_hda_device_entry,
        },
 };
 
index b94090edaebff2b7462499c18339790d01dbde91..0c0925680790350a303435b5c3b349640073eb46 100644 (file)
@@ -43,6 +43,7 @@ gk104_sor = {
        .hda = {
                .hpd = gf119_hda_hpd,
                .eld = gf119_hda_eld,
+               .device_entry = gf119_hda_device_entry,
        },
 };
 
index e6965dec09c968f6257649990c0eb78abec02b02..38045c92197f8734f2e5ae54563440f580a5113d 100644 (file)
@@ -57,6 +57,7 @@ gm107_sor = {
        .hda = {
                .hpd = gf119_hda_hpd,
                .eld = gf119_hda_eld,
+               .device_entry = gf119_hda_device_entry,
        },
 };
 
index 384f82652bec1180de2d2c82a219263e44184b71..cf2075db742a21a60db77145ea27e451f34a8343 100644 (file)
@@ -115,6 +115,7 @@ gm200_sor = {
        .hda = {
                .hpd = gf119_hda_hpd,
                .eld = gf119_hda_eld,
+               .device_entry = gf119_hda_device_entry,
        },
 };
 
index b0597ff9a7149fb256fa259caf50a78d2c5f89cd..565cfbc6555021dcdc30a32afce8e904844b41ac 100644 (file)
@@ -103,6 +103,7 @@ gv100_sor = {
        .hda = {
                .hpd = gf119_hda_hpd,
                .eld = gf119_hda_eld,
+               .device_entry = gf119_hda_device_entry,
        },
 };
 
index 4d5f3791ea7b039c4bfe19f57efc853dac26ec73..b16ecea098c718191f0a81511d73d20f0e0881ff 100644 (file)
@@ -88,6 +88,7 @@ tu102_sor = {
        .hda = {
                .hpd = gf119_hda_hpd,
                .eld = gf119_hda_eld,
+               .device_entry = gf119_hda_device_entry,
        },
 };