#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
+#include "util/list.h"
#if defined(__cplusplus)
extern "C" {
/** Buffer manager context associated with this buffer object */
drm_bacon_bufmgr *bufmgr;
- /**
- * MM-specific handle for accessing object
- */
- int handle;
+ /** The GEM handle for this buffer object. */
+ uint32_t gem_handle;
/**
* Last seen card virtual address (offset from the beginning of the
* 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)