gpu: nvgpu: remove max_ctxsw_ring_buffer_size from nvgpu_gr

max_ctxsw_ring_buffer_size variable in struct nvgpu_gr is used to store
max ring buffer size which is then referred into linux specific code

We only use macro GK20A_CTXSW_TRACE_MAX_VM_RING_SIZE to initialize
the variable.

And max_ctxsw_ring_buffer_size does not belong to nvgpu_gr struct
anyways

Considering above remove max_ctxsw_ring_buffer_size from nvgpu_gr and
use macro directly in linux specific code

Jira NVGPU-3125

Change-Id: Ibed9901d2bde35633d9ad0df8bd08b414e075bf4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2105653
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2019-04-25 14:45:49 +05:30
committed by mobile promotions
parent c474f7c288
commit 0271ffd77b
4 changed files with 3 additions and 7 deletions

View File

@@ -81,8 +81,6 @@ struct nvgpu_gr {
u32 fbp_en_mask; u32 fbp_en_mask;
u32 *fbp_rop_l2_en_mask; u32 *fbp_rop_l2_en_mask;
u32 max_ctxsw_ring_buffer_size;
struct nvgpu_mutex ctxsw_disable_mutex; struct nvgpu_mutex ctxsw_disable_mutex;
int ctxsw_disable_count; int ctxsw_disable_count;
}; };

View File

@@ -35,8 +35,6 @@
#include "os_linux.h" #include "os_linux.h"
#include "fecs_trace_linux.h" #include "fecs_trace_linux.h"
#define GK20A_CTXSW_TRACE_MAX_VM_RING_SIZE (128*PAGE_SIZE)
/* Userland-facing FIFO (one global + eventually one per VM) */ /* Userland-facing FIFO (one global + eventually one per VM) */
struct gk20a_ctxsw_dev { struct gk20a_ctxsw_dev {
struct gk20a *g; struct gk20a *g;
@@ -602,8 +600,6 @@ int gk20a_ctxsw_trace_init(struct gk20a *g)
if (unlikely(err)) if (unlikely(err))
goto fail; goto fail;
g->gr->max_ctxsw_ring_buffer_size = GK20A_CTXSW_TRACE_MAX_VM_RING_SIZE;
return 0; return 0;
fail: fail:

View File

@@ -26,6 +26,7 @@
#include <nvgpu/types.h> #include <nvgpu/types.h>
#define GK20A_CTXSW_TRACE_NUM_DEVS 1 #define GK20A_CTXSW_TRACE_NUM_DEVS 1
#define GK20A_CTXSW_TRACE_MAX_VM_RING_SIZE (128*PAGE_SIZE)
struct file; struct file;
struct inode; struct inode;

View File

@@ -54,6 +54,7 @@
#include "dmabuf.h" #include "dmabuf.h"
#include "channel.h" #include "channel.h"
#include "dmabuf_vidmem.h" #include "dmabuf_vidmem.h"
#include "fecs_trace_linux.h"
#define HZ_TO_MHZ(a) ((a > 0xF414F9CD7ULL) ? 0xffff : (a >> 32) ? \ #define HZ_TO_MHZ(a) ((a > 0xF414F9CD7ULL) ? 0xffff : (a >> 32) ? \
(u32) ((a * 0x10C8ULL) >> 32) : (u16) ((u32) a/MHZ)) (u32) ((a * 0x10C8ULL) >> 32) : (u16) ((u32) a/MHZ))
@@ -337,7 +338,7 @@ gk20a_ctrl_ioctl_gpu_characteristics(
gpu.sm_arch_warp_count = g->params.sm_arch_warp_count; gpu.sm_arch_warp_count = g->params.sm_arch_warp_count;
gpu.max_css_buffer_size = g->ops.css.get_max_buffer_size(g);; gpu.max_css_buffer_size = g->ops.css.get_max_buffer_size(g);;
gpu.max_ctxsw_ring_buffer_size = g->gr->max_ctxsw_ring_buffer_size; gpu.max_ctxsw_ring_buffer_size = GK20A_CTXSW_TRACE_MAX_VM_RING_SIZE;
gpu.gpu_ioctl_nr_last = NVGPU_GPU_IOCTL_LAST; gpu.gpu_ioctl_nr_last = NVGPU_GPU_IOCTL_LAST;
gpu.tsg_ioctl_nr_last = NVGPU_TSG_IOCTL_LAST; gpu.tsg_ioctl_nr_last = NVGPU_TSG_IOCTL_LAST;