From 858a204362a385f076b057b6196fd89f7edb839b Mon Sep 17 00:00:00 2001 From: Sunny He Date: Fri, 30 Jun 2017 10:31:31 -0700 Subject: 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 Reviewed-on: https://git-master/r/1511673 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gm20b/cde_gm20b.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/cde_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/cde_gm20b.c b/drivers/gpu/nvgpu/gm20b/cde_gm20b.c index d23ba8c5..f8267d1d 100644 --- a/drivers/gpu/nvgpu/gm20b/cde_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/cde_gm20b.c @@ -1,7 +1,7 @@ /* * GM20B CDE * - * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -26,7 +26,7 @@ enum programs { PROG_PASSTHROUGH = 6, }; -static void gm20b_cde_get_program_numbers(struct gk20a *g, +void gm20b_cde_get_program_numbers(struct gk20a *g, u32 block_height_log2, int *hprog_out, int *vprog_out) { @@ -46,8 +46,3 @@ static void gm20b_cde_get_program_numbers(struct gk20a *g, *hprog_out = hprog; *vprog_out = vprog; } - -void gm20b_init_cde_ops(struct gpu_ops *gops) -{ - gops->cde.get_program_numbers = gm20b_cde_get_program_numbers; -} -- cgit v1.2.2