diff options
author | Kenneth Graunke <[email protected]> | 2017-04-03 15:55:16 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-04-10 14:32:14 -0700 |
commit | 9ee252865e064cf4f6e60ed1f4371ab0351d3c10 (patch) | |
tree | 3a145e208308f9083b492918562c4631424aacde /src/mesa/drivers/dri/i965/brw_bufmgr.h | |
parent | 59fdd94b85743655da5a4b492df3bdee0a317e22 (diff) |
i965/drm: Merge drm_bacon_bo_gem into drm_bacon_bo.
The separate class gives us a bit of extra encapsulation, but I don't
know that it's really worth the boilerplate. I think we can reasonably
expect the rest of the driver to be responsible.
Reviewed-by: Chris Wilson <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_bufmgr.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_bufmgr.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h index 509664b6e3d..87e67602bd9 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.h +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h @@ -37,6 +37,7 @@ #include <stdbool.h> #include <stdint.h> #include <stdio.h> +#include "util/list.h" #if defined(__cplusplus) extern "C" { @@ -95,6 +96,42 @@ struct _drm_bacon_bo { * processes, so we don't know their state. */ bool idle; + + int refcount; + const char *name; + + /** + * Kenel-assigned global name for this object + * + * List contains both flink named and prime fd'd objects + */ + unsigned int global_name; + + /** + * Current tiling mode + */ + uint32_t tiling_mode; + uint32_t swizzle_mode; + unsigned long stride; + + time_t free_time; + + /** Mapped address for the buffer, saved across map/unmap cycles */ + void *mem_virtual; + /** GTT virtual address for the buffer, saved across map/unmap cycles */ + void *gtt_virtual; + /** WC CPU address for the buffer, saved across map/unmap cycles */ + void *wc_virtual; + int map_count; + struct list_head vma_list; + + /** BO cache list */ + struct list_head head; + + /** + * Boolean of whether this buffer can be re-used + */ + bool reusable; }; #define BO_ALLOC_FOR_RENDER (1<<0) |