summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/include/nvkm/core
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:49 +1000
commit26c9e8effebb9166eb1cfba2d164676e98c505c7 (patch)
tree96e5f84d927825fc7d527ae914aeae03257a0844 /drivers/gpu/drm/nouveau/include/nvkm/core
parentc7af0ff0e89327918743052d12bf5536e34c7f1a (diff)
drm/nouveau/device: remove pci/platform_device from common struct
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm/core')
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/core/device.h40
1 files changed, 10 insertions, 30 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h
index 5741bf228762..773951bfd200 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h
@@ -47,13 +47,21 @@ enum nvkm_devidx {
NVKM_ENGINE_SEC,
NVKM_ENGINE_MSPDEC,
- NVKM_SUBDEV_NR,
+ NVKM_SUBDEV_NR
+};
+
+enum nvkm_device_type {
+ NVKM_DEVICE_PCI,
+ NVKM_DEVICE_AGP,
+ NVKM_DEVICE_PCIE,
+ NVKM_DEVICE_TEGRA,
};
struct nvkm_device {
const struct nvkm_device_func *func;
const struct nvkm_device_quirk *quirk;
struct device *dev;
+ enum nvkm_device_type type;
u64 handle;
const char *name;
const char *cfgopt;
@@ -63,9 +71,6 @@ struct nvkm_device {
struct mutex mutex;
int refcount;
- struct pci_dev *pdev;
- struct platform_device *platformdev;
-
void __iomem *pri;
struct nvkm_event event;
@@ -150,6 +155,7 @@ struct nvkm_device_func {
void (*fini)(struct nvkm_device *, bool suspend);
resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar);
resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar);
+ bool cpu_coherent;
};
struct nvkm_device_quirk {
@@ -220,32 +226,6 @@ int nvkm_device_list(u64 *name, int size);
_temp; \
})
-static inline bool
-nv_device_is_pci(struct nvkm_device *device)
-{
- return device->pdev != NULL;
-}
-
-static inline bool
-nv_device_is_cpu_coherent(struct nvkm_device *device)
-{
- return (!IS_ENABLED(CONFIG_ARM) && nv_device_is_pci(device));
-}
-
-static inline struct device *
-nv_device_base(struct nvkm_device *device)
-{
- return nv_device_is_pci(device) ? &device->pdev->dev :
- &device->platformdev->dev;
-}
-
-struct platform_device;
-
-enum nv_bus_type {
- NVKM_BUS_PCI,
- NVKM_BUS_PLATFORM,
-};
-
void nvkm_device_del(struct nvkm_device **);
struct nvkm_device_oclass {