diff options
| author | Ingo Molnar <[email protected]> | 2022-03-14 18:52:36 +0100 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2022-03-14 18:53:00 +0100 |
| commit | 411472ae5bb4ffe1404dc5f1505f07e0f04770a8 (patch) | |
| tree | 0ea009eb6011c7f093ba26d9af054a639ef4d401 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | f0fae8a0edd445d042ee94153f127e8939fcf3d3 (diff) | |
| parent | 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 (diff) | |
Merge tag 'v5.17-rc8' into irq/core, to fix conflicts
Conflicts:
drivers/pinctrl/pinctrl-starfive.c
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index b37fc7d7d2c7..418341a67517 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -768,11 +768,17 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm, * Check if all VM PDs/PTs are ready for updates * * Returns: - * True if eviction list is empty. + * True if VM is not evicting. */ bool amdgpu_vm_ready(struct amdgpu_vm *vm) { - return list_empty(&vm->evicted); + bool ret; + + amdgpu_vm_eviction_lock(vm); + ret = !vm->evicting; + amdgpu_vm_eviction_unlock(vm); + + return ret && list_empty(&vm->evicted); } /** |