Skip to contentSkip to conversation

drm/amdgpu: sriov should skip asic_reset in device_init

PATCH In review wentalou 2 participants 2 messages Jan 17, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

wentalou

author
#0 lore raw

PATCH 1/1 drm/amdgpu: sriov should skip asic_reset in device_init

sriov would meet guest driver load failure, if calling amdgpu_asic_reset in amdgpu_device_init. sriov should skip asic_reset in device_init.

Change-Id I6c03b2fcdbf29200fab09459bbffd87726047908
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 8a61764..e20dce4 100644
@@ -2553,7 +2553,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	/* check if we need to reset the asic
 	 *  E.g., driver was not cleanly unloaded previously, etc.
 	 */
-	if (amdgpu_asic_need_reset_on_init(adev)) {
+	if (!amdgpu_sriov_vf(adev) && amdgpu_asic_need_reset_on_init(adev)) {
 		r = amdgpu_asic_reset(adev);
 		if (r) {
 			dev_err(adev->dev, "asic reset on init failed\n");
Signature · 6 lines
2.7.4

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

A message that is not in the archive (sent off-list or not yet received): 1547718697-9290-1-git-send-email-Wentao.Lou-5C7GfCeVMHo@public.gmane.org

Acked-by
#2 lore raw
Quoted 7 lines · wentalou

sriov would meet guest driver load failure, if calling amdgpu_asic_reset in amdgpu_device_init. sriov should skip asic_reset in device_init.

Change-Id I6c03b2fcdbf29200fab09459bbffd87726047908
Quoted 20 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -2
index 8a61764..e20dce4 100644
@@ -2553,7 +2553,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
        /* check if we need to reset the asic
         *  E.g., driver was not cleanly unloaded previously, etc.
         */
-       if (amdgpu_asic_need_reset_on_init(adev)) {
+       if (!amdgpu_sriov_vf(adev) && amdgpu_asic_need_reset_on_init(adev)) {
                r = amdgpu_asic_reset(adev);
                if (r) {
                        dev_err(adev->dev, "asic reset on init failed\n");
--

2.7.4

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