diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:22 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:48 +0300 |
commit | 2b700825e7a7702fb862edba1262c98040dc1bf6 (patch) | |
tree | 9887b21c63adad8d7aba0a283010c66791d5a1d9 /drivers/gpu/drm/nouveau/include | |
parent | ae0a5b2dd2f54584d677701d989732b464b6d8c9 (diff) | |
download | linux-2b700825e7a7702fb862edba1262c98040dc1bf6.tar.xz |
drm/nouveau/mc: move device irq handling to platform-specific code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include')
4 files changed, 6 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index bc151c64bbad..b4974505af05 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h @@ -146,6 +146,7 @@ struct nvkm_device_func { struct nvkm_device_tegra *(*tegra)(struct nvkm_device *); void *(*dtor)(struct nvkm_device *); int (*preinit)(struct nvkm_device *); + int (*init)(struct nvkm_device *); void (*fini)(struct nvkm_device *, bool suspend); }; @@ -247,9 +248,6 @@ nv_device_resource_start(struct nvkm_device *device, unsigned int bar); resource_size_t nv_device_resource_len(struct nvkm_device *device, unsigned int bar); -int -nv_device_get_irq(struct nvkm_device *device, bool stall); - struct platform_device; enum nv_bus_type { diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h b/drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h index 162986e7f8c4..1755c2d30fcd 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h @@ -5,6 +5,7 @@ struct nvkm_device_tegra { struct nvkm_device device; struct platform_device *pdev; + int irq; }; int nvkm_device_tegra_new(struct platform_device *, diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h index 1fbbdaad7fcd..4de05e718f83 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h @@ -5,24 +5,17 @@ struct nvkm_mc { const struct nvkm_mc_func *func; struct nvkm_subdev subdev; - - unsigned int irq; - bool use_msi; }; +void nvkm_mc_intr(struct nvkm_mc *, bool *handled); void nvkm_mc_intr_unarm(struct nvkm_mc *); void nvkm_mc_intr_rearm(struct nvkm_mc *); -u32 nvkm_mc_intr_mask(struct nvkm_mc *); void nvkm_mc_unk260(struct nvkm_mc *, u32 data); int nv04_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int nv40_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int nv44_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int nv4c_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int nv50_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int g94_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int g98_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int gf100_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int gf106_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int gk20a_mc_new(struct nvkm_device *, int, struct nvkm_mc **); #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h index ea4b0cce6159..ac14fdf2f967 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h @@ -5,13 +5,15 @@ struct nvkm_pci { const struct nvkm_pci_func *func; struct nvkm_subdev subdev; + struct pci_dev *pdev; + int irq; + bool msi; }; u32 nvkm_pci_rd32(struct nvkm_pci *, u16 addr); void nvkm_pci_wr08(struct nvkm_pci *, u16 addr, u8 data); void nvkm_pci_wr32(struct nvkm_pci *, u16 addr, u32 data); void nvkm_pci_rom_shadow(struct nvkm_pci *, bool shadow); -void nvkm_pci_msi_rearm(struct nvkm_pci *); int nv04_pci_new(struct nvkm_device *, int, struct nvkm_pci **); int nv40_pci_new(struct nvkm_device *, int, struct nvkm_pci **); |