summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-08-27 07:16:59 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-31 00:42:39 -0400
commit5e90bf3f6c35361cacc1ce8588c3120091d54f58 (patch)
tree28155f352d97f33adff9fa62f06cb87d1570925b /drivers/gpu/nvgpu/gv11b/gr_gv11b.c
parenta6108a4b0ed52c7a8fa58d9815d0b373be8305bf (diff)
gpu: nvgpu: remove ctx header desc type
The graphics subctx header object is nothing but memory. Drop the dependency to gr header file in the channel header file and substitute struct nvgpu_mem for struct ctx_header_desc. Jira NVGPU-967 Change-Id: Ic3976391016c42d2ada4aac3e0851a1222244ce9 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1807370 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 296d8e90..9a6afa3e 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -1682,8 +1682,7 @@ void gr_gv11b_update_ctxsw_preemption_mode(struct gk20a *g,
1682{ 1682{
1683 struct tsg_gk20a *tsg; 1683 struct tsg_gk20a *tsg;
1684 struct nvgpu_gr_ctx *gr_ctx; 1684 struct nvgpu_gr_ctx *gr_ctx;
1685 struct ctx_header_desc *ctx = &c->ctx_header; 1685 struct nvgpu_mem *ctxheader = &c->ctx_header;
1686 struct nvgpu_mem *ctxheader = &ctx->mem;
1687 u32 gfxp_preempt_option = 1686 u32 gfxp_preempt_option =
1688 ctxsw_prog_main_image_graphics_preemption_options_control_gfxp_f(); 1687 ctxsw_prog_main_image_graphics_preemption_options_control_gfxp_f();
1689 u32 cilp_preempt_option = 1688 u32 cilp_preempt_option =
@@ -2897,7 +2896,7 @@ int gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va)
2897{ 2896{
2898 u32 addr_lo; 2897 u32 addr_lo;
2899 u32 addr_hi; 2898 u32 addr_hi;
2900 struct ctx_header_desc *ctx; 2899 struct nvgpu_mem *ctxheader;
2901 int err; 2900 int err;
2902 struct gk20a *g = c->g; 2901 struct gk20a *g = c->g;
2903 2902
@@ -2913,9 +2912,9 @@ int gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va)
2913 return err; 2912 return err;
2914 } 2913 }
2915 2914
2916 ctx = &c->ctx_header; 2915 ctxheader = &c->ctx_header;
2917 addr_lo = u64_lo32(ctx->mem.gpu_va) >> ram_in_base_shift_v(); 2916 addr_lo = u64_lo32(ctxheader->gpu_va) >> ram_in_base_shift_v();
2918 addr_hi = u64_hi32(ctx->mem.gpu_va); 2917 addr_hi = u64_hi32(ctxheader->gpu_va);
2919 2918
2920 /* point this address to engine_wfi_ptr */ 2919 /* point this address to engine_wfi_ptr */
2921 nvgpu_mem_wr32(c->g, &c->inst_block, ram_in_engine_wfi_target_w(), 2920 nvgpu_mem_wr32(c->g, &c->inst_block, ram_in_engine_wfi_target_w(),