summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-05-31 18:33:50 -0400
committerTejal Kudav <tkudav@nvidia.com>2018-06-14 09:44:06 -0400
commit328a7bd3ffc9590c0c432724d45da9f25732c2a1 (patch)
tree12edca4ddd00dc8adf39a7267a63da7bf180f151 /drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
parent85b920442a617f47a7ef1f6c314c8096c2708574 (diff)
gpu: nvgpu: initialze bundle64 state
We receive bundle with address and 64 bit values from ucode on some platforms This patch adds the support to handle 64 bit values Add struct av64_gk20a to store an address and corresponding 64 bit value Add struct av64_list_gk20a to store count and list of av64_gk20a Add API alloc_av64_list_gk20a() to allocate the list that supports 64bit values In gr_gk20a_init_ctx_vars_fw(), if we see NETLIST_REGIONID_SW_BUNDLE64_INIT, load the bundle64 state into above local structures Add new HAL gops.gr.init_sw_bundle64() and call it from gk20a_init_sw_bundle() if defined Also load the bundle for simulation cases in gr_gk20a_init_ctx_vars_sim() Jira NVGPUT-96 Change-Id: I1ab7fb37ff91c5fbd968c93d714725b01fd4f59b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1736450 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
index afc3e9df..10f8723f 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
@@ -105,6 +105,7 @@ union __max_name {
105#define NETLIST_REGIONID_CTXREG_PMROP 31 105#define NETLIST_REGIONID_CTXREG_PMROP 31
106#define NETLIST_REGIONID_CTXREG_PMUCGPC 32 106#define NETLIST_REGIONID_CTXREG_PMUCGPC 32
107#define NETLIST_REGIONID_CTXREG_ETPC 33 107#define NETLIST_REGIONID_CTXREG_ETPC 33
108#define NETLIST_REGIONID_SW_BUNDLE64_INIT 34
108#define NETLIST_REGIONID_NVPERF_PMCAU 35 109#define NETLIST_REGIONID_NVPERF_PMCAU 35
109 110
110struct netlist_region { 111struct netlist_region {
@@ -127,6 +128,11 @@ struct av_gk20a {
127 u32 addr; 128 u32 addr;
128 u32 value; 129 u32 value;
129}; 130};
131struct av64_gk20a {
132 u32 addr;
133 u32 value_lo;
134 u32 value_hi;
135};
130struct aiv_gk20a { 136struct aiv_gk20a {
131 u32 addr; 137 u32 addr;
132 u32 index; 138 u32 index;
@@ -140,6 +146,10 @@ struct av_list_gk20a {
140 struct av_gk20a *l; 146 struct av_gk20a *l;
141 u32 count; 147 u32 count;
142}; 148};
149struct av64_list_gk20a {
150 struct av64_gk20a *l;
151 u32 count;
152};
143struct u32_list_gk20a { 153struct u32_list_gk20a {
144 u32 *l; 154 u32 *l;
145 u32 count; 155 u32 count;
@@ -158,6 +168,13 @@ struct av_gk20a *alloc_av_list_gk20a(struct gk20a *g, struct av_list_gk20a *avl)
158} 168}
159 169
160static inline 170static inline
171struct av64_gk20a *alloc_av64_list_gk20a(struct gk20a *g, struct av64_list_gk20a *avl)
172{
173 avl->l = nvgpu_kzalloc(g, avl->count * sizeof(*avl->l));
174 return avl->l;
175}
176
177static inline
161struct aiv_gk20a *alloc_aiv_list_gk20a(struct gk20a *g, 178struct aiv_gk20a *alloc_aiv_list_gk20a(struct gk20a *g,
162 struct aiv_list_gk20a *aivl) 179 struct aiv_list_gk20a *aivl)
163{ 180{