mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: units: pramin build issues for dGPU
Fix pramin related build issues in unit tests, when enabling dGPU in safety build. pram_data032_r is now defined as a macro which cannot be used to initialize g->ops.pramin.data032_r in unit tests. Instead, use nvgpu_pramin_ops_init, and check that g->ops.pramin.data032_r is non NULL. Jira NVGPU-4661 Change-Id: I33522fc42bfe5f8c23b579126a21680fd5880fd8 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2314206 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
0c23bf57ea
commit
0fa55ffac9
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <hal/bus/bus_gk20a.h>
|
||||
#include <hal/mm/gmmu/gmmu_gp10b.h>
|
||||
#include <hal/pramin/pramin_init.h>
|
||||
#include <nvgpu/hw/gk20a/hw_pram_gk20a.h>
|
||||
|
||||
#include "buddy_allocator.h"
|
||||
@@ -79,7 +80,8 @@ static struct vm_gk20a *init_vm_env(struct unit_module *m, struct gk20a *g,
|
||||
#ifdef CONFIG_NVGPU_DGPU
|
||||
/* Minimum HAL init for PRAMIN */
|
||||
g->ops.bus.set_bar0_window = gk20a_bus_set_bar0_window;
|
||||
g->ops.pramin.data032_r = pram_data032_r;
|
||||
nvgpu_pramin_ops_init(g);
|
||||
unit_assert(g->ops.pramin.data032_r != NULL, return NULL);
|
||||
#endif
|
||||
|
||||
/* vm should init with SYSMEM */
|
||||
|
||||
Reference in New Issue
Block a user