mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: init golden context image with nvgpu VEID0 channel
With subcontexts support added, nvgpu has to allocate VEID0 channel itself to initialize the golden context image. Allocate the channel and init the golden context image at the beginning of alloc_obj_ctx call for first user channel. It can't be initialized at the end of probe as tpc pg settings need to be updated before golden context image is initialized. Bug 3677982 Change-Id: Ia82f6ad6e088c2bc1578a6bd32b7c7a707a17224 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2756289 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
78a356d017
commit
b69c035520
@@ -983,6 +983,19 @@ static u32 nvgpu_obj_ctx_user_flags_to_common_flags(u32 user_flags)
|
||||
static int nvgpu_ioctl_channel_alloc_obj_ctx(struct nvgpu_channel *ch,
|
||||
u32 class_num, u32 user_flags)
|
||||
{
|
||||
struct gk20a *g = ch->g;
|
||||
int err;
|
||||
|
||||
/*
|
||||
* Allocate VEID0 channel and initialize the golden context image.
|
||||
*/
|
||||
err = nvgpu_gr_obj_ctx_init_golden_context_image(g);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "golden context image init failed (%d).",
|
||||
err);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
return ch->g->ops.gr.setup.alloc_obj_ctx(ch, class_num,
|
||||
nvgpu_obj_ctx_user_flags_to_common_flags(user_flags));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user