mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add sched domain bind ioctl
Support binding TSGs to some other scheduling domain than the default one. Binding happens by name until a more robust interface appears in the future, as the name is a natural identifier for users. No other domains are actually created anywhere yet; that will happen in next patches. Jira NVGPU-6788 Change-Id: I5abcdea869b525b0a0e9937302f106f7eee94ec2 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2628047 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
e692cd9913
commit
fe7ae02f5f
@@ -176,6 +176,13 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int nvgpu_tsg_bind_scheduling_domain(struct nvgpu_tsg *tsg,
|
||||
struct nvgpu_tsg_bind_scheduling_domain_args *args)
|
||||
{
|
||||
|
||||
return nvgpu_tsg_bind_domain(tsg, args->domain_name);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NVGPU_CHANNEL_TSG_CONTROL
|
||||
static int gk20a_tsg_get_event_data_from_id(struct nvgpu_tsg *tsg,
|
||||
unsigned int event_id,
|
||||
@@ -814,6 +821,20 @@ long nvgpu_ioctl_tsg_dev_ioctl(struct file *filp, unsigned int cmd,
|
||||
break;
|
||||
}
|
||||
|
||||
case NVGPU_TSG_IOCTL_BIND_SCHEDULING_DOMAIN:
|
||||
{
|
||||
err = gk20a_busy(g);
|
||||
if (err) {
|
||||
nvgpu_err(g,
|
||||
"failed to host gk20a for ioctl cmd: 0x%x", cmd);
|
||||
break;
|
||||
}
|
||||
err = nvgpu_tsg_bind_scheduling_domain(tsg,
|
||||
(struct nvgpu_tsg_bind_scheduling_domain_args *)buf);
|
||||
gk20a_idle(g);
|
||||
break;
|
||||
}
|
||||
|
||||
case NVGPU_IOCTL_TSG_ENABLE:
|
||||
{
|
||||
err = gk20a_busy(g);
|
||||
|
||||
Reference in New Issue
Block a user