diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.h')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 58de6393f611..10fc01f69c40 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #include "ttm/ttm_execbuf_util.h" | 39 | #include "ttm/ttm_execbuf_util.h" |
40 | #include "ttm/ttm_module.h" | 40 | #include "ttm/ttm_module.h" |
41 | 41 | ||
42 | #define VMWGFX_DRIVER_DATE "20100209" | 42 | #define VMWGFX_DRIVER_DATE "20100927" |
43 | #define VMWGFX_DRIVER_MAJOR 1 | 43 | #define VMWGFX_DRIVER_MAJOR 1 |
44 | #define VMWGFX_DRIVER_MINOR 2 | 44 | #define VMWGFX_DRIVER_MINOR 4 |
45 | #define VMWGFX_DRIVER_PATCHLEVEL 0 | 45 | #define VMWGFX_DRIVER_PATCHLEVEL 0 |
46 | #define VMWGFX_FILE_PAGE_OFFSET 0x00100000 | 46 | #define VMWGFX_FILE_PAGE_OFFSET 0x00100000 |
47 | #define VMWGFX_FIFO_STATIC_SIZE (1024*1024) | 47 | #define VMWGFX_FIFO_STATIC_SIZE (1024*1024) |
@@ -49,6 +49,9 @@ | |||
49 | #define VMWGFX_MAX_GMRS 2048 | 49 | #define VMWGFX_MAX_GMRS 2048 |
50 | #define VMWGFX_MAX_DISPLAYS 16 | 50 | #define VMWGFX_MAX_DISPLAYS 16 |
51 | 51 | ||
52 | #define VMW_PL_GMR TTM_PL_PRIV0 | ||
53 | #define VMW_PL_FLAG_GMR TTM_PL_FLAG_PRIV0 | ||
54 | |||
52 | struct vmw_fpriv { | 55 | struct vmw_fpriv { |
53 | struct drm_master *locked_master; | 56 | struct drm_master *locked_master; |
54 | struct ttm_object_file *tfile; | 57 | struct ttm_object_file *tfile; |
@@ -57,8 +60,6 @@ struct vmw_fpriv { | |||
57 | struct vmw_dma_buffer { | 60 | struct vmw_dma_buffer { |
58 | struct ttm_buffer_object base; | 61 | struct ttm_buffer_object base; |
59 | struct list_head validate_list; | 62 | struct list_head validate_list; |
60 | struct list_head gmr_lru; | ||
61 | uint32_t gmr_id; | ||
62 | bool gmr_bound; | 63 | bool gmr_bound; |
63 | uint32_t cur_validate_node; | 64 | uint32_t cur_validate_node; |
64 | bool on_validate_list; | 65 | bool on_validate_list; |
@@ -151,6 +152,8 @@ struct vmw_overlay; | |||
151 | 152 | ||
152 | struct vmw_master { | 153 | struct vmw_master { |
153 | struct ttm_lock lock; | 154 | struct ttm_lock lock; |
155 | struct mutex fb_surf_mutex; | ||
156 | struct list_head fb_surf; | ||
154 | }; | 157 | }; |
155 | 158 | ||
156 | struct vmw_vga_topology_state { | 159 | struct vmw_vga_topology_state { |
@@ -182,6 +185,7 @@ struct vmw_private { | |||
182 | uint32_t capabilities; | 185 | uint32_t capabilities; |
183 | uint32_t max_gmr_descriptors; | 186 | uint32_t max_gmr_descriptors; |
184 | uint32_t max_gmr_ids; | 187 | uint32_t max_gmr_ids; |
188 | bool has_gmr; | ||
185 | struct mutex hw_mutex; | 189 | struct mutex hw_mutex; |
186 | 190 | ||
187 | /* | 191 | /* |
@@ -260,18 +264,9 @@ struct vmw_private { | |||
260 | */ | 264 | */ |
261 | 265 | ||
262 | struct vmw_sw_context ctx; | 266 | struct vmw_sw_context ctx; |
263 | uint32_t val_seq; | ||
264 | struct mutex cmdbuf_mutex; | 267 | struct mutex cmdbuf_mutex; |
265 | 268 | ||
266 | /** | 269 | /** |
267 | * GMR management. Protected by the lru spinlock. | ||
268 | */ | ||
269 | |||
270 | struct ida gmr_ida; | ||
271 | struct list_head gmr_lru; | ||
272 | |||
273 | |||
274 | /** | ||
275 | * Operating mode. | 270 | * Operating mode. |
276 | */ | 271 | */ |
277 | 272 | ||
@@ -286,6 +281,7 @@ struct vmw_private { | |||
286 | struct vmw_master *active_master; | 281 | struct vmw_master *active_master; |
287 | struct vmw_master fbdev_master; | 282 | struct vmw_master fbdev_master; |
288 | struct notifier_block pm_nb; | 283 | struct notifier_block pm_nb; |
284 | bool suspended; | ||
289 | 285 | ||
290 | struct mutex release_mutex; | 286 | struct mutex release_mutex; |
291 | uint32_t num_3d_resources; | 287 | uint32_t num_3d_resources; |
@@ -331,7 +327,9 @@ void vmw_3d_resource_dec(struct vmw_private *dev_priv); | |||
331 | */ | 327 | */ |
332 | 328 | ||
333 | extern int vmw_gmr_bind(struct vmw_private *dev_priv, | 329 | extern int vmw_gmr_bind(struct vmw_private *dev_priv, |
334 | struct ttm_buffer_object *bo); | 330 | struct page *pages[], |
331 | unsigned long num_pages, | ||
332 | int gmr_id); | ||
335 | extern void vmw_gmr_unbind(struct vmw_private *dev_priv, int gmr_id); | 333 | extern void vmw_gmr_unbind(struct vmw_private *dev_priv, int gmr_id); |
336 | 334 | ||
337 | /** | 335 | /** |
@@ -380,14 +378,10 @@ extern uint32_t vmw_dmabuf_validate_node(struct ttm_buffer_object *bo, | |||
380 | extern void vmw_dmabuf_validate_clear(struct ttm_buffer_object *bo); | 378 | extern void vmw_dmabuf_validate_clear(struct ttm_buffer_object *bo); |
381 | extern int vmw_user_dmabuf_lookup(struct ttm_object_file *tfile, | 379 | extern int vmw_user_dmabuf_lookup(struct ttm_object_file *tfile, |
382 | uint32_t id, struct vmw_dma_buffer **out); | 380 | uint32_t id, struct vmw_dma_buffer **out); |
383 | extern uint32_t vmw_dmabuf_gmr(struct ttm_buffer_object *bo); | ||
384 | extern void vmw_dmabuf_set_gmr(struct ttm_buffer_object *bo, uint32_t id); | ||
385 | extern int vmw_gmr_id_alloc(struct vmw_private *dev_priv, uint32_t *p_id); | ||
386 | extern int vmw_dmabuf_to_start_of_vram(struct vmw_private *vmw_priv, | 381 | extern int vmw_dmabuf_to_start_of_vram(struct vmw_private *vmw_priv, |
387 | struct vmw_dma_buffer *bo); | 382 | struct vmw_dma_buffer *bo); |
388 | extern int vmw_dmabuf_from_vram(struct vmw_private *vmw_priv, | 383 | extern int vmw_dmabuf_from_vram(struct vmw_private *vmw_priv, |
389 | struct vmw_dma_buffer *bo); | 384 | struct vmw_dma_buffer *bo); |
390 | extern void vmw_dmabuf_gmr_unbind(struct ttm_buffer_object *bo); | ||
391 | extern int vmw_stream_claim_ioctl(struct drm_device *dev, void *data, | 385 | extern int vmw_stream_claim_ioctl(struct drm_device *dev, void *data, |
392 | struct drm_file *file_priv); | 386 | struct drm_file *file_priv); |
393 | extern int vmw_stream_unref_ioctl(struct drm_device *dev, void *data, | 387 | extern int vmw_stream_unref_ioctl(struct drm_device *dev, void *data, |
@@ -439,6 +433,7 @@ extern int vmw_mmap(struct file *filp, struct vm_area_struct *vma); | |||
439 | extern struct ttm_placement vmw_vram_placement; | 433 | extern struct ttm_placement vmw_vram_placement; |
440 | extern struct ttm_placement vmw_vram_ne_placement; | 434 | extern struct ttm_placement vmw_vram_ne_placement; |
441 | extern struct ttm_placement vmw_vram_sys_placement; | 435 | extern struct ttm_placement vmw_vram_sys_placement; |
436 | extern struct ttm_placement vmw_vram_gmr_placement; | ||
442 | extern struct ttm_placement vmw_sys_placement; | 437 | extern struct ttm_placement vmw_sys_placement; |
443 | extern struct ttm_bo_driver vmw_bo_driver; | 438 | extern struct ttm_bo_driver vmw_bo_driver; |
444 | extern int vmw_dma_quiescent(struct drm_device *dev); | 439 | extern int vmw_dma_quiescent(struct drm_device *dev); |
@@ -518,6 +513,10 @@ void vmw_kms_write_svga(struct vmw_private *vmw_priv, | |||
518 | unsigned bbp, unsigned depth); | 513 | unsigned bbp, unsigned depth); |
519 | int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data, | 514 | int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data, |
520 | struct drm_file *file_priv); | 515 | struct drm_file *file_priv); |
516 | void vmw_kms_idle_workqueues(struct vmw_master *vmaster); | ||
517 | bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv, | ||
518 | uint32_t pitch, | ||
519 | uint32_t height); | ||
521 | u32 vmw_get_vblank_counter(struct drm_device *dev, int crtc); | 520 | u32 vmw_get_vblank_counter(struct drm_device *dev, int crtc); |
522 | 521 | ||
523 | /** | 522 | /** |
@@ -537,6 +536,12 @@ int vmw_overlay_num_overlays(struct vmw_private *dev_priv); | |||
537 | int vmw_overlay_num_free_overlays(struct vmw_private *dev_priv); | 536 | int vmw_overlay_num_free_overlays(struct vmw_private *dev_priv); |
538 | 537 | ||
539 | /** | 538 | /** |
539 | * GMR Id manager | ||
540 | */ | ||
541 | |||
542 | extern const struct ttm_mem_type_manager_func vmw_gmrid_manager_func; | ||
543 | |||
544 | /** | ||
540 | * Inline helper functions | 545 | * Inline helper functions |
541 | */ | 546 | */ |
542 | 547 | ||