diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
4 files changed, 84 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu.h b/drivers/gpu/nvgpu/include/nvgpu/pmu.h index 5e34abe6..76a54fa1 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmu.h | |||
@@ -306,6 +306,8 @@ struct nvgpu_pmu { | |||
306 | /* TBD: remove this if ZBC seq is fixed */ | 306 | /* TBD: remove this if ZBC seq is fixed */ |
307 | struct nvgpu_mem seq_buf; | 307 | struct nvgpu_mem seq_buf; |
308 | struct nvgpu_mem trace_buf; | 308 | struct nvgpu_mem trace_buf; |
309 | struct nvgpu_mem super_surface_buf; | ||
310 | |||
309 | bool buf_loaded; | 311 | bool buf_loaded; |
310 | 312 | ||
311 | struct pmu_sha1_gid gid_info; | 313 | struct pmu_sha1_gid gid_info; |
@@ -449,6 +451,8 @@ int nvgpu_init_pmu_support(struct gk20a *g); | |||
449 | int nvgpu_pmu_destroy(struct gk20a *g); | 451 | int nvgpu_pmu_destroy(struct gk20a *g); |
450 | int nvgpu_pmu_process_init_msg(struct nvgpu_pmu *pmu, | 452 | int nvgpu_pmu_process_init_msg(struct nvgpu_pmu *pmu, |
451 | struct pmu_msg *msg); | 453 | struct pmu_msg *msg); |
454 | int nvgpu_pmu_super_surface_alloc(struct gk20a *g, | ||
455 | struct nvgpu_mem *mem_surface, u32 size); | ||
452 | 456 | ||
453 | void nvgpu_pmu_state_change(struct gk20a *g, u32 pmu_state, | 457 | void nvgpu_pmu_state_change(struct gk20a *g, u32 pmu_state, |
454 | bool post_change_event); | 458 | bool post_change_event); |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmu_super_surf_if.h b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmu_super_surf_if.h new file mode 100644 index 00000000..cf39658f --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmu_super_surf_if.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | #ifndef __GPMU_SUPER_SURF_IF_H__ | ||
23 | #define __GPMU_SUPER_SURF_IF_H__ | ||
24 | |||
25 | struct nv_pmu_super_surface_hdr { | ||
26 | u32 memberMask; | ||
27 | u16 dmemBufferSizeMax; | ||
28 | }; | ||
29 | |||
30 | NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_super_surface_hdr, | ||
31 | sizeof(struct nv_pmu_super_surface_hdr)); | ||
32 | |||
33 | /* | ||
34 | * Global Super Surface structure for combined INIT data required by PMU. | ||
35 | * NOTE: Any new substructures or entries must be aligned. | ||
36 | */ | ||
37 | struct nv_pmu_super_surface { | ||
38 | union nv_pmu_super_surface_hdr_aligned hdr; | ||
39 | |||
40 | struct { | ||
41 | struct nv_pmu_volt_volt_device_boardobj_grp_set volt_device_grp_set; | ||
42 | struct nv_pmu_volt_volt_policy_boardobj_grp_set volt_policy_grp_set; | ||
43 | struct nv_pmu_volt_volt_rail_boardobj_grp_set volt_rail_grp_set; | ||
44 | |||
45 | struct nv_pmu_volt_volt_policy_boardobj_grp_get_status volt_policy_grp_get_status; | ||
46 | struct nv_pmu_volt_volt_rail_boardobj_grp_get_status volt_rail_grp_get_status; | ||
47 | struct nv_pmu_volt_volt_device_boardobj_grp_get_status volt_device_grp_get_status; | ||
48 | } volt; | ||
49 | struct { | ||
50 | struct nv_pmu_clk_clk_vin_device_boardobj_grp_set clk_vin_device_grp_set; | ||
51 | struct nv_pmu_clk_clk_domain_boardobj_grp_set clk_domain_grp_set; | ||
52 | struct nv_pmu_clk_clk_freq_controller_boardobj_grp_set clk_freq_controller_grp_set; | ||
53 | struct nv_pmu_clk_clk_fll_device_boardobj_grp_set clk_fll_device_grp_set; | ||
54 | struct nv_pmu_clk_clk_prog_boardobj_grp_set clk_prog_grp_set; | ||
55 | struct nv_pmu_clk_clk_vf_point_boardobj_grp_set clk_vf_point_grp_set; | ||
56 | |||
57 | struct nv_pmu_clk_clk_vin_device_boardobj_grp_get_status clk_vin_device_grp_get_status; | ||
58 | struct nv_pmu_clk_clk_fll_device_boardobj_grp_get_status clk_fll_device_grp_get_status; | ||
59 | struct nv_pmu_clk_clk_vf_point_boardobj_grp_get_status clk_vf_point_grp_get_status; | ||
60 | u8 clk_rsvd[0x4660]; | ||
61 | } clk; | ||
62 | struct { | ||
63 | struct nv_pmu_perf_vfe_equ_boardobj_grp_set vfe_equ_grp_set; | ||
64 | struct nv_pmu_perf_vfe_var_boardobj_grp_set vfe_var_grp_set; | ||
65 | |||
66 | struct nv_pmu_perf_vfe_var_boardobj_grp_get_status vfe_var_grp_get_status; | ||
67 | u8 perf_rsvd[0x40790]; | ||
68 | u8 perfcf_rsvd[0x1eb0]; | ||
69 | } perf; | ||
70 | struct { | ||
71 | struct nv_pmu_therm_therm_channel_boardobj_grp_set therm_channel_grp_set; | ||
72 | struct nv_pmu_therm_therm_device_boardobj_grp_set therm_device_grp_set; | ||
73 | u8 therm_rsvd[0x1460]; | ||
74 | } therm; | ||
75 | }; | ||
76 | |||
77 | #endif /* __GPMU_SUPER_SURF_IF_H__ */ | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuif_pmu.h b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuif_pmu.h index 5f718dc6..2dd511de 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuif_pmu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuif_pmu.h | |||
@@ -66,8 +66,8 @@ struct pmu_cmdline_args_v6 { | |||
66 | u8 raise_priv_sec; | 66 | u8 raise_priv_sec; |
67 | struct flcn_mem_desc_v0 gc6_ctx; | 67 | struct flcn_mem_desc_v0 gc6_ctx; |
68 | struct flcn_mem_desc_v0 gc6_bsod_ctx; | 68 | struct flcn_mem_desc_v0 gc6_bsod_ctx; |
69 | struct flcn_mem_desc_v0 init_data_dma_info; | 69 | struct flcn_mem_desc_v0 super_surface; |
70 | u32 dummy; | 70 | u32 flags; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | /* GPU ID */ | 73 | /* GPU ID */ |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h b/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h index 208644d7..1a05ec29 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "gpmuiftherm.h" | 38 | #include "gpmuiftherm.h" |
39 | #include "gpmuifthermsensor.h" | 39 | #include "gpmuifthermsensor.h" |
40 | #include "gpmuifseq.h" | 40 | #include "gpmuifseq.h" |
41 | #include "gpmu_super_surf_if.h" | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Command requesting execution of the RPC (Remote Procedure Call) | 44 | * Command requesting execution of the RPC (Remote Procedure Call) |