From 63b74d4b768e0c96367d4983fdd8f1db1d317d01 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Mon, 31 Jul 2017 14:43:11 -0700 Subject: gpu: nvgpu: Reorg fb HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the fb 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: Ib746798b849810401c12abf5e9cce42d827c6fb1 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1533350 Reviewed-by: svccoveritychecker Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/fb_gp10b.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'drivers/gpu/nvgpu/gp10b/fb_gp10b.c') diff --git a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c index 8ba9ff8e..775dc5c9 100644 --- a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c @@ -20,7 +20,7 @@ #include -static noinline_for_stack void gp10b_init_uncompressed_kind_map(void) +noinline_for_stack void gp10b_init_uncompressed_kind_map(void) { int i; @@ -438,7 +438,7 @@ static noinline_for_stack bool gp10b_kind_zbc(u8 k) k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); } -static void gp10b_init_kind_attr(void) +void gp10b_init_kind_attr(void) { u16 k; @@ -456,22 +456,12 @@ static void gp10b_init_kind_attr(void) } } -static unsigned int gp10b_fb_compression_page_size(struct gk20a *g) +unsigned int gp10b_fb_compression_page_size(struct gk20a *g) { return SZ_64K; } -static unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) +unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) { return SZ_4K; } - -void gp10b_init_fb(struct gpu_ops *gops) -{ - gm20b_init_fb(gops); - gops->fb.compression_page_size = gp10b_fb_compression_page_size; - gops->fb.compressible_page_size = gp10b_fb_compressible_page_size; - - gp10b_init_uncompressed_kind_map(); - gp10b_init_kind_attr(); -} -- cgit v1.2.2