[PATCH] staging: vboxvideo: Use CONFIG_DRM_KMS_FB_HELPER to check for fbdefio availability
Hans de Goede
hdegoede at redhat.com
Thu Aug 31 15:03:17 UTC 2017
Checking for CONFIG_FB_DEFERRED_IO is not the right thing to do since
the fbdev code may be built as a module while vboxvideo is builtin.
This can only happen when DRM_KMS_FB_HELPER is not set:
a) DRM_VBOXVIDEO selects DRM_KMS_HELPER
b) DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER
c) DRM_KMS_FB_HELPER selects FB_DEFERRED_IO
So when DRM_KMS_FB_HELPER is set and vboxvideo is builtin then
FB_DEFERRED_IO must be builtin too.
This commit moves the #ifdefs around fbdefio code over to
CONFIG_DRM_KMS_FB_HELPER, as other drm drivers already do, fixing:
drivers/staging/vboxvideo/vbox_fb.o: In function `vbox_fbdev_fini':
vbox_fb.c:(.text+0x36): undefined reference to `fb_deferred_io_cleanup'
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
drivers/staging/vboxvideo/vbox_fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c
index a85797b45ecf..8aed248db6e2 100644
--- a/drivers/staging/vboxvideo/vbox_fb.c
+++ b/drivers/staging/vboxvideo/vbox_fb.c
@@ -45,7 +45,7 @@
#include "vbox_drv.h"
#include "vboxvideo.h"
-#ifdef CONFIG_FB_DEFERRED_IO
+#ifdef CONFIG_DRM_KMS_FB_HELPER
static struct fb_deferred_io vbox_defio = {
.delay = HZ / 30,
.deferred_io = drm_fb_helper_deferred_io,
@@ -173,7 +173,7 @@ static int vboxfb_create(struct drm_fb_helper *helper,
info->screen_base = bo->kmap.virtual;
info->screen_size = size;
-#ifdef CONFIG_FB_DEFERRED_IO
+#ifdef CONFIG_DRM_KMS_FB_HELPER
info->fbdefio = &vbox_defio;
fb_deferred_io_init(info);
#endif
@@ -195,7 +195,7 @@ void vbox_fbdev_fini(struct drm_device *dev)
struct vbox_fbdev *fbdev = vbox->fbdev;
struct vbox_framebuffer *afb = &fbdev->afb;
-#ifdef CONFIG_FB_DEFERRED_IO
+#ifdef CONFIG_DRM_KMS_FB_HELPER
if (fbdev->helper.fbdev && fbdev->helper.fbdev->fbdefio)
fb_deferred_io_cleanup(fbdev->helper.fbdev);
#endif
--
2.13.4
More information about the dri-devel
mailing list