diff options
author | Dave Airlie <airlied@redhat.com> | 2016-10-27 20:35:59 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-10-27 20:35:59 -0400 |
commit | a1873c62710b23e9afbd2faeed5f28649cbe4739 (patch) | |
tree | fd07fb6b1dc0c61a15ba563cad3ef2e46687f45c /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | |
parent | 5481e27f6fd06b7cb902072e81d6b083db8155eb (diff) | |
parent | 3495a103579380288a130dc1862488cd8a4293f5 (diff) |
Merge branch 'drm-next-4.10' of git://people.freedesktop.org/~agd5f/linux into drm-next
First new feature pull for 4.10. Highlights:
- Support for multple virtual displays in the virtual dce component
- New VM mgr to support non-contiguous vram buffers
- Support for UVD powergating on additional asics
- Power management improvements
- lots of code cleanup and bug fixes
* 'drm-next-4.10' of git://people.freedesktop.org/~agd5f/linux: (107 commits)
drm/amdgpu: turn on/off uvd clock when dpm enable/disable on CI
drm/amdgpu: disable dpm before turn off clock when vce idle.
drm/amdgpu: enable uvd bypass mode for CI/VI.
drm/amdgpu: just not load smc firmware if smu is already running
drm/amdgpu: when suspend, set boot state instand of disable dpm.
drm/amdgpu: use failed label to handle context init failure
drm/amdgpu: add amdgpu_ttm_bo_eviction_valuable callback
drm/ttm: make eviction decision a driver callback v2
drm/ttm: fix coding style in ttm_bo_driver.h
drm/radeon/pm: autoswitch power state when in balanced mode
drm/amd/powerplay: fix spelling mistake and add KERN_WARNING to printks
drm/amdgpu:new ids flag for preempt
drm/amdgpu: mark symbols static where possible
drm/amdgpu: change function declarations and add missing header dependencies
drm/amdgpu: s/amdgpuCrtc/amdgpu_crtc/ in pageflip code
drm/amdgpu/atom: remove a bunch of unused functions
drm/amdgpu: consolidate atom scratch reg handling for hangs
drm/amdgpu: use amdgpu_bo_[create|free]_kernel for wb
drm/amdgpu: add VCE VM session tracking
drm/amdgpu: improve parse_cs handling a bit
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h new file mode 100644 index 000000000000..405f379ac186 --- /dev/null +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright 2016 Advanced Micro Devices, Inc. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * Authors: Christian König | ||
23 | */ | ||
24 | #ifndef __AMDGPU_SYNC_H__ | ||
25 | #define __AMDGPU_SYNC_H__ | ||
26 | |||
27 | #include <linux/hashtable.h> | ||
28 | |||
29 | struct fence; | ||
30 | struct reservation_object; | ||
31 | struct amdgpu_device; | ||
32 | struct amdgpu_ring; | ||
33 | |||
34 | /* | ||
35 | * Container for fences used to sync command submissions. | ||
36 | */ | ||
37 | struct amdgpu_sync { | ||
38 | DECLARE_HASHTABLE(fences, 4); | ||
39 | struct fence *last_vm_update; | ||
40 | }; | ||
41 | |||
42 | void amdgpu_sync_create(struct amdgpu_sync *sync); | ||
43 | int amdgpu_sync_fence(struct amdgpu_device *adev, struct amdgpu_sync *sync, | ||
44 | struct fence *f); | ||
45 | int amdgpu_sync_resv(struct amdgpu_device *adev, | ||
46 | struct amdgpu_sync *sync, | ||
47 | struct reservation_object *resv, | ||
48 | void *owner); | ||
49 | struct fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync, | ||
50 | struct amdgpu_ring *ring); | ||
51 | struct fence *amdgpu_sync_get_fence(struct amdgpu_sync *sync); | ||
52 | void amdgpu_sync_free(struct amdgpu_sync *sync); | ||
53 | int amdgpu_sync_init(void); | ||
54 | void amdgpu_sync_fini(void); | ||
55 | |||
56 | #endif | ||