mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: vf: init gmmu related structure
vf driver implements gmmu map/unmap on client side. - adds helper function to check whether nvgpu device is vf or legacy vgpu. - inits pd_cache struct for vf - inits platform->phys_addr for ipa2pa Jira GVSCI-15733 Change-Id: I46c84f0acdd167b9c4bdcec2f1c25f3acd6a0f71 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863430 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: Prathap Kumar Valsan <prathapk@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
de0e1be1ed
commit
a7d358f773
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Virtualized GPU for Linux
|
||||
*
|
||||
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -95,6 +95,7 @@ static void vgpu_init_vars(struct gk20a *g, struct gk20a_platform *platform)
|
||||
nvgpu_mutex_init(&g->clk_arb_enable_lock);
|
||||
nvgpu_mutex_init(&g->cg_pg_lock);
|
||||
nvgpu_rwsem_init(&g->deterministic_busy);
|
||||
nvgpu_rwsem_init(&(g->ipa_pa_cache.ipa_pa_rw_lock));
|
||||
|
||||
nvgpu_mutex_init(&priv->vgpu_clk_get_freq_lock);
|
||||
|
||||
@@ -117,6 +118,11 @@ static void vgpu_init_vars(struct gk20a *g, struct gk20a_platform *platform)
|
||||
platform->unified_memory);
|
||||
nvgpu_set_enabled(g, NVGPU_MM_UNIFY_ADDRESS_SPACES,
|
||||
platform->unify_address_spaces);
|
||||
|
||||
if (nvgpu_is_vf(g)) {
|
||||
/* only VF needs IPA2PA */
|
||||
nvgpu_init_soc_vars(g);
|
||||
}
|
||||
}
|
||||
|
||||
static int vgpu_init_support(struct platform_device *pdev)
|
||||
|
||||
Reference in New Issue
Block a user