diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-11-23 06:59:14 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-28 12:46:54 -0500 |
commit | ce06f74d6ba9eb495661c29eabcd6da2f52c7c8b (patch) | |
tree | 307c045b4df7861d20f46a120a3726e274f6e472 /drivers/gpu/nvgpu/common/linux/channel.h | |
parent | 861b11a968b1f51f45832486e62bfe23fc29fc19 (diff) |
gpu: nvgpu: move cycle state buffer handler to linux
We use dma_buf pointer cyclestate_buffer_handler in common code
But since this is linux specific, we need to move this out of common code and
into linux specific code
Move dma_buf pointer cyclestate_buffer_handler from common channel code to
struct nvgpu_channel_linux
Fix all pointer accesses to this handle
Move gk20a_channel_free_cycle_stats_buffer() to ioctl_channel.c since it is
mostly linux specific
And since gk20a_channel_free_cycle_stats_buffer() needs to be called while
closing the channel, call it from nvgpu_channel_close_linux()
Jira NVGPU-397
Jira NVGPU-415
Change-Id: Ifb429e49b8f7a1c9e2bc757f3efdd50b28ceca1f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1603909
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/channel.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/channel.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/channel.h b/drivers/gpu/nvgpu/common/linux/channel.h index a4df75d6..35be425a 100644 --- a/drivers/gpu/nvgpu/common/linux/channel.h +++ b/drivers/gpu/nvgpu/common/linux/channel.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define __NVGPU_CHANNEL_H__ | 17 | #define __NVGPU_CHANNEL_H__ |
18 | 18 | ||
19 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
20 | #include <linux/dma-buf.h> | ||
20 | 21 | ||
21 | #include <nvgpu/types.h> | 22 | #include <nvgpu/types.h> |
22 | 23 | ||
@@ -56,6 +57,8 @@ struct nvgpu_channel_linux { | |||
56 | 57 | ||
57 | struct nvgpu_channel_completion_cb completion_cb; | 58 | struct nvgpu_channel_completion_cb completion_cb; |
58 | struct nvgpu_error_notifier error_notifier; | 59 | struct nvgpu_error_notifier error_notifier; |
60 | |||
61 | struct dma_buf *cyclestate_buffer_handler; | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | int nvgpu_init_channel_support_linux(struct nvgpu_os_linux *l); | 64 | int nvgpu_init_channel_support_linux(struct nvgpu_os_linux *l); |