summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_drm.h
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-06-26 09:33:32 +0400
committerBen Skeggs <bskeggs@redhat.com>2014-08-09 23:11:10 +0400
commit8ba9ff11632cb05d6f55555711d8425e32ee44b0 (patch)
treecea1200782a3e1cd4e62d78d1f4dcf9e38679e3d /drivers/gpu/drm/nouveau/nouveau_drm.h
parent04384435fbcd2c5cb70b2e58c8b643822d7e337f (diff)
downloadlinux-8ba9ff11632cb05d6f55555711d8425e32ee44b0.tar.xz
drm/nouveau: support for probing platform devices
Add a platform driver for Nouveau devices declared using the device tree or platform data. This driver currently supports GK20A on Tegra platforms and is only compiled for these platforms if Nouveau is enabled. Nouveau will probe the chip type itself using the BOOT0 register, so all this driver really needs to do is to make sure the module is powered and its clocks active before calling nouveau_drm_platform_probe(). Heavily based on work done by Thierry Reding. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h
index 7efbafaf7c1d..dc342232182d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.h
@@ -39,6 +39,7 @@
#include <drm/ttm/ttm_page_alloc.h>
struct nouveau_channel;
+struct platform_device;
#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)
@@ -157,6 +158,13 @@ nouveau_dev(struct drm_device *dev)
int nouveau_pmops_suspend(struct device *);
int nouveau_pmops_resume(struct device *);
+#define nouveau_platform_device_create(p, u) \
+ nouveau_platform_device_create_(p, sizeof(**u), (void **)u)
+struct drm_device *
+nouveau_platform_device_create_(struct platform_device *pdev,
+ int size, void **pobject);
+void nouveau_drm_device_remove(struct drm_device *dev);
+
#define NV_FATAL(cli, fmt, args...) nv_fatal((cli), fmt, ##args)
#define NV_ERROR(cli, fmt, args...) nv_error((cli), fmt, ##args)
#define NV_WARN(cli, fmt, args...) nv_warn((cli), fmt, ##args)