diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-07-10 12:54:10 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-12 23:44:04 -0400 |
commit | b07a304ba3e747c80fe3e0a16caec88c8e1e8b28 (patch) | |
tree | 7c800fa3ae75c1d33f806b4e1d6f522173801f44 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | 96d4842c0dbae051258408480b981ed034163c13 (diff) |
gpu: nvgpu: Use HAL for calls from MM to FB
mm_gv11b.c has several direct calls to fb_gv11b.h. Redirect them to
go via a HAL. Also make sure the HALs are using parameter with
correct signedness and prefix the parameter constants with
NVGPU_FB_MMU_.
MMU buffer table indices were also defined in fb_gv11b.h, even though
the tables themselves are defined in include/nvgpu/mm.h. Move the
indices to include/nvgpu/mm.h and prefix them with NVGPU_MM_MMU_.
JIRA NVGPU-714
Change-Id: Ieeae7c5664b8f53f8313cfad0a771d14637caa08
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1776131
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index b59baa78..4ff85ee3 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -162,6 +162,13 @@ struct nvgpu_gpfifo_userdata { | |||
162 | * should go in struct gk20a or be implemented with the boolean flag API defined | 162 | * should go in struct gk20a or be implemented with the boolean flag API defined |
163 | * in nvgpu/enabled.h | 163 | * in nvgpu/enabled.h |
164 | */ | 164 | */ |
165 | |||
166 | /* index for FB fault buffer functions */ | ||
167 | #define NVGPU_FB_MMU_FAULT_NONREPLAY_REG_INDEX 0U | ||
168 | #define NVGPU_FB_MMU_FAULT_REPLAY_REG_INDEX 1U | ||
169 | #define NVGPU_FB_MMU_FAULT_BUF_DISABLED 0U | ||
170 | #define NVGPU_FB_MMU_FAULT_BUF_ENABLED 1U | ||
171 | |||
165 | struct gpu_ops { | 172 | struct gpu_ops { |
166 | struct { | 173 | struct { |
167 | int (*determine_L2_size_bytes)(struct gk20a *gk20a); | 174 | int (*determine_L2_size_bytes)(struct gk20a *gk20a); |
@@ -564,6 +571,11 @@ struct gpu_ops { | |||
564 | u32 (*read_mmu_fault_status)(struct gk20a *g); | 571 | u32 (*read_mmu_fault_status)(struct gk20a *g); |
565 | int (*mmu_invalidate_replay)(struct gk20a *g, | 572 | int (*mmu_invalidate_replay)(struct gk20a *g, |
566 | u32 invalidate_replay_val); | 573 | u32 invalidate_replay_val); |
574 | bool (*mmu_fault_pending)(struct gk20a *g); | ||
575 | bool (*is_fault_buf_enabled)(struct gk20a *g, u32 index); | ||
576 | void (*fault_buf_set_state_hw)(struct gk20a *g, | ||
577 | u32 index, u32 state); | ||
578 | void (*fault_buf_configure_hw)(struct gk20a *g, u32 index); | ||
567 | } fb; | 579 | } fb; |
568 | struct { | 580 | struct { |
569 | void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod); | 581 | void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod); |