gpu: nvgpu: set l3_alloc hint based on L3 errata

If errata for L3 SCF cache not supported is set, then
force l3_alloc hint to false, so that L3 memory traffic
will not be generated from nvgpu driver.

Bug 3186312
Bug 3288192

Change-Id: Icf776673c2975fdc04cc02bfae28ef26c8deba4d
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2539599
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: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Seshendra Gadagottu
2021-06-03 17:30:07 -07:00
committed by mobile promotions
parent 4a3a9d46e3
commit ae243fa1eb

View File

@@ -36,6 +36,9 @@
#include <nvgpu/types.h> #include <nvgpu/types.h>
#include <nvgpu/gk20a.h> #include <nvgpu/gk20a.h>
#include <nvgpu/static_analysis.h> #include <nvgpu/static_analysis.h>
#if defined(CONFIG_NVGPU_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
#include <nvgpu/errata.h>
#endif
#ifdef CONFIG_NVGPU_TRACE #ifdef CONFIG_NVGPU_TRACE
#define nvgpu_gmmu_dbg(g, attrs, fmt, args...) \ #define nvgpu_gmmu_dbg(g, attrs, fmt, args...) \
@@ -953,6 +956,14 @@ u64 nvgpu_gmmu_map_locked(struct vm_gk20a *vm,
#endif #endif
attrs.l3_alloc = ((flags & NVGPU_VM_MAP_L3_ALLOC) != 0U); attrs.l3_alloc = ((flags & NVGPU_VM_MAP_L3_ALLOC) != 0U);
#if defined(CONFIG_NVGPU_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
if (nvgpu_is_errata_present(g, NVGPU_ERRATA_3288192) &&
(attrs.l3_alloc)) {
nvgpu_gmmu_dbg_v(g, &attrs,
"L3 alloc is requested when L3 cache is not supported");
attrs.l3_alloc = false;
}
#endif
/* /*
* Only allocate a new GPU VA range if we haven't already been passed a * Only allocate a new GPU VA range if we haven't already been passed a