diff options
author | Dave Airlie <airlied@redhat.com> | 2016-09-19 16:17:38 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-09-19 16:17:38 -0400 |
commit | bd4a68da1989a3735b9c183422effc177e2d5ae8 (patch) | |
tree | a7ad047fc3ecebdeb2f671c6d0710b44155e21b9 /include/drm | |
parent | 9f8cf165c62913244479832f04c44cd77ffc9293 (diff) | |
parent | af1f85ddecfa341e684db950c34a1813d36750db (diff) |
Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next
More radeon and amdgpu changes for 4.9. Highlights:
- Initial SI support for amdgpu (controlled by a Kconfig option)
- misc ttm cleanups
- runtimepm fixes
- S3/S4 fixes
- power improvements
- lots of code cleanups and optimizations
* 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (151 commits)
drm/ttm: remove cpu_address member from ttm_tt
drm/radeon/radeon_device: remove unused function
drm/amdgpu: clean function declarations in amdgpu_ttm.c up
drm/amdgpu: use the new ring ib and dma frame size callbacks (v2)
drm/amdgpu/vce3: add ring callbacks for ib and dma frame size
drm/amdgpu/vce2: add ring callbacks for ib and dma frame size
drm/amdgpu/vce: add common ring callbacks for ib and dma frame size
drm/amdgpu/uvd6: add ring callbacks for ib and dma frame size
drm/amdgpu/uvd5: add ring callbacks for ib and dma frame size
drm/amdgpu/uvd4.2: add ring callbacks for ib and dma frame size
drm/amdgpu/sdma3: add ring callbacks for ib and dma frame size
drm/amdgpu/sdma2.4: add ring callbacks for ib and dma frame size
drm/amdgpu/cik_sdma: add ring callbacks for ib and dma frame size
drm/amdgpu/si_dma: add ring callbacks for ib and dma frame size
drm/amdgpu/gfx8: add ring callbacks for ib and dma frame size
drm/amdgpu/gfx7: add ring callbacks for ib and dma frame size
drm/amdgpu/gfx6: add ring callbacks for ib and dma frame size
drm/amdgpu/ring: add an interface to get dma frame and ib size
drm/amdgpu/sdma3: drop unused functions
drm/amdgpu/gfx6: drop gds_switch callback
...
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 32 | ||||
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 2 | ||||
-rw-r--r-- | include/drm/ttm/ttm_placement.h | 56 |
3 files changed, 35 insertions, 55 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 6f2c59887ba6..9eb940d6755f 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -45,37 +45,7 @@ struct ttm_bo_device; | |||
45 | 45 | ||
46 | struct drm_mm_node; | 46 | struct drm_mm_node; |
47 | 47 | ||
48 | /** | 48 | struct ttm_placement; |
49 | * struct ttm_place | ||
50 | * | ||
51 | * @fpfn: first valid page frame number to put the object | ||
52 | * @lpfn: last valid page frame number to put the object | ||
53 | * @flags: memory domain and caching flags for the object | ||
54 | * | ||
55 | * Structure indicating a possible place to put an object. | ||
56 | */ | ||
57 | struct ttm_place { | ||
58 | unsigned fpfn; | ||
59 | unsigned lpfn; | ||
60 | uint32_t flags; | ||
61 | }; | ||
62 | |||
63 | /** | ||
64 | * struct ttm_placement | ||
65 | * | ||
66 | * @num_placement: number of preferred placements | ||
67 | * @placement: preferred placements | ||
68 | * @num_busy_placement: number of preferred placements when need to evict buffer | ||
69 | * @busy_placement: preferred placements when need to evict buffer | ||
70 | * | ||
71 | * Structure indicating the placement you request for an object. | ||
72 | */ | ||
73 | struct ttm_placement { | ||
74 | unsigned num_placement; | ||
75 | const struct ttm_place *placement; | ||
76 | unsigned num_busy_placement; | ||
77 | const struct ttm_place *busy_placement; | ||
78 | }; | ||
79 | 49 | ||
80 | /** | 50 | /** |
81 | * struct ttm_bus_placement | 51 | * struct ttm_bus_placement |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index c986fa7effd2..4f0a92185995 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -133,7 +133,6 @@ struct ttm_tt { | |||
133 | * struct ttm_dma_tt | 133 | * struct ttm_dma_tt |
134 | * | 134 | * |
135 | * @ttm: Base ttm_tt struct. | 135 | * @ttm: Base ttm_tt struct. |
136 | * @cpu_address: The CPU address of the pages | ||
137 | * @dma_address: The DMA (bus) addresses of the pages | 136 | * @dma_address: The DMA (bus) addresses of the pages |
138 | * @pages_list: used by some page allocation backend | 137 | * @pages_list: used by some page allocation backend |
139 | * | 138 | * |
@@ -143,7 +142,6 @@ struct ttm_tt { | |||
143 | */ | 142 | */ |
144 | struct ttm_dma_tt { | 143 | struct ttm_dma_tt { |
145 | struct ttm_tt ttm; | 144 | struct ttm_tt ttm; |
146 | void **cpu_address; | ||
147 | dma_addr_t *dma_address; | 145 | dma_addr_t *dma_address; |
148 | struct list_head pages_list; | 146 | struct list_head pages_list; |
149 | }; | 147 | }; |
diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h index 8ed44f9bbdfb..932be0c8086e 100644 --- a/include/drm/ttm/ttm_placement.h +++ b/include/drm/ttm/ttm_placement.h | |||
@@ -30,6 +30,9 @@ | |||
30 | 30 | ||
31 | #ifndef _TTM_PLACEMENT_H_ | 31 | #ifndef _TTM_PLACEMENT_H_ |
32 | #define _TTM_PLACEMENT_H_ | 32 | #define _TTM_PLACEMENT_H_ |
33 | |||
34 | #include <linux/types.h> | ||
35 | |||
33 | /* | 36 | /* |
34 | * Memory regions for data placement. | 37 | * Memory regions for data placement. |
35 | */ | 38 | */ |
@@ -37,24 +40,12 @@ | |||
37 | #define TTM_PL_SYSTEM 0 | 40 | #define TTM_PL_SYSTEM 0 |
38 | #define TTM_PL_TT 1 | 41 | #define TTM_PL_TT 1 |
39 | #define TTM_PL_VRAM 2 | 42 | #define TTM_PL_VRAM 2 |
40 | #define TTM_PL_PRIV0 3 | 43 | #define TTM_PL_PRIV 3 |
41 | #define TTM_PL_PRIV1 4 | ||
42 | #define TTM_PL_PRIV2 5 | ||
43 | #define TTM_PL_PRIV3 6 | ||
44 | #define TTM_PL_PRIV4 7 | ||
45 | #define TTM_PL_PRIV5 8 | ||
46 | #define TTM_PL_SWAPPED 15 | ||
47 | 44 | ||
48 | #define TTM_PL_FLAG_SYSTEM (1 << TTM_PL_SYSTEM) | 45 | #define TTM_PL_FLAG_SYSTEM (1 << TTM_PL_SYSTEM) |
49 | #define TTM_PL_FLAG_TT (1 << TTM_PL_TT) | 46 | #define TTM_PL_FLAG_TT (1 << TTM_PL_TT) |
50 | #define TTM_PL_FLAG_VRAM (1 << TTM_PL_VRAM) | 47 | #define TTM_PL_FLAG_VRAM (1 << TTM_PL_VRAM) |
51 | #define TTM_PL_FLAG_PRIV0 (1 << TTM_PL_PRIV0) | 48 | #define TTM_PL_FLAG_PRIV (1 << TTM_PL_PRIV) |
52 | #define TTM_PL_FLAG_PRIV1 (1 << TTM_PL_PRIV1) | ||
53 | #define TTM_PL_FLAG_PRIV2 (1 << TTM_PL_PRIV2) | ||
54 | #define TTM_PL_FLAG_PRIV3 (1 << TTM_PL_PRIV3) | ||
55 | #define TTM_PL_FLAG_PRIV4 (1 << TTM_PL_PRIV4) | ||
56 | #define TTM_PL_FLAG_PRIV5 (1 << TTM_PL_PRIV5) | ||
57 | #define TTM_PL_FLAG_SWAPPED (1 << TTM_PL_SWAPPED) | ||
58 | #define TTM_PL_MASK_MEM 0x0000FFFF | 49 | #define TTM_PL_MASK_MEM 0x0000FFFF |
59 | 50 | ||
60 | /* | 51 | /* |
@@ -72,7 +63,6 @@ | |||
72 | #define TTM_PL_FLAG_CACHED (1 << 16) | 63 | #define TTM_PL_FLAG_CACHED (1 << 16) |
73 | #define TTM_PL_FLAG_UNCACHED (1 << 17) | 64 | #define TTM_PL_FLAG_UNCACHED (1 << 17) |
74 | #define TTM_PL_FLAG_WC (1 << 18) | 65 | #define TTM_PL_FLAG_WC (1 << 18) |
75 | #define TTM_PL_FLAG_SHARED (1 << 20) | ||
76 | #define TTM_PL_FLAG_NO_EVICT (1 << 21) | 66 | #define TTM_PL_FLAG_NO_EVICT (1 << 21) |
77 | #define TTM_PL_FLAG_TOPDOWN (1 << 22) | 67 | #define TTM_PL_FLAG_TOPDOWN (1 << 22) |
78 | 68 | ||
@@ -82,14 +72,36 @@ | |||
82 | 72 | ||
83 | #define TTM_PL_MASK_MEMTYPE (TTM_PL_MASK_MEM | TTM_PL_MASK_CACHING) | 73 | #define TTM_PL_MASK_MEMTYPE (TTM_PL_MASK_MEM | TTM_PL_MASK_CACHING) |
84 | 74 | ||
85 | /* | 75 | /** |
86 | * Access flags to be used for CPU- and GPU- mappings. | 76 | * struct ttm_place |
87 | * The idea is that the TTM synchronization mechanism will | 77 | * |
88 | * allow concurrent READ access and exclusive write access. | 78 | * @fpfn: first valid page frame number to put the object |
89 | * Currently GPU- and CPU accesses are exclusive. | 79 | * @lpfn: last valid page frame number to put the object |
80 | * @flags: memory domain and caching flags for the object | ||
81 | * | ||
82 | * Structure indicating a possible place to put an object. | ||
90 | */ | 83 | */ |
84 | struct ttm_place { | ||
85 | unsigned fpfn; | ||
86 | unsigned lpfn; | ||
87 | uint32_t flags; | ||
88 | }; | ||
91 | 89 | ||
92 | #define TTM_ACCESS_READ (1 << 0) | 90 | /** |
93 | #define TTM_ACCESS_WRITE (1 << 1) | 91 | * struct ttm_placement |
92 | * | ||
93 | * @num_placement: number of preferred placements | ||
94 | * @placement: preferred placements | ||
95 | * @num_busy_placement: number of preferred placements when need to evict buffer | ||
96 | * @busy_placement: preferred placements when need to evict buffer | ||
97 | * | ||
98 | * Structure indicating the placement you request for an object. | ||
99 | */ | ||
100 | struct ttm_placement { | ||
101 | unsigned num_placement; | ||
102 | const struct ttm_place *placement; | ||
103 | unsigned num_busy_placement; | ||
104 | const struct ttm_place *busy_placement; | ||
105 | }; | ||
94 | 106 | ||
95 | #endif | 107 | #endif |