From 4387f75f67c5dd502f71b5a0c3421c050954f5b4 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 10 Nov 2017 11:38:41 -0800 Subject: gpu: nvgpu: Change reg_op_is_* into normal funcs reg_op_is_* static inline force a dependency to UAPI in regops_gk20a.h. Change the implementation to be functions in .c file. JIRA NVGPU-388 Change-Id: If5cae1ad011a26ee5ff23e1e39aac3d88fd5bb98 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1598979 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/regops_gk20a.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/regops_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c index e7aeaa54..f0cf5205 100644 --- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c @@ -734,3 +734,19 @@ bool is_bar0_global_offset_whitelisted_gk20a(struct gk20a *g, u32 offset) regop_bsearch_range_cmp); return valid; } + +bool reg_op_is_gr_ctx(u8 type) +{ + return type == REGOP(TYPE_GR_CTX) || + type == REGOP(TYPE_GR_CTX_TPC) || + type == REGOP(TYPE_GR_CTX_SM) || + type == REGOP(TYPE_GR_CTX_CROP) || + type == REGOP(TYPE_GR_CTX_ZROP) || + type == REGOP(TYPE_GR_CTX_QUAD); +} + +bool reg_op_is_read(u8 op) +{ + return op == REGOP(READ_32) || + op == REGOP(READ_64); +} -- cgit v1.2.2