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/gk20a/channel_gk20a.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 87ab6202..9d294399 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -253,10 +253,9 @@ struct channel_gk20a { #if defined(CONFIG_GK20A_CYCLE_STATS) struct { - void *cyclestate_buffer; - u32 cyclestate_buffer_size; - struct dma_buf *cyclestate_buffer_handler; - struct nvgpu_mutex cyclestate_buffer_mutex; + void *cyclestate_buffer; + u32 cyclestate_buffer_size; + struct nvgpu_mutex cyclestate_buffer_mutex; } cyclestate; struct nvgpu_mutex cs_client_mutex; @@ -370,7 +369,6 @@ int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c, unsigned int num_entries, unsigned int num_inflight_jobs, u32 flags); -void gk20a_channel_free_cycle_stats_buffer(struct channel_gk20a *ch); void gk20a_channel_timeout_restart_all_channels(struct gk20a *g); -- cgit v1.2.2