mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: update hwmp map to account for checksum entries
Starting with nvgpu-next, the ctxsw ucode computes the checksum for each ctxsw'ed register list, this checksum is saved at the end of the same list; This entry will be given a special placeholder address 0x00ffffff, which can be used to distinguish it from other entries in the register list. There is only one checksum per list, even if it has multiple subunits. Hence, update "add_ctxsw_buffer_map_entries_subunits" to avoid adding checksum entires for each subunit within a list. Bug 2916121 Change-Id: Ia7abedc7467ae8158ce3e791a67765fb52889915 Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2457579 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Seshendra Gadagottu <sgadagottu@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
Alex Waterman
parent
05e3482106
commit
7930404740
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -38,6 +38,9 @@
|
||||
#define NV_PERF_PMMGPCROUTER_STRIDE 0x0200U
|
||||
#define NV_XBAR_MXBAR_PRI_GPC_GNIC_STRIDE 0x0020U
|
||||
|
||||
/* Dummy address for ctxsw'ed pri reg checksum. */
|
||||
#define CTXSW_PRI_CHECKSUM_DUMMY_REG 0x00ffffffU
|
||||
|
||||
int nvgpu_gr_hwpm_map_init(struct gk20a *g, struct nvgpu_gr_hwpm_map **hwpm_map,
|
||||
u32 size)
|
||||
{
|
||||
@@ -216,6 +219,22 @@ static int add_ctxsw_buffer_map_entries_subunits(
|
||||
(unit * stride);
|
||||
map[cnt++].offset = off;
|
||||
off += 4U;
|
||||
|
||||
/*
|
||||
* The ucode computes and saves the checksum of
|
||||
* all ctxsw'ed register values within a list.
|
||||
* Entries with addr=0x00ffffff are placeholder
|
||||
* for these checksums.
|
||||
*
|
||||
* There is only one checksum for a list
|
||||
* even if it contains multiple subunits. Hence,
|
||||
* skip iterating over all subunits for this
|
||||
* entry.
|
||||
*/
|
||||
if (regs->l[idx].addr ==
|
||||
CTXSW_PRI_CHECKSUM_DUMMY_REG) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user