diff options
author | Dave Airlie <airlied@redhat.com> | 2018-08-07 16:09:08 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-08-07 16:22:23 -0400 |
commit | 940fbcb73fd25b517fa10c5a9cc96ca0ce1a2fc4 (patch) | |
tree | c967fae5501fefe9258f9891371977833bd2a72c /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 569f0a8694d0ff13c5d296a594c7d8cec8d6f35f (diff) | |
parent | df36b2fb8390d98453fff1aae3927095fe9ff36c (diff) |
Merge branch 'drm-next-4.19' of git://people.freedesktop.org/~agd5f/linux into drm-next
Fixes for 4.19:
- Fix UVD 7.2 instance handling
- Fix UVD 7.2 harvesting
- GPU scheduler fix for when a process is killed
- TTM cleanups
- amdgpu CS bo_list fixes
- Powerplay fixes for polaris12 and CZ/ST
- DC fixes for link training certain HMDs
- DC fix for vega10 blank screen in certain cases
From: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180801222906.1016-1-alexander.deucher@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 9eedc9810004..ece0ac703e27 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -2345,6 +2345,35 @@ struct amdgpu_bo_va_mapping *amdgpu_vm_bo_lookup_mapping(struct amdgpu_vm *vm, | |||
2345 | } | 2345 | } |
2346 | 2346 | ||
2347 | /** | 2347 | /** |
2348 | * amdgpu_vm_bo_trace_cs - trace all reserved mappings | ||
2349 | * | ||
2350 | * @vm: the requested vm | ||
2351 | * @ticket: CS ticket | ||
2352 | * | ||
2353 | * Trace all mappings of BOs reserved during a command submission. | ||
2354 | */ | ||
2355 | void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket) | ||
2356 | { | ||
2357 | struct amdgpu_bo_va_mapping *mapping; | ||
2358 | |||
2359 | if (!trace_amdgpu_vm_bo_cs_enabled()) | ||
2360 | return; | ||
2361 | |||
2362 | for (mapping = amdgpu_vm_it_iter_first(&vm->va, 0, U64_MAX); mapping; | ||
2363 | mapping = amdgpu_vm_it_iter_next(mapping, 0, U64_MAX)) { | ||
2364 | if (mapping->bo_va && mapping->bo_va->base.bo) { | ||
2365 | struct amdgpu_bo *bo; | ||
2366 | |||
2367 | bo = mapping->bo_va->base.bo; | ||
2368 | if (READ_ONCE(bo->tbo.resv->lock.ctx) != ticket) | ||
2369 | continue; | ||
2370 | } | ||
2371 | |||
2372 | trace_amdgpu_vm_bo_cs(mapping); | ||
2373 | } | ||
2374 | } | ||
2375 | |||
2376 | /** | ||
2348 | * amdgpu_vm_bo_rmv - remove a bo to a specific vm | 2377 | * amdgpu_vm_bo_rmv - remove a bo to a specific vm |
2349 | * | 2378 | * |
2350 | * @adev: amdgpu_device pointer | 2379 | * @adev: amdgpu_device pointer |