diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-04-06 09:04:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-10 14:23:07 -0400 |
commit | 19aa748be53787da6abe435ea7043a7827d0fde0 (patch) | |
tree | d4588653f031bb0ca4410e287ce0ef291e455422 /drivers/gpu/nvgpu/include | |
parent | 4314771142e0b68810b8fa86ec45b6f6b4e24651 (diff) |
gpu: nvgpu: add support to get unicast addresses on volta
We have new broadcast registers on Volta, and we need to generate correct
unicast addresses for them so that we can write those registers to context image
Add new GR HAL create_priv_addr_table() to do this conversion
Set gr_gk20a_create_priv_addr_table() for older chips
Set gr_gv11b_create_priv_addr_table() for Volta
gr_gv11b_create_priv_addr_table() will use the broadcast flags and then generate
appriate list of unicast register for each broadcast register
Bug 200398811
Jira NVGPU-556
Change-Id: Id53a9e56106d200fe560ffc93394cc0e976f455f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1690027
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_perf_gv100.h | 26 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h | 26 |
2 files changed, 50 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_perf_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_perf_gv100.h index 4fbe37cb..268efc52 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_perf_gv100.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_perf_gv100.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -56,6 +56,30 @@ | |||
56 | #ifndef _hw_perf_gv100_h_ | 56 | #ifndef _hw_perf_gv100_h_ |
57 | #define _hw_perf_gv100_h_ | 57 | #define _hw_perf_gv100_h_ |
58 | 58 | ||
59 | static inline u32 perf_pmmgpc_perdomain_offset_v(void) | ||
60 | { | ||
61 | return 0x00000200U; | ||
62 | } | ||
63 | static inline u32 perf_pmmgpc_base_v(void) | ||
64 | { | ||
65 | return 0x00180000U; | ||
66 | } | ||
67 | static inline u32 perf_pmmgpc_extent_v(void) | ||
68 | { | ||
69 | return 0x00183fffU; | ||
70 | } | ||
71 | static inline u32 perf_pmmsys_base_v(void) | ||
72 | { | ||
73 | return 0x00240000U; | ||
74 | } | ||
75 | static inline u32 perf_pmmsys_extent_v(void) | ||
76 | { | ||
77 | return 0x00243fffU; | ||
78 | } | ||
79 | static inline u32 perf_pmmfbp_base_v(void) | ||
80 | { | ||
81 | return 0x00200000U; | ||
82 | } | ||
59 | static inline u32 perf_pmasys_control_r(void) | 83 | static inline u32 perf_pmasys_control_r(void) |
60 | { | 84 | { |
61 | return 0x0024a000U; | 85 | return 0x0024a000U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h index 788a6ab6..1d4b2c16 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -56,6 +56,30 @@ | |||
56 | #ifndef _hw_perf_gv11b_h_ | 56 | #ifndef _hw_perf_gv11b_h_ |
57 | #define _hw_perf_gv11b_h_ | 57 | #define _hw_perf_gv11b_h_ |
58 | 58 | ||
59 | static inline u32 perf_pmmgpc_perdomain_offset_v(void) | ||
60 | { | ||
61 | return 0x00000200U; | ||
62 | } | ||
63 | static inline u32 perf_pmmgpc_base_v(void) | ||
64 | { | ||
65 | return 0x00180000U; | ||
66 | } | ||
67 | static inline u32 perf_pmmgpc_extent_v(void) | ||
68 | { | ||
69 | return 0x00183fffU; | ||
70 | } | ||
71 | static inline u32 perf_pmmsys_base_v(void) | ||
72 | { | ||
73 | return 0x00240000U; | ||
74 | } | ||
75 | static inline u32 perf_pmmsys_extent_v(void) | ||
76 | { | ||
77 | return 0x00243fffU; | ||
78 | } | ||
79 | static inline u32 perf_pmmfbp_base_v(void) | ||
80 | { | ||
81 | return 0x00200000U; | ||
82 | } | ||
59 | static inline u32 perf_pmasys_control_r(void) | 83 | static inline u32 perf_pmasys_control_r(void) |
60 | { | 84 | { |
61 | return 0x0024a000U; | 85 | return 0x0024a000U; |