diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-31 17:43:11 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-11 17:16:46 -0400 |
commit | 63b74d4b768e0c96367d4983fdd8f1db1d317d01 (patch) | |
tree | 3966af83cf9abdf687667afe120cc6648a9ed360 /drivers/gpu/nvgpu/gp10b/fb_gp10b.c | |
parent | 83e49b39181a86d32f6350c65659b5892f8f7670 (diff) |
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 <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1533350
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/fb_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fb_gp10b.c | 18 |
1 files changed, 4 insertions, 14 deletions
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 @@ | |||
20 | 20 | ||
21 | #include <nvgpu/hw/gp10b/hw_gmmu_gp10b.h> | 21 | #include <nvgpu/hw/gp10b/hw_gmmu_gp10b.h> |
22 | 22 | ||
23 | static noinline_for_stack void gp10b_init_uncompressed_kind_map(void) | 23 | noinline_for_stack void gp10b_init_uncompressed_kind_map(void) |
24 | { | 24 | { |
25 | int i; | 25 | int i; |
26 | 26 | ||
@@ -438,7 +438,7 @@ static noinline_for_stack bool gp10b_kind_zbc(u8 k) | |||
438 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); | 438 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); |
439 | } | 439 | } |
440 | 440 | ||
441 | static void gp10b_init_kind_attr(void) | 441 | void gp10b_init_kind_attr(void) |
442 | { | 442 | { |
443 | u16 k; | 443 | u16 k; |
444 | 444 | ||
@@ -456,22 +456,12 @@ static void gp10b_init_kind_attr(void) | |||
456 | } | 456 | } |
457 | } | 457 | } |
458 | 458 | ||
459 | static unsigned int gp10b_fb_compression_page_size(struct gk20a *g) | 459 | unsigned int gp10b_fb_compression_page_size(struct gk20a *g) |
460 | { | 460 | { |
461 | return SZ_64K; | 461 | return SZ_64K; |
462 | } | 462 | } |
463 | 463 | ||
464 | static unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) | 464 | unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) |
465 | { | 465 | { |
466 | return SZ_4K; | 466 | return SZ_4K; |
467 | } | 467 | } |
468 | |||
469 | void gp10b_init_fb(struct gpu_ops *gops) | ||
470 | { | ||
471 | gm20b_init_fb(gops); | ||
472 | gops->fb.compression_page_size = gp10b_fb_compression_page_size; | ||
473 | gops->fb.compressible_page_size = gp10b_fb_compressible_page_size; | ||
474 | |||
475 | gp10b_init_uncompressed_kind_map(); | ||
476 | gp10b_init_kind_attr(); | ||
477 | } | ||