#ifndef FREEDRENO_PRIV_H_
#define FREEDRENO_PRIV_H_
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
+#include "libdrm.h"
#include "xf86drm.h"
#include "xf86atomic.h"
struct fd_bo_bucket cache_bucket[14 * 4];
int num_buckets;
time_t time;
+
+ int closefd; /* call close(fd) upon destruction */
};
void fd_cleanup_bo_cache(struct fd_device *dev, time_t time);
struct fd_ringbuffer_funcs {
void * (*hostptr)(struct fd_ringbuffer *ring);
int (*flush)(struct fd_ringbuffer *ring, uint32_t *last_start);
+ void (*reset)(struct fd_ringbuffer *ring);
void (*emit_reloc)(struct fd_ringbuffer *ring,
const struct fd_reloc *reloc);
void (*emit_reloc_ring)(struct fd_ringbuffer *ring,
uint32_t size;
uint32_t handle;
uint32_t name;
+ int fd; /* dmabuf handle */
void *map;
atomic_t refcnt;
struct fd_bo_funcs *funcs;
time_t free_time; /* time when added to bucket-list */
};
-struct fd_bo *fd_bo_from_handle(struct fd_device *dev,
- uint32_t handle, uint32_t size);
-
#define ALIGN(v,a) (((v) + (a) - 1) & ~((a) - 1))
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))