diff --git a/drivers/gpu/nvgpu/gp10b/Makefile b/drivers/gpu/nvgpu/gp10b/Makefile index 4ecf761a8..ecb09cf64 100644 --- a/drivers/gpu/nvgpu/gp10b/Makefile +++ b/drivers/gpu/nvgpu/gp10b/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_GK20A) += \ gr_gp10b.o \ mc_gp10b.o \ ltc_gp10b.o \ + mm_gp10b.o \ hal_gp10b.o obj-$(CONFIG_TEGRA_GK20A) += platform_gp10b_tegra.o diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 5ef64e1f0..acd1b73c8 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -23,13 +23,13 @@ #include "gp10b/gr_gp10b.h" #include "gp10b/mc_gp10b.h" #include "gp10b/ltc_gp10b.h" +#include "gp10b/mm_gp10b.h" #include "gm20b/gr_gm20b.h" #include "gm20b/fb_gm20b.h" #include "gm20b/gm20b_gating_reglist.h" #include "gm20b/fifo_gm20b.h" #include "gm20b/gr_ctx_gm20b.h" -#include "gm20b/mm_gm20b.h" #include "gm20b/pmu_gm20b.h" #include "gm20b/clk_gm20b.h" @@ -94,7 +94,7 @@ int gp10b_init_hal(struct gk20a *g) gm20b_init_fb(gops); gm20b_init_fifo(gops); gm20b_init_gr_ctx(gops); - gm20b_init_mm(gops); + gp10b_init_mm(gops); gm20b_init_pmu_ops(gops); gm20b_init_clk_ops(gops); gops->name = "gp10b"; diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c new file mode 100644 index 000000000..a0b6a7d17 --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c @@ -0,0 +1,28 @@ +/* + * GP10B MMU + * + * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#include +#include "gk20a/gk20a.h" + +u32 gp10b_mm_get_physical_addr_bits(struct gk20a *g) +{ + return 37; +} + +void gp10b_init_mm(struct gpu_ops *gops) +{ + gm20b_init_mm(gops); + gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits; +} diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.h b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h new file mode 100644 index 000000000..38ca93a4f --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#ifndef MM_GP10B_H +#define MM_GP10B_H +struct gpu_ops; + +void gp10b_init_mm(struct gpu_ops *gops); +#endif