From 83bdf33b56b231784987028c9c3c461097a962aa Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 8 Nov 2017 07:37:24 -0800 Subject: gpu: nvgpu: remove NVGPU_ALLOC_OBJ_FLAGS_* from common code In gr_gp10b_alloc_gr_ctx(), we use linux specific flags NVGPU_ALLOC_OBJ_FLAGS_* Since common code should be independent of linux specific code, define new flags NVGPU_OBJ_CTX_FLAGS_SUPPORT_* in common code and use them wherever needed Linux code will parse the user flags and send appropriate flags to g->ops.gr.alloc_obj_ctx() Also remove use of NVGPU_ALLOC_OBJ_FLAGS_LOCKBOOST_ZERO since this seems to be deadcode anyways Jira NVGPU-382 Change-Id: Id82efe0d46ddc3e2c063610025ea57f283bc3510 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1594452 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 4 ++++ drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 58a8aa97..d865849b 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -52,6 +52,10 @@ struct fifo_profile_gk20a; #define NVGPU_GPFIFO_FLAGS_SUPPORT_VPR (1 << 0) #define NVGPU_GPFIFO_FLAGS_SUPPORT_DETERMINISTIC (1 << 1) +/* Flags to be passed to g->ops.gr.alloc_obj_ctx() */ +#define NVGPU_OBJ_CTX_FLAGS_SUPPORT_GFXP (1 << 1) +#define NVGPU_OBJ_CTX_FLAGS_SUPPORT_CILP (1 << 2) + struct notification { struct { u32 nanoseconds[2]; diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index b77db87f..ddce0716 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -3046,8 +3046,6 @@ int gk20a_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) "failed to set texlock for compute class"); } - flags |= NVGPU_ALLOC_OBJ_FLAGS_LOCKBOOST_ZERO; - if (g->support_pmu && g->can_elpg) nvgpu_pmu_enable_elpg(g); } -- cgit v1.2.2