-
Notifications
You must be signed in to change notification settings - Fork 0
/
hd2.h
29 lines (19 loc) · 983 Bytes
/
hd2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef HD2_H
#define HD2_H
#include "doomdev2.h"
#include "counter.h"
#include "hd2_buffer.h"
struct harddoom2;
struct hd2_buffer;
struct dma_buffer;
struct harddoom2* get_hd2(unsigned num);
int harddoom2_init_dma_buff(struct harddoom2* hd2, struct dma_buffer* buff, size_t size);
int harddoom2_create_surface(struct harddoom2* hd2, struct doomdev2_ioctl_create_surface __user* _params);
int harddoom2_create_buffer(struct harddoom2* hd2, struct doomdev2_ioctl_create_buffer __user* _params);
/* Send as many commands in array 'cmds' with size 'num_cmds' as possible to the device using buffers 'bufs'.
It is assumed that the given commands are valid with respect to the given buffers.
Returns the number of commands written or negative error code. */
ssize_t harddoom2_write(struct harddoom2* hd2, struct hd2_buffer* bufs[NUM_USER_BUFS],
const struct doomdev2_cmd* cmds, size_t num_cmds);
void wait_for_fence_cnt(struct harddoom2* hd2, counter cnt);
#endif