Skip to contentSkip to conversation

drm/amdgpu: Fill adev->unique_id with data from PF2VF msg

PATCH In review Jiawei Gu 2 participants 2 messages May 14, 2021

Subsystems (3)
lore
Share & tools
lore

Jiawei Gu

author
#0 lore raw

PATCH 1/1 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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c  | 2 ++
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -0
index a57842689d42..96e269cbe326 100644
@@ -471,6 +471,8 @@ static int amdgpu_virt_read_pf2vf_data(struct amdgpu_device *adev)
 			((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->feature_flags.all;
 		adev->virt.reg_access =
 			((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->reg_access_flags.all;
+		adev->unique_id =
+			((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->uuid;
 
 		break;
 	default:
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
index 32dadeee9514..9243e5de5bb7 100644
@@ -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);
 
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jiawei Gu

Initialize unique_id from PF2VF under virtualization.

V2: skip smu_get_unique_id() under virtualization

Quoted 35 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c  | 2 ++
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -0
index a57842689d42..96e269cbe326 100644
@@ -471,6 +471,8 @@ static int amdgpu_virt_read_pf2vf_data(struct amdgpu_device *adev)
                        ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->feature_flags.all;
                adev->virt.reg_access =
                        ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->reg_access_flags.all;
+               adev->unique_id =
+                       ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->uuid;
 
                break;
        default:
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -2
index 32dadeee9514..9243e5de5bb7 100644
@@ -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);
 
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx