From 4c451b06bd0b771da2ff4612626a81adea0e3be2 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 7 Nov 2017 10:41:09 -0800 Subject: gpu: nvgpu: Move max_css_buffer_size to gr_gk20a max_css_buffer_size was accessed directly from GPU characteristics, which added a dependency to Linux. Move the field to gr_gk20a and copy it to GPU characteristics at query time. JIRA NVGPU-259 Change-Id: Ied19e33bf1a79a9ce45e33df57fe5bbe3a3c4f9d Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1593689 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu Reviewed-by: Peter Daifuku GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c') diff --git a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c index fca6525a..0e440241 100644 --- a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c +++ b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c @@ -35,11 +35,10 @@ void vgpu_gr_gm20b_init_cyclestats(struct gk20a *g) /* cyclestats not supported on vgpu */ __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, false); - g->gpu_characteristics.max_css_buffer_size = - vgpu_css_get_buffer_size(g); + g->gr.max_css_buffer_size = vgpu_css_get_buffer_size(g); /* snapshots not supported if the buffer size is 0 */ - if (g->gpu_characteristics.max_css_buffer_size == 0) + if (g->gr.max_css_buffer_size == 0) snapshots_supported = false; __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT, -- cgit v1.2.2