blob: 73fe6de2e67d12c3ba2c6efdba545a3eaf7e7f44 (
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
50
51
52
53
54
55
56
|
/*
* Copyright © 2009 Jerome Glisse <glisse@freedesktop.org>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef RADEON_H
#define RADEON_H
#include <stdint.h>
#include "xf86drm.h"
#include "xf86drmMode.h"
#include "radeon_bo.h"
#include "radeon_cs.h"
#include <errno.h>
struct radeon_mode {
drmModeModeInfo info;
u32 pitch;
u32 height;
u32 bpp;
u32 size;
u32 encoder_id;
u32 connector_id;
u32 crtc_id;
u32 fb_id;
struct radeon_bo *bo;
};
struct radeon {
struct radeon_mode mode;
struct radeon_bo_manager *bom;
struct radeon_cs_manager *csm;
int fd;
};
extern int radeon_init(struct radeon *radeon);
extern void radeon_fini(struct radeon *radeon);
extern int radeon_mode_configure(struct radeon *radeon);
extern void radeon_mode_cleanup(struct radeon *radeon);
extern void memset_bo(struct radeon_bo *bo, u32 value);
extern int memcmp_bo(struct radeon_bo *s1, struct radeon_bo *s2, u32 size);
extern void memsetrandom_bo(struct radeon_bo *bo);
extern void memcpy_bo(struct radeon_bo *bo, u32 *src, u32 size);
#endif
|