From 5e90bf3f6c35361cacc1ce8588c3120091d54f58 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 27 Aug 2018 14:16:59 +0300 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1807370 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c') 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, { struct tsg_gk20a *tsg; struct nvgpu_gr_ctx *gr_ctx; - struct ctx_header_desc *ctx = &c->ctx_header; - struct nvgpu_mem *ctxheader = &ctx->mem; + struct nvgpu_mem *ctxheader = &c->ctx_header; u32 gfxp_preempt_option = ctxsw_prog_main_image_graphics_preemption_options_control_gfxp_f(); u32 cilp_preempt_option = @@ -2897,7 +2896,7 @@ int gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va) { u32 addr_lo; u32 addr_hi; - struct ctx_header_desc *ctx; + struct nvgpu_mem *ctxheader; int err; struct gk20a *g = c->g; @@ -2913,9 +2912,9 @@ int gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va) return err; } - ctx = &c->ctx_header; - addr_lo = u64_lo32(ctx->mem.gpu_va) >> ram_in_base_shift_v(); - addr_hi = u64_hi32(ctx->mem.gpu_va); + ctxheader = &c->ctx_header; + addr_lo = u64_lo32(ctxheader->gpu_va) >> ram_in_base_shift_v(); + addr_hi = u64_hi32(ctxheader->gpu_va); /* point this address to engine_wfi_ptr */ nvgpu_mem_wr32(c->g, &c->inst_block, ram_in_engine_wfi_target_w(), -- cgit v1.2.2