summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/posix
diff options
context:
space:
mode:
authorSagar Kamble <skamble@nvidia.com>2021-05-03 12:16:17 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2021-05-04 17:40:40 -0400
commit00c3d98acba40e0ee549a174f212850aa15646a5 (patch)
tree80928678cb7968af8a29c5ef09c646241506074d /drivers/gpu/nvgpu/os/posix
parent13fc430775eb0e39dc06e420d5c92dda7016f6ae (diff)
gpu: nvgpu: create timed wait functions for stall and nonstall interrupts completion
In order to process stalling interrupts during TSG unbind, we need a API to wait for the stalling interrupts to complete within certain duration. Prepare these APIs for stalling and non-stalling interrupts. Bug 200711183 Bug 200726848 Change-Id: I634738249ade64224326b356d6244ad4299f1baf Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2521970 (cherry picked from commit I0b7a64c0f3761bbd0ca0843aea28a591ed23739f) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2523937 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/os/posix')
-rw-r--r--drivers/gpu/nvgpu/os/posix/nvgpu.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/posix/nvgpu.c b/drivers/gpu/nvgpu/os/posix/nvgpu.c
index e485ed73..5b68113c 100644
--- a/drivers/gpu/nvgpu/os/posix/nvgpu.c
+++ b/drivers/gpu/nvgpu/os/posix/nvgpu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -36,6 +36,22 @@
36 36
37#include "os_posix.h" 37#include "os_posix.h"
38 38
39int nvgpu_wait_for_stall_interrupts(struct gk20a *g, u32 timeout)
40{
41 /*
42 * No interrupts in userspace so nothing to wait for.
43 */
44 return 0;
45}
46
47int nvgpu_wait_for_nonstall_interrupts(struct gk20a *g, u32 timeout)
48{
49 /*
50 * No interrupts in userspace so nothing to wait for.
51 */
52 return 0;
53}
54
39void nvgpu_wait_for_deferred_interrupts(struct gk20a *g) 55void nvgpu_wait_for_deferred_interrupts(struct gk20a *g)
40{ 56{
41 /* 57 /*