struct bo_cache_bucket {
struct list_head head;
- unsigned long size;
+ uint64_t size;
};
struct brw_bufmgr {
return entry ? (struct brw_bo *) entry->data : NULL;
}
-static unsigned long
-bo_tile_size(struct brw_bufmgr *bufmgr, unsigned long size, uint32_t tiling)
+static uint64_t
+bo_tile_size(struct brw_bufmgr *bufmgr, uint64_t size, uint32_t tiling)
{
if (tiling == I915_TILING_NONE)
return size;
}
static struct bo_cache_bucket *
-bucket_for_size(struct brw_bufmgr *bufmgr, unsigned long size)
+bucket_for_size(struct brw_bufmgr *bufmgr, uint64_t size)
{
int i;
static struct brw_bo *
bo_alloc_internal(struct brw_bufmgr *bufmgr,
const char *name,
- unsigned long size,
+ uint64_t size,
unsigned long flags,
uint32_t tiling_mode,
uint32_t stride, uint64_t alignment)
int ret;
struct bo_cache_bucket *bucket;
bool alloc_from_cache;
- unsigned long bo_size;
+ uint64_t bo_size;
bool for_render = false;
if (flags & BO_ALLOC_FOR_RENDER)
struct brw_bo *
brw_bo_alloc(struct brw_bufmgr *bufmgr,
- const char *name, unsigned long size, uint64_t alignment)
+ const char *name, uint64_t size, uint64_t alignment)
{
return bo_alloc_internal(bufmgr, name, size, 0, I915_TILING_NONE, 0, 0);
}
int x, int y, int cpp, uint32_t tiling,
uint32_t *pitch, unsigned long flags)
{
- unsigned long size;
+ uint64_t size;
uint32_t stride;
unsigned long aligned_y, height_alignment;
static void
init_cache_buckets(struct brw_bufmgr *bufmgr)
{
- unsigned long size, cache_max_size = 64 * 1024 * 1024;
+ uint64_t size, cache_max_size = 64 * 1024 * 1024;
/* OK, so power of two buckets was too wasteful of memory.
* Give 3 other sizes between each power of two, to hopefully
* The size may be larger than the size originally requested for the
* allocation, such as being aligned to page size.
*/
- unsigned long size;
+ uint64_t size;
/**
* Alignment requirement for object
* using bo_map() or brw_bo_map_gtt() to be used by the CPU.
*/
struct brw_bo *brw_bo_alloc(struct brw_bufmgr *bufmgr, const char *name,
- unsigned long size, uint64_t alignment);
+ uint64_t size, uint64_t alignment);
/**
* Allocate a tiled buffer object.