aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiawei Gu <[email protected]>2021-05-13 14:17:58 +0800
committerAlex Deucher <[email protected]>2021-05-19 22:33:58 -0400
commit5228cd65742abd2221d7bdb622544ac47e41d87c (patch)
tree6080f1ce8d2a47df9ca94b3772e051c5fd290d59
parentbf546940d5aa15852f58d59158965737505edc03 (diff)
drm/amdgpu: Fill adev->unique_id with data from PF2VF msg
Initialize unique_id from PF2VF under virtualization. V2: skip smu_get_unique_id() under virtualization Signed-off-by: Jiawei Gu <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c2
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index c64e583347c6..b71dd1deeb2d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -496,6 +496,8 @@ static int amdgpu_virt_read_pf2vf_data(struct amdgpu_device *adev)
if((adev->virt.decode_max_dimension_pixels > 0) || (adev->virt.encode_max_dimension_pixels > 0))
adev->virt.is_mm_bw_enabled = true;
+ adev->unique_id =
+ ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->uuid;
break;
default:
DRM_ERROR("invalid pf2vf version\n");
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 32dadeee9514..9243e5de5bb7 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -686,7 +686,8 @@ static int smu_late_init(void *handle)
return ret;
}
- smu_get_unique_id(smu);
+ if (!amdgpu_sriov_vf(adev))
+ smu_get_unique_id(smu);
smu_get_fan_parameters(smu);