Skip to content

Commit 2031c46

Browse files
rajbharalexdeucher
authored andcommitted
drm/amdgpu: Hide xcp partition sysfs under SRIOV
XCP partitions should not be visible for the VF for GFXIP 9.4.3. Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e23b106 commit 2031c46

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,11 +863,15 @@ static int gfx_v9_4_3_sw_init(void *handle)
863863
if (r)
864864
return r;
865865

866-
r = amdgpu_gfx_sysfs_init(adev);
866+
r = amdgpu_gfx_ras_sw_init(adev);
867867
if (r)
868868
return r;
869869

870-
return amdgpu_gfx_ras_sw_init(adev);
870+
871+
if (!amdgpu_sriov_vf(adev))
872+
r = amdgpu_gfx_sysfs_init(adev);
873+
874+
return r;
871875
}
872876

873877
static int gfx_v9_4_3_sw_fini(void *handle)
@@ -888,7 +892,8 @@ static int gfx_v9_4_3_sw_fini(void *handle)
888892
gfx_v9_4_3_mec_fini(adev);
889893
amdgpu_bo_unref(&adev->gfx.rlc.clear_state_obj);
890894
gfx_v9_4_3_free_microcode(adev);
891-
amdgpu_gfx_sysfs_fini(adev);
895+
if (!amdgpu_sriov_vf(adev))
896+
amdgpu_gfx_sysfs_fini(adev);
892897

893898
return 0;
894899
}

0 commit comments

Comments
 (0)