diff options
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.h')
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 554e7fa33082..07831554dad7 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | #include <drm/ttm/ttm_module.h> | 40 | #include <drm/ttm/ttm_module.h> |
| 41 | #include "vmwgfx_fence.h" | 41 | #include "vmwgfx_fence.h" |
| 42 | 42 | ||
| 43 | #define VMWGFX_DRIVER_DATE "20121114" | 43 | #define VMWGFX_DRIVER_DATE "20140228" |
| 44 | #define VMWGFX_DRIVER_MAJOR 2 | 44 | #define VMWGFX_DRIVER_MAJOR 2 |
| 45 | #define VMWGFX_DRIVER_MINOR 5 | 45 | #define VMWGFX_DRIVER_MINOR 5 |
| 46 | #define VMWGFX_DRIVER_PATCHLEVEL 0 | 46 | #define VMWGFX_DRIVER_PATCHLEVEL 0 |
| @@ -75,10 +75,14 @@ | |||
| 75 | #define VMW_RES_FENCE ttm_driver_type3 | 75 | #define VMW_RES_FENCE ttm_driver_type3 |
| 76 | #define VMW_RES_SHADER ttm_driver_type4 | 76 | #define VMW_RES_SHADER ttm_driver_type4 |
| 77 | 77 | ||
| 78 | struct vmw_compat_shader_manager; | ||
| 79 | |||
| 78 | struct vmw_fpriv { | 80 | struct vmw_fpriv { |
| 79 | struct drm_master *locked_master; | 81 | struct drm_master *locked_master; |
| 80 | struct ttm_object_file *tfile; | 82 | struct ttm_object_file *tfile; |
| 81 | struct list_head fence_events; | 83 | struct list_head fence_events; |
| 84 | bool gb_aware; | ||
| 85 | struct vmw_compat_shader_manager *shman; | ||
| 82 | }; | 86 | }; |
| 83 | 87 | ||
| 84 | struct vmw_dma_buffer { | 88 | struct vmw_dma_buffer { |
| @@ -272,6 +276,7 @@ struct vmw_ctx_bindinfo { | |||
| 272 | struct vmw_resource *ctx; | 276 | struct vmw_resource *ctx; |
| 273 | struct vmw_resource *res; | 277 | struct vmw_resource *res; |
| 274 | enum vmw_ctx_binding_type bt; | 278 | enum vmw_ctx_binding_type bt; |
| 279 | bool scrubbed; | ||
| 275 | union { | 280 | union { |
| 276 | SVGA3dShaderType shader_type; | 281 | SVGA3dShaderType shader_type; |
| 277 | SVGA3dRenderTargetType rt_type; | 282 | SVGA3dRenderTargetType rt_type; |
| @@ -318,7 +323,7 @@ struct vmw_sw_context{ | |||
| 318 | struct drm_open_hash res_ht; | 323 | struct drm_open_hash res_ht; |
| 319 | bool res_ht_initialized; | 324 | bool res_ht_initialized; |
| 320 | bool kernel; /**< is the called made from the kernel */ | 325 | bool kernel; /**< is the called made from the kernel */ |
| 321 | struct ttm_object_file *tfile; | 326 | struct vmw_fpriv *fp; |
| 322 | struct list_head validate_nodes; | 327 | struct list_head validate_nodes; |
| 323 | struct vmw_relocation relocs[VMWGFX_MAX_RELOCATIONS]; | 328 | struct vmw_relocation relocs[VMWGFX_MAX_RELOCATIONS]; |
| 324 | uint32_t cur_reloc; | 329 | uint32_t cur_reloc; |
| @@ -336,6 +341,7 @@ struct vmw_sw_context{ | |||
| 336 | bool needs_post_query_barrier; | 341 | bool needs_post_query_barrier; |
| 337 | struct vmw_resource *error_resource; | 342 | struct vmw_resource *error_resource; |
| 338 | struct vmw_ctx_binding_state staged_bindings; | 343 | struct vmw_ctx_binding_state staged_bindings; |
| 344 | struct list_head staged_shaders; | ||
| 339 | }; | 345 | }; |
| 340 | 346 | ||
| 341 | struct vmw_legacy_display; | 347 | struct vmw_legacy_display; |
| @@ -380,6 +386,7 @@ struct vmw_private { | |||
| 380 | uint32_t max_gmr_ids; | 386 | uint32_t max_gmr_ids; |
| 381 | uint32_t max_gmr_pages; | 387 | uint32_t max_gmr_pages; |
| 382 | uint32_t max_mob_pages; | 388 | uint32_t max_mob_pages; |
| 389 | uint32_t max_mob_size; | ||
| 383 | uint32_t memory_size; | 390 | uint32_t memory_size; |
| 384 | bool has_gmr; | 391 | bool has_gmr; |
| 385 | bool has_mob; | 392 | bool has_mob; |
| @@ -569,6 +576,8 @@ struct vmw_user_resource_conv; | |||
| 569 | 576 | ||
| 570 | extern void vmw_resource_unreference(struct vmw_resource **p_res); | 577 | extern void vmw_resource_unreference(struct vmw_resource **p_res); |
| 571 | extern struct vmw_resource *vmw_resource_reference(struct vmw_resource *res); | 578 | extern struct vmw_resource *vmw_resource_reference(struct vmw_resource *res); |
| 579 | extern struct vmw_resource * | ||
| 580 | vmw_resource_reference_unless_doomed(struct vmw_resource *res); | ||
| 572 | extern int vmw_resource_validate(struct vmw_resource *res); | 581 | extern int vmw_resource_validate(struct vmw_resource *res); |
| 573 | extern int vmw_resource_reserve(struct vmw_resource *res, bool no_backup); | 582 | extern int vmw_resource_reserve(struct vmw_resource *res, bool no_backup); |
| 574 | extern bool vmw_resource_needs_backup(const struct vmw_resource *res); | 583 | extern bool vmw_resource_needs_backup(const struct vmw_resource *res); |
| @@ -957,6 +966,9 @@ extern void | |||
| 957 | vmw_context_binding_state_transfer(struct vmw_resource *res, | 966 | vmw_context_binding_state_transfer(struct vmw_resource *res, |
| 958 | struct vmw_ctx_binding_state *cbs); | 967 | struct vmw_ctx_binding_state *cbs); |
| 959 | extern void vmw_context_binding_res_list_kill(struct list_head *head); | 968 | extern void vmw_context_binding_res_list_kill(struct list_head *head); |
| 969 | extern void vmw_context_binding_res_list_scrub(struct list_head *head); | ||
| 970 | extern int vmw_context_rebind_all(struct vmw_resource *ctx); | ||
| 971 | extern struct list_head *vmw_context_binding_list(struct vmw_resource *ctx); | ||
| 960 | 972 | ||
| 961 | /* | 973 | /* |
| 962 | * Surface management - vmwgfx_surface.c | 974 | * Surface management - vmwgfx_surface.c |
| @@ -991,6 +1003,28 @@ extern int vmw_shader_define_ioctl(struct drm_device *dev, void *data, | |||
| 991 | struct drm_file *file_priv); | 1003 | struct drm_file *file_priv); |
| 992 | extern int vmw_shader_destroy_ioctl(struct drm_device *dev, void *data, | 1004 | extern int vmw_shader_destroy_ioctl(struct drm_device *dev, void *data, |
| 993 | struct drm_file *file_priv); | 1005 | struct drm_file *file_priv); |
| 1006 | extern int vmw_compat_shader_lookup(struct vmw_compat_shader_manager *man, | ||
| 1007 | SVGA3dShaderType shader_type, | ||
| 1008 | u32 *user_key); | ||
| 1009 | extern void vmw_compat_shaders_commit(struct vmw_compat_shader_manager *man, | ||
| 1010 | struct list_head *list); | ||
| 1011 | extern void vmw_compat_shaders_revert(struct vmw_compat_shader_manager *man, | ||
| 1012 | struct list_head *list); | ||
| 1013 | extern int vmw_compat_shader_remove(struct vmw_compat_shader_manager *man, | ||
| 1014 | u32 user_key, | ||
| 1015 | SVGA3dShaderType shader_type, | ||
| 1016 | struct list_head *list); | ||
| 1017 | extern int vmw_compat_shader_add(struct vmw_compat_shader_manager *man, | ||
| 1018 | u32 user_key, const void *bytecode, | ||
| 1019 | SVGA3dShaderType shader_type, | ||
| 1020 | size_t size, | ||
| 1021 | struct ttm_object_file *tfile, | ||
| 1022 | struct list_head *list); | ||
| 1023 | extern struct vmw_compat_shader_manager * | ||
| 1024 | vmw_compat_shader_man_create(struct vmw_private *dev_priv); | ||
| 1025 | extern void | ||
| 1026 | vmw_compat_shader_man_destroy(struct vmw_compat_shader_manager *man); | ||
| 1027 | |||
| 994 | 1028 | ||
| 995 | /** | 1029 | /** |
| 996 | * Inline helper functions | 1030 | * Inline helper functions |
