Linux Audio

Check our new training course

Loading...
Note: File does not exist in v5.4.
 1/* SPDX-License-Identifier: GPL-2.0 or MIT */
 2/* Copyright 2023 Collabora ltd. */
 3
 4#ifndef __PANTHOR_HEAP_H__
 5#define __PANTHOR_HEAP_H__
 6
 7#include <linux/types.h>
 8
 9struct panthor_device;
10struct panthor_heap_pool;
11struct panthor_vm;
12
13int panthor_heap_create(struct panthor_heap_pool *pool,
14			u32 initial_chunk_count,
15			u32 chunk_size,
16			u32 max_chunks,
17			u32 target_in_flight,
18			u64 *heap_ctx_gpu_va,
19			u64 *first_chunk_gpu_va);
20int panthor_heap_destroy(struct panthor_heap_pool *pool, u32 handle);
21
22struct panthor_heap_pool *
23panthor_heap_pool_create(struct panthor_device *ptdev, struct panthor_vm *vm);
24void panthor_heap_pool_destroy(struct panthor_heap_pool *pool);
25
26struct panthor_heap_pool *
27panthor_heap_pool_get(struct panthor_heap_pool *pool);
28void panthor_heap_pool_put(struct panthor_heap_pool *pool);
29
30int panthor_heap_grow(struct panthor_heap_pool *pool,
31		      u64 heap_gpu_va,
32		      u32 renderpasses_in_flight,
33		      u32 pending_frag_count,
34		      u64 *new_chunk_gpu_va);
35int panthor_heap_return_chunk(struct panthor_heap_pool *pool,
36			      u64 heap_gpu_va,
37			      u64 chunk_gpu_va);
38
39#endif