Skip to content

Commit dcaa32e

Browse files
Guchun Chenalexdeucher
authored andcommitted
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: 3ebfd22 ("drm/amdkfd: Store xcp partition id to amdgpu bo") Signed-off-by: Guchun Chen <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2387ccf commit dcaa32e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,13 +1229,13 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
12291229
pasid = 0;
12301230
}
12311231

1232-
r = amdgpu_vm_init(adev, &fpriv->vm);
1232+
r = amdgpu_xcp_open_device(adev, fpriv, file_priv);
12331233
if (r)
12341234
goto error_pasid;
12351235

1236-
r = amdgpu_xcp_open_device(adev, fpriv, file_priv);
1236+
r = amdgpu_vm_init(adev, &fpriv->vm);
12371237
if (r)
1238-
goto error_vm;
1238+
goto error_pasid;
12391239

12401240
r = amdgpu_vm_set_pasid(adev, &fpriv->vm, pasid);
12411241
if (r)

0 commit comments

Comments
 (0)