diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2009-12-22 10:53:41 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-22 19:06:24 -0500 |
commit | 7a73ba7469cbea631050094fd14f73acebb97cf9 (patch) | |
tree | 2c1bc2b28a395578967343e14a3a4b90c66e55f5 /drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |
parent | 3d3a5b3290043618e8409f3fb68a63de6156fdd4 (diff) |
drm/vmwgfx: Use TTM handles instead of SIDs as user-space surface handles.
Improve the command verifier to catch all occurences of surface handles,
and translate to SIDs.
This way DMA buffers and 3D surfaces share a common handle space,
which makes it possible for the kms code to differentiate.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.h')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 43546d09d1b0..e61bd85b6975 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |||
@@ -123,6 +123,7 @@ struct vmw_sw_context{ | |||
123 | uint32_t last_cid; | 123 | uint32_t last_cid; |
124 | bool cid_valid; | 124 | bool cid_valid; |
125 | uint32_t last_sid; | 125 | uint32_t last_sid; |
126 | uint32_t sid_translation; | ||
126 | bool sid_valid; | 127 | bool sid_valid; |
127 | struct ttm_object_file *tfile; | 128 | struct ttm_object_file *tfile; |
128 | struct list_head validate_nodes; | 129 | struct list_head validate_nodes; |
@@ -317,9 +318,10 @@ extern void vmw_surface_res_free(struct vmw_resource *res); | |||
317 | extern int vmw_surface_init(struct vmw_private *dev_priv, | 318 | extern int vmw_surface_init(struct vmw_private *dev_priv, |
318 | struct vmw_surface *srf, | 319 | struct vmw_surface *srf, |
319 | void (*res_free) (struct vmw_resource *res)); | 320 | void (*res_free) (struct vmw_resource *res)); |
320 | extern int vmw_user_surface_lookup(struct vmw_private *dev_priv, | 321 | extern int vmw_user_surface_lookup_handle(struct vmw_private *dev_priv, |
321 | struct ttm_object_file *tfile, | 322 | struct ttm_object_file *tfile, |
322 | int sid, struct vmw_surface **out); | 323 | uint32_t handle, |
324 | struct vmw_surface **out); | ||
323 | extern int vmw_surface_destroy_ioctl(struct drm_device *dev, void *data, | 325 | extern int vmw_surface_destroy_ioctl(struct drm_device *dev, void *data, |
324 | struct drm_file *file_priv); | 326 | struct drm_file *file_priv); |
325 | extern int vmw_surface_define_ioctl(struct drm_device *dev, void *data, | 327 | extern int vmw_surface_define_ioctl(struct drm_device *dev, void *data, |
@@ -328,7 +330,7 @@ extern int vmw_surface_reference_ioctl(struct drm_device *dev, void *data, | |||
328 | struct drm_file *file_priv); | 330 | struct drm_file *file_priv); |
329 | extern int vmw_surface_check(struct vmw_private *dev_priv, | 331 | extern int vmw_surface_check(struct vmw_private *dev_priv, |
330 | struct ttm_object_file *tfile, | 332 | struct ttm_object_file *tfile, |
331 | int id); | 333 | uint32_t handle, int *id); |
332 | extern void vmw_dmabuf_bo_free(struct ttm_buffer_object *bo); | 334 | extern void vmw_dmabuf_bo_free(struct ttm_buffer_object *bo); |
333 | extern int vmw_dmabuf_init(struct vmw_private *dev_priv, | 335 | extern int vmw_dmabuf_init(struct vmw_private *dev_priv, |
334 | struct vmw_dma_buffer *vmw_bo, | 336 | struct vmw_dma_buffer *vmw_bo, |