mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: add .init_golden_image HAL
golden image is created differently on native and VF. Jira GVSCI-15772 Change-Id: I8d78d1214d8aac1d39d6529b68adef1dd6f8a516 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863440 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
067e3590d5
commit
41823694a3
@@ -984,19 +984,18 @@ 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;
|
||||
if (g->ops.gr.setup.init_golden_image != NULL) {
|
||||
int err = g->ops.gr.setup.init_golden_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,
|
||||
return 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