diff options
author | Dave Airlie <airlied@redhat.com> | 2010-10-05 22:38:04 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-05 22:57:11 -0400 |
commit | 0c8eb0dc65f5a78b252eeff6c729ba4741390e23 (patch) | |
tree | b3a64b52e9357ca8ea99966d411842659e2a27cf /include/drm | |
parent | e6b46ee712b92db1cc2449cf4f65bc635366cad4 (diff) | |
parent | d961db75ce86a84f1f04e91ad1014653ed7d9f46 (diff) |
Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into drm-core-next
[airlied - add fix for vmwgfx build]
* 'nouveau/for-airlied' of ../drm-nouveau-next: (93 commits)
drm/ttm: restructure to allow driver to plug in alternate memory manager
drm/ttm: introduce utility function to free an allocated memory node
drm/nouveau: fix thinkos in mem timing table recordlen check
drm/nouveau: parse voltage from perf 0x40 entires
drm/nouveau: don't use the default pll limits in table v2.1 on nv50+ cards
drm/nv50: Fix large 3D performance regression caused by the interchannel sync patches.
drm/nouveau: Synchronize buffer object moves in hardware.
drm/nouveau: Use semaphores to handle inter-channel sync in hardware.
drm/nouveau: Provide a means to have arbitrary work run on fence completion.
drm/nouveau: Minor refactoring/cleanup of the fence code.
drm/nouveau: Add a module option to force card POST.
drm/nv50: prevent (IB_PUT == IB_GET) for occurring unless idle
drm/nv0x-nv4x: Leave the 0x40 bit untouched when changing CRE_LCD.
drm/nv30-nv40: Fix postdivider mask when writing engine/memory PLLs.
drm/nouveau: Fix perf table parsing on BMP v5.25.
drm/nouveau: fix required mode bandwidth calculation for DP
drm/nouveau: fix typo in c2aa91afea5f7e7ae4530fabd37414a79c03328c
drm/nva3: split pm backend out from nv50
drm/nouveau: run perflvl and M table scripts on mem clock change
drm/nouveau: pass perflvl struct to clock_pre()
...
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 3 | ||||
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 25 |
2 files changed, 25 insertions, 3 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 267a86c74e2e..49b43c23636a 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -102,7 +102,8 @@ struct ttm_bus_placement { | |||
102 | */ | 102 | */ |
103 | 103 | ||
104 | struct ttm_mem_reg { | 104 | struct ttm_mem_reg { |
105 | struct drm_mm_node *mm_node; | 105 | void *mm_node; |
106 | unsigned long start; | ||
106 | unsigned long size; | 107 | unsigned long size; |
107 | unsigned long num_pages; | 108 | unsigned long num_pages; |
108 | uint32_t page_alignment; | 109 | uint32_t page_alignment; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index b87504235f18..e3371dbe6a10 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -203,7 +203,22 @@ struct ttm_tt { | |||
203 | * It's set up by the ttm_bo_driver::init_mem_type method. | 203 | * It's set up by the ttm_bo_driver::init_mem_type method. |
204 | */ | 204 | */ |
205 | 205 | ||
206 | struct ttm_mem_type_manager; | ||
207 | |||
208 | struct ttm_mem_type_manager_func { | ||
209 | int (*init)(struct ttm_mem_type_manager *man, unsigned long p_size); | ||
210 | int (*takedown)(struct ttm_mem_type_manager *man); | ||
211 | int (*get_node)(struct ttm_mem_type_manager *man, | ||
212 | struct ttm_buffer_object *bo, | ||
213 | struct ttm_placement *placement, | ||
214 | struct ttm_mem_reg *mem); | ||
215 | void (*put_node)(struct ttm_mem_type_manager *man, | ||
216 | struct ttm_mem_reg *mem); | ||
217 | void (*debug)(struct ttm_mem_type_manager *man, const char *prefix); | ||
218 | }; | ||
219 | |||
206 | struct ttm_mem_type_manager { | 220 | struct ttm_mem_type_manager { |
221 | struct ttm_bo_device *bdev; | ||
207 | 222 | ||
208 | /* | 223 | /* |
209 | * No protection. Constant from start. | 224 | * No protection. Constant from start. |
@@ -222,8 +237,8 @@ struct ttm_mem_type_manager { | |||
222 | * TODO: Consider one lru_lock per ttm_mem_type_manager. | 237 | * TODO: Consider one lru_lock per ttm_mem_type_manager. |
223 | * Plays ill with list removal, though. | 238 | * Plays ill with list removal, though. |
224 | */ | 239 | */ |
225 | 240 | const struct ttm_mem_type_manager_func *func; | |
226 | struct drm_mm manager; | 241 | void *priv; |
227 | struct list_head lru; | 242 | struct list_head lru; |
228 | }; | 243 | }; |
229 | 244 | ||
@@ -649,6 +664,10 @@ extern int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
649 | struct ttm_mem_reg *mem, | 664 | struct ttm_mem_reg *mem, |
650 | bool interruptible, | 665 | bool interruptible, |
651 | bool no_wait_reserve, bool no_wait_gpu); | 666 | bool no_wait_reserve, bool no_wait_gpu); |
667 | |||
668 | extern void ttm_bo_mem_put(struct ttm_buffer_object *bo, | ||
669 | struct ttm_mem_reg *mem); | ||
670 | |||
652 | /** | 671 | /** |
653 | * ttm_bo_wait_for_cpu | 672 | * ttm_bo_wait_for_cpu |
654 | * | 673 | * |
@@ -891,6 +910,8 @@ extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, | |||
891 | */ | 910 | */ |
892 | extern pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp); | 911 | extern pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp); |
893 | 912 | ||
913 | extern const struct ttm_mem_type_manager_func ttm_bo_manager_func; | ||
914 | |||
894 | #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) | 915 | #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) |
895 | #define TTM_HAS_AGP | 916 | #define TTM_HAS_AGP |
896 | #include <linux/agp_backend.h> | 917 | #include <linux/agp_backend.h> |