summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-30 13:31:31 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-07 13:35:24 -0400
commit858a204362a385f076b057b6196fd89f7edb839b (patch)
treeb0f8dc16d297b406e398f02d2ae4b8077cf65fe0 /drivers/gpu/nvgpu/gp106
parent997ea5cef3dcd55b2281a7a8dcf452b743bc01f3 (diff)
gpu: nvgpu: Reorg cde HAL initialization
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the cde sub-module of the gpu_ops struct. Perform HAL function assignments in hal_gxxxx.c through the population of a chip-specific copy of gpu_ops. Jira NVGPU-74 Change-Id: I9343ce4985eb941a2610f5f11e8f01269ab68481 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master/r/1511673 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index a13889ad..555a2192 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -239,6 +239,11 @@ static const struct gpu_ops gp106_ops = {
239 .pg_gr_load_gating_prod = 239 .pg_gr_load_gating_prod =
240 gr_gp106_pg_gr_load_gating_prod, 240 gr_gp106_pg_gr_load_gating_prod,
241 }, 241 },
242 .cde = {
243 .get_program_numbers = gp10b_cde_get_program_numbers,
244 .need_scatter_buffer = gp10b_need_scatter_buffer,
245 .populate_scatter_buffer = gp10b_populate_scatter_buffer,
246 },
242 .xve = { 247 .xve = {
243 .sw_init = xve_sw_init_gp106, 248 .sw_init = xve_sw_init_gp106,
244 .get_speed = xve_get_speed_gp106, 249 .get_speed = xve_get_speed_gp106,
@@ -268,6 +273,7 @@ int gp106_init_hal(struct gk20a *g)
268 273
269 gops->ltc = gp106_ops.ltc; 274 gops->ltc = gp106_ops.ltc;
270 gops->clock_gating = gp106_ops.clock_gating; 275 gops->clock_gating = gp106_ops.clock_gating;
276 gops->cde = gp106_ops.cde;
271 gops->xve = gp106_ops.xve; 277 gops->xve = gp106_ops.xve;
272 278
273 /* Lone functions */ 279 /* Lone functions */
@@ -296,7 +302,6 @@ int gp106_init_hal(struct gk20a *g)
296 gp106_init_clk_ops(gops); 302 gp106_init_clk_ops(gops);
297 gp106_init_clk_arb_ops(gops); 303 gp106_init_clk_arb_ops(gops);
298 gp106_init_regops(gops); 304 gp106_init_regops(gops);
299 gp10b_init_cde_ops(gops);
300 gk20a_init_tsg_ops(gops); 305 gk20a_init_tsg_ops(gops);
301 gk20a_init_pramin_ops(gops); 306 gk20a_init_pramin_ops(gops);
302#if defined(CONFIG_GK20A_CYCLE_STATS) 307#if defined(CONFIG_GK20A_CYCLE_STATS)