summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_internal.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-12-03 13:03:55 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2019-12-05 10:43:14 +0300
commit5c7a0bb0cffc47a76923192034f5a6ba17ede33a (patch)
treed11099cb9a1cc5b78685eceb1d63e50404385412 /drivers/gpu/drm/drm_internal.h
parent99a375519eeaac617a0d5859d5a987049d548f59 (diff)
downloadlinux-5c7a0bb0cffc47a76923192034f5a6ba17ede33a.tar.xz
drm/pci: Only build drm_pci.c if CONFIG_PCI is set
Non-PCI systems should not build PCI helpers. Set up source code, header file and Makefile accordingly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-2-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/drm_internal.h')
-rw-r--r--drivers/gpu/drm/drm_internal.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index 51a2055c8f18..6937bf923f05 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -45,12 +45,34 @@ struct drm_file *drm_file_alloc(struct drm_minor *minor);
void drm_file_free(struct drm_file *file);
void drm_lastclose(struct drm_device *dev);
+#ifdef CONFIG_PCI
+
/* drm_pci.c */
int drm_irq_by_busid(struct drm_device *dev, void *data,
struct drm_file *file_priv);
void drm_pci_agp_destroy(struct drm_device *dev);
int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
+#else
+
+static inline int drm_irq_by_busid(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
+{
+ return -EINVAL;
+}
+
+static inline void drm_pci_agp_destroy(struct drm_device *dev)
+{
+}
+
+static inline int drm_pci_set_busid(struct drm_device *dev,
+ struct drm_master *master)
+{
+ return -EINVAL;
+}
+
+#endif
+
/* drm_prime.c */
int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);