diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-04-25 03:23:43 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-04-26 01:38:10 -0400 |
commit | dded35dee323e286ef444f148abaf88adb58d4f3 (patch) | |
tree | 68c1475e912b438dfa7d3917a8adb3ef3323c18c /drivers/gpu/drm/nouveau/core | |
parent | 2ecda48b36ecb4ec21d1d5ba7b8ccaa7ec701795 (diff) |
drm/nouveau/device: convert to engine, rather than subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/core/client.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/core/engine.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/base.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/base.c) | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nv04.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nv04.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nv10.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nv10.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nv20.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nv20.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nv30.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nv30.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nv40.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nv40.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nv50.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nv50.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nvc0.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nvc0.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/nve0.c (renamed from drivers/gpu/drm/nouveau/core/subdev/device/nve0.c) | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/core/device.h | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/engine/device.h (renamed from drivers/gpu/drm/nouveau/core/include/subdev/device.h) | 0 |
13 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/client.c b/drivers/gpu/drm/nouveau/core/core/client.c index 295c22165eac..2be389d72f52 100644 --- a/drivers/gpu/drm/nouveau/core/core/client.c +++ b/drivers/gpu/drm/nouveau/core/core/client.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <core/handle.h> | 27 | #include <core/handle.h> |
28 | #include <core/option.h> | 28 | #include <core/option.h> |
29 | 29 | ||
30 | #include <subdev/device.h> | 30 | #include <engine/device.h> |
31 | 31 | ||
32 | static void | 32 | static void |
33 | nouveau_client_dtor(struct nouveau_object *object) | 33 | nouveau_client_dtor(struct nouveau_object *object) |
diff --git a/drivers/gpu/drm/nouveau/core/core/engine.c b/drivers/gpu/drm/nouveau/core/core/engine.c index 09b3bd502fd0..c8bed4a26833 100644 --- a/drivers/gpu/drm/nouveau/core/core/engine.c +++ b/drivers/gpu/drm/nouveau/core/core/engine.c | |||
@@ -33,7 +33,6 @@ nouveau_engine_create_(struct nouveau_object *parent, | |||
33 | const char *iname, const char *fname, | 33 | const char *iname, const char *fname, |
34 | int length, void **pobject) | 34 | int length, void **pobject) |
35 | { | 35 | { |
36 | struct nouveau_device *device = nv_device(parent); | ||
37 | struct nouveau_engine *engine; | 36 | struct nouveau_engine *engine; |
38 | int ret; | 37 | int ret; |
39 | 38 | ||
@@ -43,7 +42,8 @@ nouveau_engine_create_(struct nouveau_object *parent, | |||
43 | if (ret) | 42 | if (ret) |
44 | return ret; | 43 | return ret; |
45 | 44 | ||
46 | if (!nouveau_boolopt(device->cfgopt, iname, enable)) { | 45 | if ( parent && |
46 | !nouveau_boolopt(nv_device(parent)->cfgopt, iname, enable)) { | ||
47 | if (!enable) | 47 | if (!enable) |
48 | nv_warn(engine, "disabled, %s=1 to enable\n", iname); | 48 | nv_warn(engine, "disabled, %s=1 to enable\n", iname); |
49 | return -ENODEV; | 49 | return -ENODEV; |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/base.c b/drivers/gpu/drm/nouveau/core/engine/device/base.c index 3937ced5c753..35616424f559 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #include <core/class.h> | 30 | #include <core/class.h> |
31 | 31 | ||
32 | #include <subdev/device.h> | 32 | #include <engine/device.h> |
33 | 33 | ||
34 | static DEFINE_MUTEX(nv_devices_mutex); | 34 | static DEFINE_MUTEX(nv_devices_mutex); |
35 | static LIST_HEAD(nv_devices); | 35 | static LIST_HEAD(nv_devices); |
@@ -428,15 +428,15 @@ nouveau_device_dtor(struct nouveau_object *object) | |||
428 | list_del(&device->head); | 428 | list_del(&device->head); |
429 | mutex_unlock(&nv_devices_mutex); | 429 | mutex_unlock(&nv_devices_mutex); |
430 | 430 | ||
431 | if (device->base.mmio) | 431 | if (nv_subdev(device)->mmio) |
432 | iounmap(device->base.mmio); | 432 | iounmap(nv_subdev(device)->mmio); |
433 | 433 | ||
434 | nouveau_subdev_destroy(&device->base); | 434 | nouveau_engine_destroy(&device->base); |
435 | } | 435 | } |
436 | 436 | ||
437 | static struct nouveau_oclass | 437 | static struct nouveau_oclass |
438 | nouveau_device_oclass = { | 438 | nouveau_device_oclass = { |
439 | .handle = NV_SUBDEV(DEVICE, 0x00), | 439 | .handle = NV_ENGINE(DEVICE, 0x00), |
440 | .ofuncs = &(struct nouveau_ofuncs) { | 440 | .ofuncs = &(struct nouveau_ofuncs) { |
441 | .dtor = nouveau_device_dtor, | 441 | .dtor = nouveau_device_dtor, |
442 | }, | 442 | }, |
@@ -456,7 +456,7 @@ nouveau_device_create_(struct pci_dev *pdev, u64 name, const char *sname, | |||
456 | goto done; | 456 | goto done; |
457 | } | 457 | } |
458 | 458 | ||
459 | ret = nouveau_subdev_create_(NULL, NULL, &nouveau_device_oclass, 0, | 459 | ret = nouveau_engine_create_(NULL, NULL, &nouveau_device_oclass, true, |
460 | "DEVICE", "device", length, pobject); | 460 | "DEVICE", "device", length, pobject); |
461 | device = *pobject; | 461 | device = *pobject; |
462 | if (ret) | 462 | if (ret) |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nv04.c b/drivers/gpu/drm/nouveau/core/engine/device/nv04.c index 473c5c03d3c9..a0284cf09c0f 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nv04.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nv04.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/i2c.h> | 27 | #include <subdev/i2c.h> |
@@ -34,6 +33,7 @@ | |||
34 | #include <subdev/instmem.h> | 33 | #include <subdev/instmem.h> |
35 | #include <subdev/vm.h> | 34 | #include <subdev/vm.h> |
36 | 35 | ||
36 | #include <engine/device.h> | ||
37 | #include <engine/dmaobj.h> | 37 | #include <engine/dmaobj.h> |
38 | #include <engine/fifo.h> | 38 | #include <engine/fifo.h> |
39 | #include <engine/software.h> | 39 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nv10.c b/drivers/gpu/drm/nouveau/core/engine/device/nv10.c index d0774f5bebe1..1b7809a095c3 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nv10.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nv10.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/gpio.h> | 27 | #include <subdev/gpio.h> |
@@ -35,6 +34,7 @@ | |||
35 | #include <subdev/instmem.h> | 34 | #include <subdev/instmem.h> |
36 | #include <subdev/vm.h> | 35 | #include <subdev/vm.h> |
37 | 36 | ||
37 | #include <engine/device.h> | ||
38 | #include <engine/dmaobj.h> | 38 | #include <engine/dmaobj.h> |
39 | #include <engine/fifo.h> | 39 | #include <engine/fifo.h> |
40 | #include <engine/software.h> | 40 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nv20.c b/drivers/gpu/drm/nouveau/core/engine/device/nv20.c index ab920e0dc45b..12a4005fa619 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nv20.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nv20.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/gpio.h> | 27 | #include <subdev/gpio.h> |
@@ -36,6 +35,7 @@ | |||
36 | #include <subdev/instmem.h> | 35 | #include <subdev/instmem.h> |
37 | #include <subdev/vm.h> | 36 | #include <subdev/vm.h> |
38 | 37 | ||
38 | #include <engine/device.h> | ||
39 | #include <engine/dmaobj.h> | 39 | #include <engine/dmaobj.h> |
40 | #include <engine/fifo.h> | 40 | #include <engine/fifo.h> |
41 | #include <engine/software.h> | 41 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nv30.c b/drivers/gpu/drm/nouveau/core/engine/device/nv30.c index 5f2110261b04..cef0f1ea4c21 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nv30.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nv30.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/gpio.h> | 27 | #include <subdev/gpio.h> |
@@ -35,6 +34,7 @@ | |||
35 | #include <subdev/instmem.h> | 34 | #include <subdev/instmem.h> |
36 | #include <subdev/vm.h> | 35 | #include <subdev/vm.h> |
37 | 36 | ||
37 | #include <engine/device.h> | ||
38 | #include <engine/dmaobj.h> | 38 | #include <engine/dmaobj.h> |
39 | #include <engine/fifo.h> | 39 | #include <engine/fifo.h> |
40 | #include <engine/software.h> | 40 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nv40.c b/drivers/gpu/drm/nouveau/core/engine/device/nv40.c index f3d55efe9ac9..1719cb0ee595 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nv40.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nv40.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/vm.h> | 27 | #include <subdev/vm.h> |
@@ -37,6 +36,7 @@ | |||
37 | #include <subdev/instmem.h> | 36 | #include <subdev/instmem.h> |
38 | #include <subdev/vm.h> | 37 | #include <subdev/vm.h> |
39 | 38 | ||
39 | #include <engine/device.h> | ||
40 | #include <engine/dmaobj.h> | 40 | #include <engine/dmaobj.h> |
41 | #include <engine/fifo.h> | 41 | #include <engine/fifo.h> |
42 | #include <engine/software.h> | 42 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nv50.c b/drivers/gpu/drm/nouveau/core/engine/device/nv50.c index 04b2d75f4643..5e8c3de75593 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nv50.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/gpio.h> | 27 | #include <subdev/gpio.h> |
@@ -38,6 +37,7 @@ | |||
38 | #include <subdev/vm.h> | 37 | #include <subdev/vm.h> |
39 | #include <subdev/bar.h> | 38 | #include <subdev/bar.h> |
40 | 39 | ||
40 | #include <engine/device.h> | ||
41 | #include <engine/dmaobj.h> | 41 | #include <engine/dmaobj.h> |
42 | #include <engine/fifo.h> | 42 | #include <engine/fifo.h> |
43 | #include <engine/software.h> | 43 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c index 00f869ee53e3..955af122c3a6 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/gpio.h> | 27 | #include <subdev/gpio.h> |
@@ -40,6 +39,7 @@ | |||
40 | #include <subdev/vm.h> | 39 | #include <subdev/vm.h> |
41 | #include <subdev/bar.h> | 40 | #include <subdev/bar.h> |
42 | 41 | ||
42 | #include <engine/device.h> | ||
43 | #include <engine/dmaobj.h> | 43 | #include <engine/dmaobj.h> |
44 | #include <engine/fifo.h> | 44 | #include <engine/fifo.h> |
45 | #include <engine/software.h> | 45 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/nve0.c b/drivers/gpu/drm/nouveau/core/engine/device/nve0.c index 5c12391619fd..e6a77944f43b 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nve0.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <subdev/device.h> | ||
26 | #include <subdev/bios.h> | 25 | #include <subdev/bios.h> |
27 | #include <subdev/bus.h> | 26 | #include <subdev/bus.h> |
28 | #include <subdev/gpio.h> | 27 | #include <subdev/gpio.h> |
@@ -40,6 +39,7 @@ | |||
40 | #include <subdev/vm.h> | 39 | #include <subdev/vm.h> |
41 | #include <subdev/bar.h> | 40 | #include <subdev/bar.h> |
42 | 41 | ||
42 | #include <engine/device.h> | ||
43 | #include <engine/dmaobj.h> | 43 | #include <engine/dmaobj.h> |
44 | #include <engine/fifo.h> | 44 | #include <engine/fifo.h> |
45 | #include <engine/software.h> | 45 | #include <engine/software.h> |
diff --git a/drivers/gpu/drm/nouveau/core/include/core/device.h b/drivers/gpu/drm/nouveau/core/include/core/device.h index d351a4e5819c..05840f3eee98 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/device.h +++ b/drivers/gpu/drm/nouveau/core/include/core/device.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <core/engine.h> | 6 | #include <core/engine.h> |
7 | 7 | ||
8 | enum nv_subdev_type { | 8 | enum nv_subdev_type { |
9 | NVDEV_SUBDEV_DEVICE, | 9 | NVDEV_ENGINE_DEVICE, |
10 | NVDEV_SUBDEV_VBIOS, | 10 | NVDEV_SUBDEV_VBIOS, |
11 | 11 | ||
12 | /* All subdevs from DEVINIT to DEVINIT_LAST will be created before | 12 | /* All subdevs from DEVINIT to DEVINIT_LAST will be created before |
@@ -57,7 +57,7 @@ enum nv_subdev_type { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | struct nouveau_device { | 59 | struct nouveau_device { |
60 | struct nouveau_subdev base; | 60 | struct nouveau_engine base; |
61 | struct list_head head; | 61 | struct list_head head; |
62 | 62 | ||
63 | struct pci_dev *pdev; | 63 | struct pci_dev *pdev; |
@@ -99,7 +99,7 @@ nv_device(void *obj) | |||
99 | 99 | ||
100 | #if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA | 100 | #if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA |
101 | if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || | 101 | if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || |
102 | (nv_hclass(device) & 0xff) != NVDEV_SUBDEV_DEVICE)) { | 102 | (nv_hclass(device) & 0xff) != NVDEV_ENGINE_DEVICE)) { |
103 | nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", | 103 | nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", |
104 | nv_hclass(object), nv_hclass(device)); | 104 | nv_hclass(object), nv_hclass(device)); |
105 | } | 105 | } |
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/device.h b/drivers/gpu/drm/nouveau/core/include/engine/device.h index c9e4c4afa50e..c9e4c4afa50e 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/device.h +++ b/drivers/gpu/drm/nouveau/core/include/engine/device.h | |||