]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/nouveau/pci/nv46: attempt to fix msi, and re-enable by default
authorBen Skeggs <bskeggs@redhat.com>
Thu, 1 Oct 2015 01:36:58 +0000 (11:36 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 3 Nov 2015 05:02:18 +0000 (15:02 +1000)
Was not able to obtain a trace of NVRM due to kernel version annoyances,
however, experimentally confirmed that the WAR we use on NV50/G8x boards
works here too.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild
drivers/gpu/drm/nouveau/nvkm/subdev/pci/g84.c
drivers/gpu/drm/nouveau/nvkm/subdev/pci/nv46.c [moved from drivers/gpu/drm/nouveau/nvkm/subdev/pci/nv50.c with 84% similarity]
drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h

index 9c0b5e1605dcea202296ce984984c3a46241a4e2..39ca88f36df9e6ced644552a8373007e994dcf12 100644 (file)
@@ -28,8 +28,8 @@ void nvkm_pci_rom_shadow(struct nvkm_pci *, bool shadow);
 
 int nv04_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
 int nv40_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
+int nv46_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
 int nv4c_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
-int nv50_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
 int g84_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
 int g94_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
 int gf100_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
index 727e18e0acd0ec0e23688ec7e64c267a62268924..2cff79cf683d917f8a066f5bb80496ce6a303da1 100644 (file)
@@ -637,7 +637,7 @@ nv46_chipset = {
        .imem = nv40_instmem_new,
        .mc = nv44_mc_new,
        .mmu = nv44_mmu_new,
-       .pci = nv4c_pci_new,
+       .pci = nv46_pci_new,
        .therm = nv40_therm_new,
        .timer = nv41_timer_new,
        .volt = nv40_volt_new,
@@ -822,7 +822,7 @@ nv50_chipset = {
        .mc = nv50_mc_new,
        .mmu = nv50_mmu_new,
        .mxm = nv50_mxm_new,
-       .pci = nv50_pci_new,
+       .pci = nv46_pci_new,
        .therm = nv50_therm_new,
        .timer = nv41_timer_new,
        .volt = nv40_volt_new,
index 85cb52501ada0882f8357211f3bc5073e330e255..4476ef75acd6416672ce34f9c30cdadaeaacf854 100644 (file)
@@ -2,8 +2,8 @@ nvkm-y += nvkm/subdev/pci/agp.o
 nvkm-y += nvkm/subdev/pci/base.o
 nvkm-y += nvkm/subdev/pci/nv04.o
 nvkm-y += nvkm/subdev/pci/nv40.o
+nvkm-y += nvkm/subdev/pci/nv46.o
 nvkm-y += nvkm/subdev/pci/nv4c.o
-nvkm-y += nvkm/subdev/pci/nv50.o
 nvkm-y += nvkm/subdev/pci/g84.o
 nvkm-y += nvkm/subdev/pci/g94.o
 nvkm-y += nvkm/subdev/pci/gf100.o
index 30be277edf2a521f48c58b5704676fad36b39991..8f3b00199d14345d03379a3bb5d9eace668fc2b8 100644 (file)
@@ -30,7 +30,7 @@ g84_pci_func = {
        .rd32 = nv40_pci_rd32,
        .wr08 = nv40_pci_wr08,
        .wr32 = nv40_pci_wr32,
-       .msi_rearm = nv50_pci_msi_rearm,
+       .msi_rearm = nv46_pci_msi_rearm,
 };
 
 int
similarity index 84%
rename from drivers/gpu/drm/nouveau/nvkm/subdev/pci/nv50.c
rename to drivers/gpu/drm/nouveau/nvkm/subdev/pci/nv46.c
index 027481519ff9cd4a54709648558151162326f686..fc617e4c0ab6f52bee743c2d95d3ce31949fb75e 100644 (file)
 
 #include <core/pci.h>
 
-/* MSI re-arm through the PRI appears to be broken on NV50/G84/G86/G92,
+/* MSI re-arm through the PRI appears to be broken on NV46/NV50/G84/G86/G92,
  * so we access it via alternate PCI config space mechanisms.
  */
 void
-nv50_pci_msi_rearm(struct nvkm_pci *pci)
+nv46_pci_msi_rearm(struct nvkm_pci *pci)
 {
        struct nvkm_device *device = pci->subdev.device;
        struct pci_dev *pdev = device->func->pci(device)->pdev;
@@ -37,15 +37,15 @@ nv50_pci_msi_rearm(struct nvkm_pci *pci)
 }
 
 static const struct nvkm_pci_func
-nv50_pci_func = {
+nv46_pci_func = {
        .rd32 = nv40_pci_rd32,
        .wr08 = nv40_pci_wr08,
        .wr32 = nv40_pci_wr32,
-       .msi_rearm = nv50_pci_msi_rearm,
+       .msi_rearm = nv46_pci_msi_rearm,
 };
 
 int
-nv50_pci_new(struct nvkm_device *device, int index, struct nvkm_pci **ppci)
+nv46_pci_new(struct nvkm_device *device, int index, struct nvkm_pci **ppci)
 {
-       return nvkm_pci_new_(&nv50_pci_func, device, index, ppci);
+       return nvkm_pci_new_(&nv46_pci_func, device, index, ppci);
 }
index 68ce8e554ae9004866d22fe05fbb525eb9b5fe60..473b8ab2535133848569c4a8f432cc182b7e752c 100644 (file)
@@ -18,5 +18,5 @@ void nv40_pci_wr08(struct nvkm_pci *, u16, u8);
 void nv40_pci_wr32(struct nvkm_pci *, u16, u32);
 void nv40_pci_msi_rearm(struct nvkm_pci *);
 
-void nv50_pci_msi_rearm(struct nvkm_pci *);
+void nv46_pci_msi_rearm(struct nvkm_pci *);
 #endif