diff options
author | Kevin Huang <kevinh@nvidia.com> | 2014-05-09 14:41:26 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:06 -0400 |
commit | 1d9eba07c58b0a30f479b233371c939180a0e419 (patch) | |
tree | 1b4081a723834d8b295a147e85f6d7b7b205a88c /drivers/gpu/nvgpu/gk20a/regops_gk20a.h | |
parent | 5cd313e20221c93008f1d56ac223d6e08966505e (diff) |
gpu: nvgpu: add HAL for regops
Bug 1500195
Change-Id: I5545d1a95a58e7daa5a74cc20f3fc6828774fc42
Signed-off-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-on: http://git-master/r/488507
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/regops_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/regops_gk20a.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.h b/drivers/gpu/nvgpu/gk20a/regops_gk20a.h index 23b4865b..808e8bbe 100644 --- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.h | |||
@@ -19,6 +19,13 @@ | |||
19 | #ifndef __REGOPS_GK20A_H_ | 19 | #ifndef __REGOPS_GK20A_H_ |
20 | #define __REGOPS_GK20A_H_ | 20 | #define __REGOPS_GK20A_H_ |
21 | 21 | ||
22 | #include <linux/nvhost_dbg_gpu_ioctl.h> | ||
23 | |||
24 | struct regop_offset_range { | ||
25 | u32 base:24; | ||
26 | u32 count:8; | ||
27 | }; | ||
28 | |||
22 | int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s, | 29 | int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s, |
23 | struct nvhost_dbg_gpu_reg_op *ops, | 30 | struct nvhost_dbg_gpu_reg_op *ops, |
24 | u64 num_ops); | 31 | u64 num_ops); |
@@ -26,7 +33,6 @@ int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s, | |||
26 | /* turn seriously unwieldy names -> something shorter */ | 33 | /* turn seriously unwieldy names -> something shorter */ |
27 | #define REGOP(x) NVHOST_DBG_GPU_REG_OP_##x | 34 | #define REGOP(x) NVHOST_DBG_GPU_REG_OP_##x |
28 | 35 | ||
29 | |||
30 | static inline bool reg_op_is_gr_ctx(u8 type) | 36 | static inline bool reg_op_is_gr_ctx(u8 type) |
31 | { | 37 | { |
32 | return type == REGOP(TYPE_GR_CTX) || | 38 | return type == REGOP(TYPE_GR_CTX) || |
@@ -42,6 +48,7 @@ static inline bool reg_op_is_read(u8 op) | |||
42 | op == REGOP(READ_64) ; | 48 | op == REGOP(READ_64) ; |
43 | } | 49 | } |
44 | 50 | ||
45 | bool is_bar0_global_offset_whitelisted_gk20a(u32 offset); | 51 | bool is_bar0_global_offset_whitelisted_gk20a(struct gk20a *g, u32 offset); |
46 | 52 | ||
53 | void gk20a_init_regops(struct gpu_ops *gops); | ||
47 | #endif /* __REGOPS_GK20A_H_ */ | 54 | #endif /* __REGOPS_GK20A_H_ */ |