-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRadeonUnit.h
63 lines (53 loc) · 1 KB
/
RadeonUnit.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
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
#pragma once
#include <SupportDefs.h>
#include <private/kernel/util/DoublyLinkedList.h>
class RadeonDevice;
enum class UnitFlag {
softwareInit,
hardwareInit,
};
enum class UnitType {
common,
gmc,
ih,
smc,
psp,
dce,
gfx,
sdma,
uvd,
vce,
acp,
vcn,
mes,
jpeg,
num,
};
struct UnitInfo {
UnitType type;
struct {
uint32 major, minor, rev;
} version;
const char *name;
};
class RadeonUnit: public DoublyLinkedListLinkImpl<RadeonUnit> {
private:
friend class RadeonDevice;
RadeonDevice *fDevice;
uint32 fFlags;
protected:
virtual status_t InitHardware2();
virtual status_t FiniHardware2();
virtual status_t InitSoftware2();
virtual status_t FiniSoftware2();
public:
RadeonUnit(RadeonDevice *device): fDevice(device), fFlags(0) {}
virtual ~RadeonUnit() {}
virtual const UnitInfo *GetInfo() = 0;
status_t InitHardware();
status_t FiniHardware();
status_t InitSoftware();
status_t FiniSoftware();
inline RadeonDevice *Device() {return fDevice;}
inline uint32 Flags() {return fFlags;}
};