aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorpding <Pixel.Ding@amd.com>2017-11-05 22:21:55 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-12-04 16:41:44 -0500
commitc6332b97fa77bafba2e4c68050090c08c21bff35 (patch)
treecd16eb59af432b3f4ea456ea52e9d8bd83de9388 /drivers
parent1884734a03904d23137a075c9b64cd9871af1914 (diff)
drm/amdgpu: release exclusive mode after hw_init
Signed-off-by: pding <Pixel.Ding@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 6636fa25aaf5..ddb50c48cb06 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1790,6 +1790,10 @@ static int amdgpu_init(struct amdgpu_device *adev)
1790 } 1790 }
1791 1791
1792 amdgpu_amdkfd_device_init(adev); 1792 amdgpu_amdkfd_device_init(adev);
1793
1794 if (amdgpu_sriov_vf(adev))
1795 amdgpu_virt_release_full_gpu(adev, true);
1796
1793 return 0; 1797 return 0;
1794} 1798}
1795 1799
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 252d41d5ff56..9ed1bee0fd64 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -177,9 +177,6 @@ retry_init:
177 pm_runtime_put_autosuspend(dev->dev); 177 pm_runtime_put_autosuspend(dev->dev);
178 } 178 }
179 179
180 if (amdgpu_sriov_vf(adev))
181 amdgpu_virt_release_full_gpu(adev, true);
182
183out: 180out:
184 if (r) { 181 if (r) {
185 /* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */ 182 /* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */