summaryrefslogtreecommitdiff
path: root/radeon.h
blob: 199d5e533e3454bb8b4f2ea204c3e1665e3c2f10 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 * 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 <stdio.h>
#include <stdint.h>

#define PERR(fmt, args...) \
    fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args)

enum radeon_family {
    CHIP_UNKNOWN,
    CHIP_R100,
    CHIP_RV100,
    CHIP_RS100,
    CHIP_RV200,
    CHIP_RS200,
    CHIP_R200,
    CHIP_RV250,
    CHIP_RS300,
    CHIP_RV280,
    CHIP_R300,
    CHIP_R350,
    CHIP_RV350,
    CHIP_RV380,
    CHIP_R420,
    CHIP_R423,
    CHIP_RV410,
    CHIP_RS400,
    CHIP_RS480,
    CHIP_RS600,
    CHIP_RS690,
    CHIP_RS740,
    CHIP_RV515,
    CHIP_R520,
    CHIP_RV530,
    CHIP_RV560,
    CHIP_RV570,
    CHIP_R580,
    CHIP_R600,
    CHIP_RV610,
    CHIP_RV630,
    CHIP_RV670,
    CHIP_RV620,
    CHIP_RV635,
    CHIP_RS780,
    CHIP_RS880,
    CHIP_RV770,
    CHIP_RV730,
    CHIP_RV710,
    CHIP_RV740,
    CHIP_CEDAR,
    CHIP_REDWOOD,
    CHIP_JUNIPER,
    CHIP_CYPRESS,
    CHIP_HEMLOCK,
    CHIP_PALM,
    CHIP_BARTS,
    CHIP_TURKS,
    CHIP_CAICOS,
    CHIP_CAYMAN,
    CHIP_LAST,
};

struct radeon {
    int             fd;
    unsigned        device;
    unsigned        family;
};

int radeon_init(struct radeon *radeon);
void radeon_fini(struct radeon *radeon);

#endif