From 876953fbb85f9440bbcc1d7d59435593886b53c4 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 6 Jul 2018 12:37:10 -0700 Subject: gpu: nvgpu: Move FB MMU query to FB HAL Move queries of FB MMU configuration to FB HAL. Also use g->ltc_count instead of reading the number of LTCs from FB. These changes together remove last direct uses of FB registers from GR. JIRA NVGPU-714 Change-Id: I1b4b46fc2f636f5c1904e4174040a47a27948999 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1773076 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gm20b/fb_gm20b.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'drivers/gpu/nvgpu/gm20b/fb_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c index 2ca8d86c..37a7944b 100644 --- a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c @@ -68,6 +68,26 @@ bool gm20b_fb_set_use_full_comp_tag_line(struct gk20a *g) return true; } +u32 gm20b_fb_mmu_ctrl(struct gk20a *g) +{ + return gk20a_readl(g, fb_mmu_ctrl_r()); +} + +u32 gm20b_fb_mmu_debug_ctrl(struct gk20a *g) +{ + return gk20a_readl(g, fb_mmu_debug_ctrl_r()); +} + +u32 gm20b_fb_mmu_debug_wr(struct gk20a *g) +{ + return gk20a_readl(g, fb_mmu_debug_wr_r()); +} + +u32 gm20b_fb_mmu_debug_rd(struct gk20a *g) +{ + return gk20a_readl(g, fb_mmu_debug_rd_r()); +} + unsigned int gm20b_fb_compression_page_size(struct gk20a *g) { return SZ_128K; -- cgit v1.2.2