summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c
index e0a41ce3ddd1..5d760a198b22 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c
@@ -19,25 +19,24 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "priv.h"
+#include "vmm.h"
+
+#include <core/option.h>
+
+#include <nvif/class.h>
static const struct nvkm_mmu_func
gp10b_mmu = {
- .limit = (1ULL << 40),
- .dma_bits = 40,
- .pgt_bits = 27 - 12,
- .spg_shift = 12,
- .lpg_shift = 17,
- .create = gf100_vm_create,
- .map_pgt = gf100_vm_map_pgt,
- .map = gf100_vm_map,
- .map_sg = gf100_vm_map_sg,
- .unmap = gf100_vm_unmap,
- .flush = gf100_vm_flush,
+ .limit = (1ULL << 49),
+ .dma_bits = 47,
+ .lpg_shift = 16,
+ .vmm = {{ -1, -1, NVIF_CLASS_VMM_GP100}, gp10b_vmm_new },
};
int
gp10b_mmu_new(struct nvkm_device *device, int index, struct nvkm_mmu **pmmu)
{
+ if (!nvkm_boolopt(device->cfgopt, "GP100MmuLayout", false))
+ return gm20b_mmu_new(device, index, pmmu);
return nvkm_mmu_new_(&gp10b_mmu, device, index, pmmu);
}