Fingers crossed that this works now. Signed-off-by: Christian König <christian.koenig@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 28a8f13ab8a7..1e8c8d9c0c67 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -1312,24 +1312,16 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) /* Ensure IB tests are run on ring */ flush_delayed_work(&adev->delayed_init_work); - + file_priv->driver_priv = NULL; if (amdgpu_ras_intr_triggered()) { DRM_ERROR("RAS Intr triggered, device disabled!!"); return -EHWPOISON; } - file_priv->driver_priv = NULL; - - r = pm_runtime_get_sync(dev->dev); - if (r < 0) - goto pm_put; - fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); - if (unlikely(!fpriv)) { - r = -ENOMEM; - goto out_suspend; - } + if (unlikely(!fpriv)) + return -ENOMEM; pasid = amdgpu_pasid_alloc(16); if (pasid < 0) { @@ -1374,7 +1366,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) amdgpu_ctx_mgr_init(&fpriv->ctx_mgr, adev); file_priv->driver_priv = fpriv; - goto out_suspend; + return 0; error_vm: amdgpu_vm_fini(adev, &fpriv->vm); @@ -1386,12 +1378,6 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) } kfree(fpriv); - -out_suspend: - pm_runtime_mark_last_busy(dev->dev); -pm_put: - pm_runtime_put_autosuspend(dev->dev); - return r; } -- 2.34.1