mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: move zcull context setup to gr/ctx and gr/subctx units
In gr_gk20a_ctx_zcull_setup(), we configure context/subcontext with zcull details This API now does it directly by calling g->ops.gr.ctxsw_prog HAL Move all context/subcontext setup to gr/ctx and gr/subctx units respectively Define and use below new APIs for same gr/ctx : nvgpu_gr_ctx_zcull_setup() gr/subctx : nvgpu_gr_subctx_zcull_setup() Jira NVGPU-1527 Jira NVGPU-1613 Change-Id: I1b7b16baea60ea45535c623b5b41351610ca433e Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2011090 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
319eca3498
commit
bac95b36d8
@@ -612,3 +612,25 @@ u32 nvgpu_gr_ctx_get_ctx_id(struct gk20a *g, struct nvgpu_gr_ctx *gr_ctx)
|
||||
|
||||
return gr_ctx->ctx_id;
|
||||
}
|
||||
|
||||
int nvgpu_gr_ctx_zcull_setup(struct gk20a *g, struct nvgpu_gr_ctx *gr_ctx,
|
||||
bool set_zcull_ptr)
|
||||
{
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
if (gr_ctx->zcull_ctx.gpu_va == 0ULL &&
|
||||
g->ops.gr.ctxsw_prog.is_zcull_mode_separate_buffer(
|
||||
gr_ctx->zcull_ctx.ctx_sw_mode)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
g->ops.gr.ctxsw_prog.set_zcull(g, &gr_ctx->mem,
|
||||
gr_ctx->zcull_ctx.ctx_sw_mode);
|
||||
|
||||
if (set_zcull_ptr) {
|
||||
g->ops.gr.ctxsw_prog.set_zcull_ptr(g, &gr_ctx->mem,
|
||||
gr_ctx->zcull_ctx.gpu_va);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user