Skip to content
Snippets Groups Projects
Commit 25e19472 authored by Guchun Chen's avatar Guchun Chen
Browse files

drm/amdgpu: Allocate root PD on correct partition


file_priv needs to be setup firstly, otherwise, root PD
will always be allocated on partition 0, even if opening
the device from other partitions.

Fixes: ffc6deb7 ("drm/amdkfd: Store xcp partition id to amdgpu bo")
Signed-off-by: default avatarGuchun Chen <guchun.chen@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
parent 1b0f03b5
No related branches found
No related tags found
No related merge requests found
...@@ -1232,13 +1232,13 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) ...@@ -1232,13 +1232,13 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
pasid = 0; pasid = 0;
} }
r = amdgpu_vm_init(adev, &fpriv->vm); r = amdgpu_xcp_open_device(adev, fpriv, file_priv);
if (r) if (r)
goto error_pasid; goto error_pasid;
r = amdgpu_xcp_open_device(adev, fpriv, file_priv); r = amdgpu_vm_init(adev, &fpriv->vm);
if (r) if (r)
goto error_vm; goto error_pasid;
r = amdgpu_vm_set_pasid(adev, &fpriv->vm, pasid); r = amdgpu_vm_set_pasid(adev, &fpriv->vm, pasid);
if (r) if (r)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment