gpu: nvgpu: vf: init syncpt mem

Since gmmu map is moved to VF, the syncpt mem map is also on VF clients.

Jira GVSCI-15733

Change-Id: Iaf68070da860616f5301a822ce98581b8a1a6629
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863445
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: svcacv <svcacv@nvidia.com>
Reviewed-by: Prathap Kumar Valsan <prathapk@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Richard Zhao
2023-01-25 10:18:29 -08:00
committed by mobile promotions
parent a7d358f773
commit a23e574de0
3 changed files with 18 additions and 2 deletions

View File

@@ -653,7 +653,7 @@ static int nvgpu_init_xve_set_speed(struct gk20a *g)
return 0; return 0;
} }
static int nvgpu_init_syncpt_mem(struct gk20a *g) int nvgpu_init_syncpt_mem(struct gk20a *g)
{ {
#if defined(CONFIG_TEGRA_GK20A_NVHOST) #if defined(CONFIG_TEGRA_GK20A_NVHOST)
int err; int err;

View File

@@ -298,5 +298,13 @@ int vgpu_finalize_poweron_common(struct gk20a *g)
return err; return err;
} }
if (nvgpu_is_vf(g)) {
err = nvgpu_init_syncpt_mem(g);
if (err != 0) {
nvgpu_err(g, "nvgpu_init_syncpt_mem failed");
return err;
}
}
return 0; return 0;
} }

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@@ -394,4 +394,12 @@ void gk20a_idle(struct gk20a *g);
*/ */
bool is_nvgpu_gpu_state_valid(struct gk20a *g); bool is_nvgpu_gpu_state_valid(struct gk20a *g);
/**
* @brief Init syncpt mem
*
* @param g [in] The GPU
* @return 0 in case of success
*/
int nvgpu_init_syncpt_mem(struct gk20a *g);
#endif /* NVGPU_INIT_H */ #endif /* NVGPU_INIT_H */