diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-30 09:30:44 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-04-21 10:19:41 +0200 |
commit | 169c85edcabcc1a7f01b7b5bee1f918ca49ac14f (patch) | |
tree | abe7fd7e8341c833eb8c1699888a52c9f38b2c72 /drivers/gpu/drm/armada | |
parent | 1c9da7db8899fa0e891997118d75b46d38102497 (diff) | |
download | lwn-169c85edcabcc1a7f01b7b5bee1f918ca49ac14f.tar.gz lwn-169c85edcabcc1a7f01b7b5bee1f918ca49ac14f.zip |
drm/armada: Hide fbdev support behind config option
Only build armada's fbdev emulation if CONFIG_DRM_FBDEV_EMULATION
has been enabled. No functional changes, but allows to build armada
without fbdev.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230330073046.7150-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/armada')
-rw-r--r-- | drivers/gpu/drm/armada/Makefile | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/armada/armada_drm.h | 14 |
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/armada/Makefile b/drivers/gpu/drm/armada/Makefile index 9bc3c3213724..dc75a7db9ed3 100644 --- a/drivers/gpu/drm/armada/Makefile +++ b/drivers/gpu/drm/armada/Makefile @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 -armada-y := armada_crtc.o armada_drv.o armada_fb.o armada_fbdev.o \ +armada-y := armada_crtc.o armada_drv.o armada_fb.o \ armada_gem.o armada_overlay.o armada_plane.o armada_trace.o armada-y += armada_510.o armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o +armada-$(CONFIG_DRM_FBDEV_EMULATION) += armada_fbdev.o obj-$(CONFIG_DRM_ARMADA) := armada.o diff --git a/drivers/gpu/drm/armada/armada_drm.h b/drivers/gpu/drm/armada/armada_drm.h index 6a5a87932576..1475146b1c47 100644 --- a/drivers/gpu/drm/armada/armada_drm.h +++ b/drivers/gpu/drm/armada/armada_drm.h @@ -75,8 +75,18 @@ struct armada_private { #define drm_to_armada_dev(dev) container_of(dev, struct armada_private, drm) -int armada_fbdev_init(struct drm_device *); -void armada_fbdev_fini(struct drm_device *); +#if defined(CONFIG_DRM_FBDEV_EMULATION) +int armada_fbdev_init(struct drm_device *dev); +void armada_fbdev_fini(struct drm_device *dev); +#else +static inline int armada_fbdev_init(struct drm_device *dev) +{ + return 0; +} + +static inline void armada_fbdev_fini(struct drm_device *dev) +{ } +#endif int armada_overlay_plane_create(struct drm_device *, unsigned long); |