diff options
author | Seema Khowala <seemaj@nvidia.com> | 2016-10-11 14:16:30 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-25 23:04:28 -0400 |
commit | 06bad79189543d5402baaa9ae6bb9d8319cd0908 (patch) | |
tree | 2b4b4e69e350145368f368e7e6ff64be413863d9 /drivers | |
parent | f00a98154ecaddf849b283dd5b7cbda0f6c8f90f (diff) |
gpu: nvgpu: gv11b: bl compression
updated mmu pte kind
JIRA GV11B-8
Change-Id: I2baff42e077411a9c72b0d10739f4a45d4bd79a7
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: http://git-master/r/1234567
GVS: Gerrit_Virtual_Submit
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index 097bc21d..fb31d6a8 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c | |||
@@ -22,7 +22,60 @@ | |||
22 | 22 | ||
23 | #include "hw_gmmu_gv11b.h" | 23 | #include "hw_gmmu_gv11b.h" |
24 | 24 | ||
25 | static void gv11b_init_uncompressed_kind_map(void) | ||
26 | { | ||
27 | gk20a_uc_kind_map[gmmu_pte_kind_c32_ms2_4cbra_v()] = | ||
28 | gk20a_uc_kind_map[gmmu_pte_kind_c64_ms2_4cbra_v()] = | ||
29 | gmmu_pte_kind_generic_16bx2_v(); | ||
30 | } | ||
31 | |||
32 | static bool gv11b_kind_supported(u8 k) | ||
33 | { | ||
34 | return (k == gmmu_pte_kind_c32_ms2_4cbra_v() | ||
35 | || k == gmmu_pte_kind_c64_ms2_4cbra_v()); | ||
36 | } | ||
37 | |||
38 | static bool gv11b_kind_z(u8 k) | ||
39 | { | ||
40 | return (k == gmmu_pte_kind_c32_ms2_4cbra_v() | ||
41 | || k == gmmu_pte_kind_c64_ms2_4cbra_v()); | ||
42 | } | ||
43 | |||
44 | static bool gv11b_kind_compressible(u8 k) | ||
45 | { | ||
46 | |||
47 | return (k == gmmu_pte_kind_c32_ms2_4cbra_v() | ||
48 | || k == gmmu_pte_kind_c64_ms2_4cbra_v()); | ||
49 | } | ||
50 | |||
51 | static bool gv11b_kind_zbc(u8 k) | ||
52 | { | ||
53 | |||
54 | return (k == gmmu_pte_kind_c32_ms2_4cbra_v() | ||
55 | || k == gmmu_pte_kind_c64_ms2_4cbra_v()); | ||
56 | } | ||
57 | |||
58 | static void gv11b_init_kind_attr(void) | ||
59 | { | ||
60 | u16 k; | ||
61 | |||
62 | for (k = 0; k < 256; k++) { | ||
63 | if (gv11b_kind_supported((u8)k)) | ||
64 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_SUPPORTED; | ||
65 | if (gv11b_kind_compressible((u8)k)) | ||
66 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_COMPRESSIBLE; | ||
67 | if (gv11b_kind_z((u8)k)) | ||
68 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_Z; | ||
69 | if (gv11b_kind_zbc((u8)k)) | ||
70 | gk20a_kind_attr[k] |= GK20A_KIND_ATTR_ZBC; | ||
71 | } | ||
72 | } | ||
73 | |||
25 | void gv11b_init_fb(struct gpu_ops *gops) | 74 | void gv11b_init_fb(struct gpu_ops *gops) |
26 | { | 75 | { |
27 | gp10b_init_fb(gops); | 76 | gp10b_init_fb(gops); |
77 | |||
78 | gv11b_init_uncompressed_kind_map(); | ||
79 | gv11b_init_kind_attr(); | ||
80 | |||
28 | } | 81 | } |