Re: [2/4] drm/armada: Hide fbdev support behind config option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Sui Jingfeng <suijingfeng@xxxxxxxxxxx>

On 2023/3/30 15:30, Thomas Zimmermann wrote:
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@xxxxxxx>
---
  drivers/gpu/drm/armada/Makefile     |  3 ++-
  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);



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux