Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2017 Etnaviv Project
4 */
5
6#ifndef __ETNAVIV_CMDBUF_H__
7#define __ETNAVIV_CMDBUF_H__
8
9#include <linux/types.h>
10
11struct etnaviv_gpu;
12struct etnaviv_cmdbuf_suballoc;
13struct etnaviv_perfmon_request;
14
15struct etnaviv_cmdbuf {
16 /* suballocator this cmdbuf is allocated from */
17 struct etnaviv_cmdbuf_suballoc *suballoc;
18 /* user context key, must be unique between all active users */
19 struct etnaviv_file_private *ctx;
20 /* cmdbuf properties */
21 int suballoc_offset;
22 void *vaddr;
23 u32 size;
24 u32 user_size;
25};
26
27struct etnaviv_cmdbuf_suballoc *
28etnaviv_cmdbuf_suballoc_new(struct etnaviv_gpu * gpu);
29void etnaviv_cmdbuf_suballoc_destroy(struct etnaviv_cmdbuf_suballoc *suballoc);
30
31
32int etnaviv_cmdbuf_init(struct etnaviv_cmdbuf_suballoc *suballoc,
33 struct etnaviv_cmdbuf *cmdbuf, u32 size);
34void etnaviv_cmdbuf_free(struct etnaviv_cmdbuf *cmdbuf);
35
36u32 etnaviv_cmdbuf_get_va(struct etnaviv_cmdbuf *buf);
37dma_addr_t etnaviv_cmdbuf_get_pa(struct etnaviv_cmdbuf *buf);
38
39#endif /* __ETNAVIV_CMDBUF_H__ */