#include <panfrost-misc.h>
-struct panfrost_context;
+#include "util/list.h"
+
+struct panfrost_batch;
/* Represents a fat pointer for GPU-mapped memory, returned from the transient
* allocator and not used for much else */
mali_ptr gpu;
};
-struct panfrost_bo {
- struct pipe_reference reference;
-
- /* Mapping for the entire object (all levels) */
- uint8_t *cpu;
-
- /* GPU address for the object */
- mali_ptr gpu;
-
- /* Size of all entire trees */
- size_t size;
-
- int gem_handle;
-};
-
-struct panfrost_memory {
- /* Backing for the slab in memory */
- struct panfrost_bo *bo;
- int stack_bottom;
-};
-
-/* Functions for replay */
-mali_ptr pandev_upload(int cheating_offset, int *stack_bottom, mali_ptr base, void *base_map, const void *data, size_t sz, bool no_pad);
-
-/* Functions for the actual Galliumish driver */
-mali_ptr panfrost_upload(struct panfrost_memory *mem, const void *data, size_t sz, bool no_pad);
-
struct panfrost_transfer
-panfrost_allocate_transient(struct panfrost_context *ctx, size_t sz);
+panfrost_allocate_transient(struct panfrost_batch *batch, size_t sz);
mali_ptr
-panfrost_upload_transient(struct panfrost_context *ctx, const void *data, size_t sz);
-
-static inline mali_ptr
-panfrost_reserve(struct panfrost_memory *mem, size_t sz)
-{
- mem->stack_bottom += sz;
- return mem->bo->gpu + (mem->stack_bottom - sz);
-}
+panfrost_upload_transient(struct panfrost_batch *batch, const void *data,
+ size_t sz);
#endif /* __PAN_ALLOCATE_H__ */