gpu: nvgpu: profiler: update reservation policy

Update profiler object reservation policy to reject any subsequent
reserve request made after the intial reserve->bind stage.

Bug 3480919

Change-Id: I3e25f22d907d7e06f4cf73347e7bd07e2f675749
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2662360
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Antony Clince Alex
2022-02-01 08:04:18 +00:00
committed by mobile promotions
parent 815c49278e
commit a6e5b76cbf

View File

@@ -178,16 +178,9 @@ int nvgpu_profiler_pm_resource_reserve(struct nvgpu_profiler_object *prof,
}
if (prof->bound) {
nvgpu_log(g, gpu_dbg_prof,
"PM resources alredy bound with profiler handle %u,"
" unbinding for new reservation",
prof->prof_handle);
err = nvgpu_profiler_unbind_pm_resources(prof);
if (err != 0) {
nvgpu_err(g, "Profiler handle %u failed to unbound, err %d",
prof->prof_handle, err);
return err;
}
nvgpu_err(g, "PM resources already bound with profiler handle"
" %u, rejecting reserve request", prof->prof_handle);
return -EEXIST;
}
err = g->ops.pm_reservation.acquire(g, reservation_id, pm_resource,