diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-14 01:58:51 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-21 21:17:48 -0500 |
commit | c4345146dbee38d949efd3a7b96d1bea962a29f2 (patch) | |
tree | 933e06b723f3a01842081b1dfe9388908b807779 /drivers/gpu | |
parent | 37a5d028913f7ac614cd79b1e7adaff19c59d2f1 (diff) |
drm/nouveau/core: split device index enum out on its own
To avoid having to include core/device.h where it's not otherwise
required.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 60 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/devidx.h | 62 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 1 |
3 files changed, 63 insertions, 60 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index 2b90ec900a8c..23d71c58c3f1 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h | |||
@@ -6,66 +6,6 @@ | |||
6 | #include <core/engine.h> | 6 | #include <core/engine.h> |
7 | #include <core/event.h> | 7 | #include <core/event.h> |
8 | 8 | ||
9 | enum nv_subdev_type { | ||
10 | NVDEV_ENGINE_DEVICE, | ||
11 | NVDEV_SUBDEV_VBIOS, | ||
12 | |||
13 | /* All subdevs from DEVINIT to DEVINIT_LAST will be created before | ||
14 | * *any* of them are initialised. This subdev category is used | ||
15 | * for any subdevs that the VBIOS init table parsing may call out | ||
16 | * to during POST. | ||
17 | */ | ||
18 | NVDEV_SUBDEV_DEVINIT, | ||
19 | NVDEV_SUBDEV_IBUS, | ||
20 | NVDEV_SUBDEV_GPIO, | ||
21 | NVDEV_SUBDEV_I2C, | ||
22 | NVDEV_SUBDEV_DEVINIT_LAST = NVDEV_SUBDEV_I2C, | ||
23 | |||
24 | /* This grouping of subdevs are initialised right after they've | ||
25 | * been created, and are allowed to assume any subdevs in the | ||
26 | * list above them exist and have been initialised. | ||
27 | */ | ||
28 | NVDEV_SUBDEV_FUSE, | ||
29 | NVDEV_SUBDEV_MXM, | ||
30 | NVDEV_SUBDEV_MC, | ||
31 | NVDEV_SUBDEV_BUS, | ||
32 | NVDEV_SUBDEV_TIMER, | ||
33 | NVDEV_SUBDEV_FB, | ||
34 | NVDEV_SUBDEV_LTC, | ||
35 | NVDEV_SUBDEV_INSTMEM, | ||
36 | NVDEV_SUBDEV_MMU, | ||
37 | NVDEV_SUBDEV_BAR, | ||
38 | NVDEV_SUBDEV_PMU, | ||
39 | NVDEV_SUBDEV_VOLT, | ||
40 | NVDEV_SUBDEV_THERM, | ||
41 | NVDEV_SUBDEV_CLK, | ||
42 | |||
43 | NVDEV_ENGINE_FIRST, | ||
44 | NVDEV_ENGINE_DMAOBJ = NVDEV_ENGINE_FIRST, | ||
45 | NVDEV_ENGINE_IFB, | ||
46 | NVDEV_ENGINE_FIFO, | ||
47 | NVDEV_ENGINE_SW, | ||
48 | NVDEV_ENGINE_GR, | ||
49 | NVDEV_ENGINE_MPEG, | ||
50 | NVDEV_ENGINE_ME, | ||
51 | NVDEV_ENGINE_VP, | ||
52 | NVDEV_ENGINE_CIPHER, | ||
53 | NVDEV_ENGINE_BSP, | ||
54 | NVDEV_ENGINE_MSPPP, | ||
55 | NVDEV_ENGINE_CE0, | ||
56 | NVDEV_ENGINE_CE1, | ||
57 | NVDEV_ENGINE_CE2, | ||
58 | NVDEV_ENGINE_VIC, | ||
59 | NVDEV_ENGINE_MSENC, | ||
60 | NVDEV_ENGINE_DISP, | ||
61 | NVDEV_ENGINE_PM, | ||
62 | NVDEV_ENGINE_MSVLD, | ||
63 | NVDEV_ENGINE_SEC, | ||
64 | NVDEV_ENGINE_MSPDEC, | ||
65 | |||
66 | NVDEV_SUBDEV_NR, | ||
67 | }; | ||
68 | |||
69 | struct nouveau_device { | 9 | struct nouveau_device { |
70 | struct nouveau_engine engine; | 10 | struct nouveau_engine engine; |
71 | struct list_head head; | 11 | struct list_head head; |
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/devidx.h b/drivers/gpu/drm/nouveau/include/nvkm/core/devidx.h new file mode 100644 index 000000000000..60c5888b5df3 --- /dev/null +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/devidx.h | |||
@@ -0,0 +1,62 @@ | |||
1 | #ifndef __NVKM_DEVIDX_H__ | ||
2 | #define __NVKM_DEVIDX_H__ | ||
3 | enum nvkm_devidx { | ||
4 | NVDEV_ENGINE_DEVICE, | ||
5 | NVDEV_SUBDEV_VBIOS, | ||
6 | |||
7 | /* All subdevs from DEVINIT to DEVINIT_LAST will be created before | ||
8 | * *any* of them are initialised. This subdev category is used | ||
9 | * for any subdevs that the VBIOS init table parsing may call out | ||
10 | * to during POST. | ||
11 | */ | ||
12 | NVDEV_SUBDEV_DEVINIT, | ||
13 | NVDEV_SUBDEV_IBUS, | ||
14 | NVDEV_SUBDEV_GPIO, | ||
15 | NVDEV_SUBDEV_I2C, | ||
16 | NVDEV_SUBDEV_DEVINIT_LAST = NVDEV_SUBDEV_I2C, | ||
17 | |||
18 | /* This grouping of subdevs are initialised right after they've | ||
19 | * been created, and are allowed to assume any subdevs in the | ||
20 | * list above them exist and have been initialised. | ||
21 | */ | ||
22 | NVDEV_SUBDEV_FUSE, | ||
23 | NVDEV_SUBDEV_MXM, | ||
24 | NVDEV_SUBDEV_MC, | ||
25 | NVDEV_SUBDEV_BUS, | ||
26 | NVDEV_SUBDEV_TIMER, | ||
27 | NVDEV_SUBDEV_FB, | ||
28 | NVDEV_SUBDEV_LTC, | ||
29 | NVDEV_SUBDEV_INSTMEM, | ||
30 | NVDEV_SUBDEV_MMU, | ||
31 | NVDEV_SUBDEV_BAR, | ||
32 | NVDEV_SUBDEV_PMU, | ||
33 | NVDEV_SUBDEV_VOLT, | ||
34 | NVDEV_SUBDEV_THERM, | ||
35 | NVDEV_SUBDEV_CLK, | ||
36 | |||
37 | NVDEV_ENGINE_FIRST, | ||
38 | NVDEV_ENGINE_DMAOBJ = NVDEV_ENGINE_FIRST, | ||
39 | NVDEV_ENGINE_IFB, | ||
40 | NVDEV_ENGINE_FIFO, | ||
41 | NVDEV_ENGINE_SW, | ||
42 | NVDEV_ENGINE_GR, | ||
43 | NVDEV_ENGINE_MPEG, | ||
44 | NVDEV_ENGINE_ME, | ||
45 | NVDEV_ENGINE_VP, | ||
46 | NVDEV_ENGINE_CIPHER, | ||
47 | NVDEV_ENGINE_BSP, | ||
48 | NVDEV_ENGINE_MSPPP, | ||
49 | NVDEV_ENGINE_CE0, | ||
50 | NVDEV_ENGINE_CE1, | ||
51 | NVDEV_ENGINE_CE2, | ||
52 | NVDEV_ENGINE_VIC, | ||
53 | NVDEV_ENGINE_MSENC, | ||
54 | NVDEV_ENGINE_DISP, | ||
55 | NVDEV_ENGINE_PM, | ||
56 | NVDEV_ENGINE_MSVLD, | ||
57 | NVDEV_ENGINE_SEC, | ||
58 | NVDEV_ENGINE_MSPDEC, | ||
59 | |||
60 | NVDEV_SUBDEV_NR, | ||
61 | }; | ||
62 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h index 68f1c419d156..152c842e1f66 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __NOUVEAU_SUBDEV_H__ | 2 | #define __NOUVEAU_SUBDEV_H__ |
3 | 3 | ||
4 | #include <core/object.h> | 4 | #include <core/object.h> |
5 | #include <core/devidx.h> | ||
5 | 6 | ||
6 | #define NV_SUBDEV_(sub,var) (NV_SUBDEV_CLASS | ((var) << 8) | (sub)) | 7 | #define NV_SUBDEV_(sub,var) (NV_SUBDEV_CLASS | ((var) << 8) | (sub)) |
7 | #define NV_SUBDEV(name,var) NV_SUBDEV_(NVDEV_SUBDEV_##name, (var)) | 8 | #define NV_SUBDEV(name,var) NV_SUBDEV_(NVDEV_SUBDEV_##name, (var)) |