mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: fix the return sequence
API nvgpu_get_timestamps_zipper() returning with power reference in case of failure. Patch corrects the sequence. Bug 3412554 Change-Id: Id5bd027fd9861d2b04341b5045326278cef5c5d1 Signed-off-by: Prateek sethi <prsethi@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2551274 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@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
6cf7b9a4b2
commit
b4528cac93
@@ -86,19 +86,19 @@ int nvgpu_get_timestamps_zipper(struct gk20a *g,
|
||||
if (gk20a_busy(g) != 0) {
|
||||
nvgpu_err(g, "GPU not powered on\n");
|
||||
err = -EINVAL;
|
||||
goto end;
|
||||
return err;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
err = g->ops.ptimer.read_ptimer(g, &samples[i].gpu_timestamp);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
goto idle;
|
||||
}
|
||||
|
||||
samples[i].cpu_timestamp = nvgpu_hr_timestamp();
|
||||
}
|
||||
|
||||
end:
|
||||
idle:
|
||||
gk20a_idle(g);
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user