drm/amdgpu: Enable uvd and vce gpu re-init for SRIOV gpu reset
authorFrank Min <Frank.Min@amd.com>
Thu, 15 Jun 2017 12:07:36 +0000 (20:07 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2017 18:45:45 +0000 (14:45 -0400)
Add uvd and vce re-init after gpu reset.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

index 6279956e92a4175759280a76741de3656ef127f7..3cd9df890b005d515c8caec3ddceee626a8d0aa4 100644 (file)
@@ -1948,7 +1948,8 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
                AMD_IP_BLOCK_TYPE_DCE,
                AMD_IP_BLOCK_TYPE_GFX,
                AMD_IP_BLOCK_TYPE_SDMA,
-               AMD_IP_BLOCK_TYPE_VCE,
+               AMD_IP_BLOCK_TYPE_UVD,
+               AMD_IP_BLOCK_TYPE_VCE
        };
 
        for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
index e2b17cbb2e795b14ca895303597d9e5f14d862c5..fbf7b412a7fb335564fcdb696b9abe0af45f9907 100644 (file)
@@ -894,9 +894,8 @@ static int uvd_v7_0_sriov_start(struct amdgpu_device *adev)
                table_size += sizeof(struct mmsch_v1_0_cmd_end) / 4;
                header->uvd_table_size = table_size;
 
-               return uvd_v7_0_mmsch_start(adev, &adev->virt.mm_table);
        }
-       return -EINVAL; /* already initializaed ? */
+       return uvd_v7_0_mmsch_start(adev, &adev->virt.mm_table);
 }
 
 /**
index 9b1de6be3923a4acaed585d42e33a961ffa73d20..28532e39d0b531efb5b2e1de1fd398035819963a 100644 (file)
@@ -300,11 +300,9 @@ static int vce_v4_0_sriov_start(struct amdgpu_device *adev)
                memcpy((void *)init_table, &end, sizeof(struct mmsch_v1_0_cmd_end));
                table_size += sizeof(struct mmsch_v1_0_cmd_end) / 4;
                header->vce_table_size = table_size;
-
-               return vce_v4_0_mmsch_start(adev, &adev->virt.mm_table);
        }
 
-       return -EINVAL; /* already initializaed ? */
+       return vce_v4_0_mmsch_start(adev, &adev->virt.mm_table);
 }
 
 /**