Rev 4075 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4075 | Rev 6296 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /************************************************************************** |
1 | /************************************************************************** |
2 | * |
2 | * |
3 | * Copyright © 2012 VMware, Inc., Palo Alto, CA., USA |
3 | * Copyright © 2012-2014 VMware, Inc., Palo Alto, CA., USA |
4 | * All Rights Reserved. |
4 | * All Rights Reserved. |
5 | * |
5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a |
6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the |
7 | * copy of this software and associated documentation files (the |
8 | * "Software"), to deal in the Software without restriction, including |
8 | * "Software"), to deal in the Software without restriction, including |
Line 28... | Line 28... | ||
28 | #ifndef _VMWGFX_RESOURCE_PRIV_H_ |
28 | #ifndef _VMWGFX_RESOURCE_PRIV_H_ |
29 | #define _VMWGFX_RESOURCE_PRIV_H_ |
29 | #define _VMWGFX_RESOURCE_PRIV_H_ |
Line 30... | Line 30... | ||
30 | 30 | ||
Line -... | Line 31... | ||
- | 31 | #include "vmwgfx_drv.h" |
|
- | 32 | ||
- | 33 | enum vmw_cmdbuf_res_state { |
|
- | 34 | VMW_CMDBUF_RES_COMMITTED, |
|
- | 35 | VMW_CMDBUF_RES_ADD, |
|
- | 36 | VMW_CMDBUF_RES_DEL |
|
31 | #include "vmwgfx_drv.h" |
37 | }; |
32 | 38 | ||
33 | /** |
39 | /** |
34 | * struct vmw_user_resource_conv - Identify a derived user-exported resource |
40 | * struct vmw_user_resource_conv - Identify a derived user-exported resource |
35 | * type and provide a function to convert its ttm_base_object pointer to |
41 | * type and provide a function to convert its ttm_base_object pointer to |
Line 53... | Line 59... | ||
53 | * @create: Create a hardware resource. |
59 | * @create: Create a hardware resource. |
54 | * @destroy: Destroy a hardware resource. |
60 | * @destroy: Destroy a hardware resource. |
55 | * @bind: Bind a hardware resource to persistent buffer storage. |
61 | * @bind: Bind a hardware resource to persistent buffer storage. |
56 | * @unbind: Unbind a hardware resource from persistent |
62 | * @unbind: Unbind a hardware resource from persistent |
57 | * buffer storage. |
63 | * buffer storage. |
- | 64 | * @commit_notify: If the resource is a command buffer managed resource, |
|
- | 65 | * callback to notify that a define or remove command |
|
- | 66 | * has been committed to the device. |
|
58 | */ |
67 | */ |
59 | - | ||
60 | struct vmw_res_func { |
68 | struct vmw_res_func { |
61 | enum vmw_res_type res_type; |
69 | enum vmw_res_type res_type; |
62 | bool needs_backup; |
70 | bool needs_backup; |
63 | const char *type_name; |
71 | const char *type_name; |
64 | struct ttm_placement *backup_placement; |
72 | struct ttm_placement *backup_placement; |
Line 69... | Line 77... | ||
69 | int (*bind) (struct vmw_resource *res, |
77 | int (*bind) (struct vmw_resource *res, |
70 | struct ttm_validate_buffer *val_buf); |
78 | struct ttm_validate_buffer *val_buf); |
71 | int (*unbind) (struct vmw_resource *res, |
79 | int (*unbind) (struct vmw_resource *res, |
72 | bool readback, |
80 | bool readback, |
73 | struct ttm_validate_buffer *val_buf); |
81 | struct ttm_validate_buffer *val_buf); |
- | 82 | void (*commit_notify)(struct vmw_resource *res, |
|
- | 83 | enum vmw_cmdbuf_res_state state); |
|
74 | }; |
84 | }; |
Line 75... | Line 85... | ||
75 | 85 | ||
76 | int vmw_resource_alloc_id(struct vmw_resource *res); |
86 | int vmw_resource_alloc_id(struct vmw_resource *res); |
77 | void vmw_resource_release_id(struct vmw_resource *res); |
87 | void vmw_resource_release_id(struct vmw_resource *res); |