mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: ga10b, ga100: replace legacy pmasys control register
Starting from Ampere+ chips, PMASYS control register layout has been re-organized to support multiple PMA streaming channels. In accordance with this update perf HALs to replace legacy register with new registers. The mapping between the legacy register and new register fields can be found here: http://nvbugs/2332044/16. Jira NVGPU-6906 Bug 200737354 Change-Id: I4ed5af7be04f7e2b97a8bf500de3a04cf1e4834c Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2559392 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
493df6cb6e
commit
1782bb435b
@@ -274,13 +274,13 @@ const u32 *ga10b_perf_get_hwpm_fbp_perfmon_regs(u32 *count)
|
||||
bool ga10b_perf_get_membuf_overflow_status(struct gk20a *g)
|
||||
{
|
||||
const u32 st =
|
||||
perf_pmasys_channel_control_membuf_status_overflowed_f();
|
||||
perf_pmasys_channel_status_secure_membuf_status_overflowed_f();
|
||||
|
||||
nvgpu_assert(perf_pmasys_channel_control__size_1_v() ==
|
||||
nvgpu_assert(perf_pmasys_channel_status_secure__size_1_v() ==
|
||||
pmasys_channel_instance_max_size);
|
||||
|
||||
return st == (nvgpu_readl(g,
|
||||
perf_pmasys_channel_control_r(inst_zero)) & st);
|
||||
perf_pmasys_channel_status_secure_r(inst_zero)) & st);
|
||||
}
|
||||
|
||||
u32 ga10b_perf_get_membuf_pending_bytes(struct gk20a *g)
|
||||
@@ -311,7 +311,7 @@ void ga10b_perf_membuf_reset_streaming(struct gk20a *g)
|
||||
u32 num_unread_bytes;
|
||||
u32 i;
|
||||
|
||||
nvgpu_assert(perf_pmasys_channel_control__size_1_v() ==
|
||||
nvgpu_assert(perf_pmasys_channel_control_user__size_1_v() ==
|
||||
pmasys_channel_instance_max_size);
|
||||
nvgpu_assert(perf_pmasys_channel_mem_bytes__size_1_v() ==
|
||||
pmasys_channel_instance_max_size);
|
||||
@@ -322,9 +322,9 @@ void ga10b_perf_membuf_reset_streaming(struct gk20a *g)
|
||||
WARN_ON(0U ==
|
||||
(engine_status & perf_pmasys_enginestatus_rbufempty_empty_f()));
|
||||
|
||||
for (i = 0U; i < perf_pmasys_channel_control__size_1_v(); i++) {
|
||||
nvgpu_writel(g, perf_pmasys_channel_control_r(i),
|
||||
perf_pmasys_channel_control_membuf_clear_status_doit_f());
|
||||
for (i = 0U; i < perf_pmasys_channel_control_user__size_1_v(); i++) {
|
||||
nvgpu_writel(g, perf_pmasys_channel_control_user_r(i),
|
||||
perf_pmasys_channel_control_user_membuf_clear_status_doit_f());
|
||||
}
|
||||
|
||||
for (i = 0U; i < perf_pmasys_channel_mem_bytes__size_1_v(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user