aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/device/nv40.c12
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/vm/nv41.c9
2 files changed, 14 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nv40.c b/drivers/gpu/drm/nouveau/core/subdev/device/nv40.c
index 18de4c5b202f..42deadca0f0a 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/device/nv40.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/device/nv40.c
@@ -78,7 +78,7 @@ nv40_identify(struct nouveau_device *device)
78 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; 78 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass;
79 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass; 79 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass;
80 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass; 80 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass;
81 device->oclass[NVDEV_SUBDEV_VM ] = &nv04_vmmgr_oclass; 81 device->oclass[NVDEV_SUBDEV_VM ] = &nv41_vmmgr_oclass;
82 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass; 82 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass;
83 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass; 83 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass;
84 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass; 84 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass;
@@ -98,7 +98,7 @@ nv40_identify(struct nouveau_device *device)
98 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; 98 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass;
99 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass; 99 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass;
100 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass; 100 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass;
101 device->oclass[NVDEV_SUBDEV_VM ] = &nv04_vmmgr_oclass; 101 device->oclass[NVDEV_SUBDEV_VM ] = &nv41_vmmgr_oclass;
102 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass; 102 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass;
103 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass; 103 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass;
104 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass; 104 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass;
@@ -118,7 +118,7 @@ nv40_identify(struct nouveau_device *device)
118 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; 118 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass;
119 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass; 119 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass;
120 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass; 120 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass;
121 device->oclass[NVDEV_SUBDEV_VM ] = &nv04_vmmgr_oclass; 121 device->oclass[NVDEV_SUBDEV_VM ] = &nv41_vmmgr_oclass;
122 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass; 122 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass;
123 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass; 123 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass;
124 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass; 124 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass;
@@ -158,7 +158,7 @@ nv40_identify(struct nouveau_device *device)
158 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; 158 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass;
159 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass; 159 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass;
160 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass; 160 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass;
161 device->oclass[NVDEV_SUBDEV_VM ] = &nv04_vmmgr_oclass; 161 device->oclass[NVDEV_SUBDEV_VM ] = &nv41_vmmgr_oclass;
162 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass; 162 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass;
163 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass; 163 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass;
164 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass; 164 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass;
@@ -178,7 +178,7 @@ nv40_identify(struct nouveau_device *device)
178 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; 178 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass;
179 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass; 179 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass;
180 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass; 180 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass;
181 device->oclass[NVDEV_SUBDEV_VM ] = &nv04_vmmgr_oclass; 181 device->oclass[NVDEV_SUBDEV_VM ] = &nv41_vmmgr_oclass;
182 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass; 182 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass;
183 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass; 183 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass;
184 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass; 184 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass;
@@ -198,7 +198,7 @@ nv40_identify(struct nouveau_device *device)
198 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; 198 device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass;
199 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass; 199 device->oclass[NVDEV_SUBDEV_FB ] = &nv40_fb_oclass;
200 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass; 200 device->oclass[NVDEV_SUBDEV_INSTMEM] = &nv40_instmem_oclass;
201 device->oclass[NVDEV_SUBDEV_VM ] = &nv04_vmmgr_oclass; 201 device->oclass[NVDEV_SUBDEV_VM ] = &nv41_vmmgr_oclass;
202 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass; 202 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nv04_dmaeng_oclass;
203 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass; 203 device->oclass[NVDEV_ENGINE_FIFO ] = &nv40_fifo_oclass;
204 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass; 204 device->oclass[NVDEV_ENGINE_SW ] = &nv10_software_oclass;
diff --git a/drivers/gpu/drm/nouveau/core/subdev/vm/nv41.c b/drivers/gpu/drm/nouveau/core/subdev/vm/nv41.c
index c5486e4bffa6..0203e1e12caa 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/vm/nv41.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/vm/nv41.c
@@ -23,6 +23,7 @@
23 */ 23 */
24 24
25#include <core/gpuobj.h> 25#include <core/gpuobj.h>
26#include <core/option.h>
26 27
27#include <subdev/timer.h> 28#include <subdev/timer.h>
28#include <subdev/vm.h> 29#include <subdev/vm.h>
@@ -70,7 +71,7 @@ nv41_vm_flush(struct nouveau_vm *vm)
70 71
71 mutex_lock(&nv_subdev(priv)->mutex); 72 mutex_lock(&nv_subdev(priv)->mutex);
72 nv_wr32(priv, 0x100810, 0x00000022); 73 nv_wr32(priv, 0x100810, 0x00000022);
73 if (!nv_wait(priv, 0x100810, 0x00000100, 0x00000100)) { 74 if (!nv_wait(priv, 0x100810, 0x00000020, 0x00000020)) {
74 nv_warn(priv, "flush timeout, 0x%08x\n", 75 nv_warn(priv, "flush timeout, 0x%08x\n",
75 nv_rd32(priv, 0x100810)); 76 nv_rd32(priv, 0x100810));
76 } 77 }
@@ -87,9 +88,15 @@ nv41_vmmgr_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
87 struct nouveau_oclass *oclass, void *data, u32 size, 88 struct nouveau_oclass *oclass, void *data, u32 size,
88 struct nouveau_object **pobject) 89 struct nouveau_object **pobject)
89{ 90{
91 struct nouveau_device *device = nv_device(parent);
90 struct nv04_vmmgr_priv *priv; 92 struct nv04_vmmgr_priv *priv;
91 int ret; 93 int ret;
92 94
95 if (!nouveau_boolopt(device->cfgopt, "NvPCIE", true)) {
96 return nouveau_object_ctor(parent, engine, &nv04_vmmgr_oclass,
97 data, size, pobject);
98 }
99
93 ret = nouveau_vmmgr_create(parent, engine, oclass, "PCIEGART", 100 ret = nouveau_vmmgr_create(parent, engine, oclass, "PCIEGART",
94 "pciegart", &priv); 101 "pciegart", &priv);
95 *pobject = nv_object(priv); 102 *pobject = nv_object(priv);