mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: skip physical instance dev nodes
On Linux, nvrm_gpu can open channel/tsg/address space only using ctrl node. This tricks nvrm_gpu into considering physical instance as actual available fGPU if ctrl node is exposed for physical instance. There is no current requirement to expose physical instance ctrl node. It might be needed later for profiling use cases. For now, skip dev node creation for physical instance. Jira NVGPU-5648 Change-Id: I23398ba993f97e2d2f344876c0c6b0c82b336402 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2439880 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
dbad874d9e
commit
67a68771d4
@@ -495,6 +495,17 @@ static bool check_valid_dev_node(struct gk20a *g, struct nvgpu_class *class,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool check_valid_class(struct gk20a *g, struct nvgpu_class *class)
|
||||
{
|
||||
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG)) {
|
||||
if (class->instance_type == NVGPU_MIG_TYPE_PHYSICAL) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int gk20a_user_init(struct device *dev)
|
||||
{
|
||||
int err;
|
||||
@@ -526,6 +537,10 @@ int gk20a_user_init(struct device *dev)
|
||||
l->cdev_region = devno;
|
||||
|
||||
nvgpu_list_for_each_entry(class, &l->class_list_head, nvgpu_class, list_entry) {
|
||||
if (!check_valid_class(g, class)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (cdev_index = 0; cdev_index < num_cdevs; cdev_index++) {
|
||||
if (!check_valid_dev_node(g, class, &dev_node_list[cdev_index])) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user