From cc4b9f540f66abc9f60cf9f8e2217ff17349bc77 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Tue, 13 Feb 2018 14:37:18 +0530 Subject: gpu: nvgpu: PMU super surface support - Added ops "pmu.alloc_super_surface" to create memory space for pmu super surface - Defined method nvgpu_pmu_sysmem_surface_alloc() to allocate pmu super surface memory & assigned to "pmu.alloc_super_surface" for gv100 - "pmu.alloc_super_surface" set to NULL for gp106 - Memory space of size "struct nv_pmu_super_surface" is allocated during pmu sw init setup if "pmu.alloc_super_surface" is not NULL & free if error occur. - Added ops "pmu_ver.config_pmu_cmdline_args_super_surface" to describe PMU super surface details to PMU ucode as part of pmu command line args command if "pmu.alloc_super_surface" is not NULL. - Updated pmu_cmdline_args_v6 to include member "struct flcn_mem_desc_v0 super_surface" - Free allocated memory for PMU super surface in nvgpu_remove_pmu_support() method - Added "struct nvgpu_mem super_surface_buf" to "nvgpu_pmu" struct - Created header file "gpmu_super_surf_if.h" to include interface about pmu super surface, added "struct nv_pmu_super_surface" to hold super surface members along with rsvd[x] dummy space to sync members offset with PMU super surface members. Change-Id: I2b28912bf4d86a8cc72884e3b023f21c73fb3503 Signed-off-by: Mahantesh Kumbar Reviewed-on: https://git-master.nvidia.com/r/1656571 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/hal_gp106.c | 1 + drivers/gpu/nvgpu/gp106/sec2_gp106.c | 2 ++ 2 files changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu/gp106') diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index e3d5556f..b0eab947 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -611,6 +611,7 @@ static const struct gpu_ops gp106_ops = { .pmu_get_queue_tail = pwr_pmu_queue_tail_r, .pmu_lpwr_enable_pg = nvgpu_lpwr_enable_pg, .get_irqdest = gk20a_pmu_get_irqdest, + .alloc_super_surface = NULL, }, .clk = { .init_clk_support = gp106_init_clk_support, diff --git a/drivers/gpu/nvgpu/gp106/sec2_gp106.c b/drivers/gpu/nvgpu/gp106/sec2_gp106.c index 8e4e5900..08c7f84a 100644 --- a/drivers/gpu/nvgpu/gp106/sec2_gp106.c +++ b/drivers/gpu/nvgpu/gp106/sec2_gp106.c @@ -178,6 +178,8 @@ void init_pmu_setup_hw1(struct gk20a *g) g->ops.pmu_ver.set_pmu_cmdline_args_trace_dma_base(pmu); g->ops.pmu_ver.set_pmu_cmdline_args_trace_dma_idx( pmu, GK20A_PMU_DMAIDX_VIRT); + if (g->ops.pmu_ver.config_pmu_cmdline_args_super_surface) + g->ops.pmu_ver.config_pmu_cmdline_args_super_surface(pmu); nvgpu_flcn_copy_to_dmem(pmu->flcn, g->acr.pmu_args, (u8 *)(g->ops.pmu_ver.get_pmu_cmdline_args_ptr(pmu)), -- cgit v1.2.2