drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 15 Apr 2021 11:00:37 +0000 (13:00 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 26 Apr 2021 08:45:30 +0000 (10:45 +0200)
Respect DRM's kconfig setting for fbdev console emulation. If enabled,
it will select all required config options. So remove them from vmwgfx's
Kconfig file.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-2-tzimmermann@suse.de
drivers/gpu/drm/vmwgfx/Kconfig
drivers/gpu/drm/vmwgfx/Makefile
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

index 15acdf2..b3a3419 100644 (file)
@@ -2,12 +2,7 @@
 config DRM_VMWGFX
        tristate "DRM driver for VMware Virtual GPU"
        depends on DRM && PCI && X86 && MMU
-       select FB_DEFERRED_IO
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
        select DRM_TTM
-       select FB
        select MAPPING_DIRTY_HELPERS
        # Only needed for the transitional use of drm_crtc_init - can be removed
        # again once vmwgfx sets up the primary plane itself.
@@ -20,7 +15,7 @@ config DRM_VMWGFX
          The compiled module will be called "vmwgfx.ko".
 
 config DRM_VMWGFX_FBCON
-       depends on DRM_VMWGFX && FB
+       depends on DRM_VMWGFX && DRM_FBDEV_EMULATION
        bool "Enable framebuffer console under vmwgfx by default"
        help
           Choose this option if you are shipping a new vmwgfx
index 8c02fa5..9f57430 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
-           vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \
+           vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \
            vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \
            vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \
            vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \
@@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
            vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \
            ttm_object.o ttm_lock.o ttm_memory.o
 
+vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o
 vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o
+
 obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o
index 7e65187..e7836da 100644 (file)
@@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv,
  * Kernel framebuffer - vmwgfx_fb.c
  */
 
+#ifdef CONFIG_DRM_FBDEV_EMULATION
 int vmw_fb_init(struct vmw_private *vmw_priv);
 int vmw_fb_close(struct vmw_private *dev_priv);
 int vmw_fb_off(struct vmw_private *vmw_priv);
 int vmw_fb_on(struct vmw_private *vmw_priv);
+#else
+static inline int vmw_fb_init(struct vmw_private *vmw_priv)
+{
+       return 0;
+}
+static inline int vmw_fb_close(struct vmw_private *dev_priv)
+{
+       return 0;
+}
+static inline int vmw_fb_off(struct vmw_private *vmw_priv)
+{
+       return 0;
+}
+static inline int vmw_fb_on(struct vmw_private *vmw_priv)
+{
+       return 0;
+}
+#endif
 
 /**
  * Kernel modesetting - vmwgfx_kms.c