summaryrefslogtreecommitdiff
path: root/src/ochr_ioctl.h
blob: c45bd6df0c43016c326a51bbbe63b361d5f60dbc (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _OCHR_IOCTL_H_
#define _OCHR_IOCTL_H_

#include <stdint.h>
#include <ws_dri_bufmgr.h>
#include "via_dmabuffer.h"

struct via_reloc_bufinfo;
struct via_reloc_texlist
{
    struct _DriBufferObject *buf;
    uint32_t delta;
};

extern void
ochr_reloc_state_save(struct via_reloc_bufinfo *info);

extern void
ochr_reloc_state_restore(struct via_reloc_bufinfo *info);

extern struct via_reloc_bufinfo *
ochr_create_reloc_buffer(void);

extern void
ochr_free_reloc_buffer(struct via_reloc_bufinfo *info);

extern int
ochr_reset_cmdlists(struct _ViaCommandBuffer *cBuf);

extern int
ochr_2d_relocation(struct _ViaCommandBuffer *cBuf,
		   struct _DriBufferObject *buffer,
		   uint32_t delta, uint32_t bpp, uint32_t pos, 
		   uint64_t flags, uint64_t mask);
extern int
ochr_tex_relocation(struct _ViaCommandBuffer *cBuf,
		    const struct via_reloc_texlist *addr,
		    uint32_t low_mip,
		    uint32_t hi_mip,
		    uint32_t reg_tex_fm, uint64_t flags, uint64_t mask);
extern int
ochr_dest_relocation(struct _ViaCommandBuffer *cBuf,
		     struct _DriBufferObject *dstBuffer,
		     uint32_t delta,
		     uint64_t flags, uint64_t mask);

extern int 
ochr_execbuf(int fd, struct _ViaCommandBuffer *cBuf);
#endif