From ce06f74d6ba9eb495661c29eabcd6da2f52c7c8b Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 23 Nov 2017 03:59:14 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1603909 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/channel.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu/common/linux/channel.h') 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 @@ #define __NVGPU_CHANNEL_H__ #include +#include #include @@ -56,6 +57,8 @@ struct nvgpu_channel_linux { struct nvgpu_channel_completion_cb completion_cb; struct nvgpu_error_notifier error_notifier; + + struct dma_buf *cyclestate_buffer_handler; }; int nvgpu_init_channel_support_linux(struct nvgpu_os_linux *l); -- cgit v1.2.2