mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: NVENC support on TU104
This patch adds nvenc support for TU104 - Fetch engine/dev info for nvenc - Falcon NS boot (fw loading) support - Engine context creation for nvenc - Skip golden image for multimedia engines - Avoid subctx for nvenc as it is a non-VEID engine - Job submission/flow changes for nvenc - Code refactoring to scale up the support for other multimedia engines in future. Bug 3763551 Change-Id: I03d4e731ebcef456bcc5ce157f3aa39883270dc0 Signed-off-by: Santosh BS <santoshb@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2859416 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
faf6ff3f34
commit
2a865e3aad
@@ -500,7 +500,8 @@ static int __gk20a_channel_open(struct gk20a *g, struct nvgpu_cdev *cdev,
|
||||
if (runlist_id == -1) {
|
||||
tmp_runlist_id = nvgpu_grmgr_get_gpu_instance_runlist_id(g, gpu_instance_id);
|
||||
} else {
|
||||
if (nvgpu_grmgr_is_valid_runlist_id(g, gpu_instance_id, runlist_id)) {
|
||||
if (nvgpu_grmgr_is_valid_runlist_id(g, gpu_instance_id, runlist_id) ||
|
||||
nvgpu_engine_is_multimedia_runlist_id(g, runlist_id)) {
|
||||
tmp_runlist_id = runlist_id;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
@@ -1266,9 +1267,17 @@ long gk20a_channel_ioctl(struct file *filp,
|
||||
}
|
||||
#endif
|
||||
|
||||
err = nvgpu_gr_exec_with_err_for_instance(g, gr_instance_id,
|
||||
nvgpu_ioctl_channel_alloc_obj_ctx(ch, args->class_num,
|
||||
args->flags));
|
||||
if (nvgpu_engine_is_multimedia_runlist_id(g, ch->runlist->id)) {
|
||||
if (ch->g->ops.nvenc.multimedia_alloc_ctx != NULL) {
|
||||
err = ch->g->ops.nvenc.multimedia_alloc_ctx(ch, args->class_num, 0);
|
||||
} else {
|
||||
err = -EINVAL;
|
||||
}
|
||||
} else {
|
||||
err = nvgpu_gr_exec_with_err_for_instance(g, gr_instance_id,
|
||||
nvgpu_ioctl_channel_alloc_obj_ctx(ch, args->class_num,
|
||||
args->flags));
|
||||
}
|
||||
gk20a_idle(ch->g);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user