drm/bochs: move remaining fb bits to kms
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 11 Jan 2019 05:37:52 +0000 (06:37 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 14 Jan 2019 07:39:17 +0000 (08:39 +0100)
bochs_fbdev.c is almost empty now.  Move the remaining framebuffer bits
over to bochs_kms.c.  Pure code motion. No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-17-kraxel@redhat.com
drivers/gpu/drm/bochs/Makefile
drivers/gpu/drm/bochs/bochs_fbdev.c [deleted file]
drivers/gpu/drm/bochs/bochs_kms.c

index 98ef60a19e8f06968cf34b05a224dd200ddc3945..e9e0f8f5eb5b6edde7784131bc685ea2fc2bd0dd 100644 (file)
@@ -1,3 +1,3 @@
-bochs-drm-y := bochs_drv.o bochs_mm.o bochs_kms.o bochs_fbdev.o bochs_hw.o
+bochs-drm-y := bochs_drv.o bochs_mm.o bochs_kms.o bochs_hw.o
 
 obj-$(CONFIG_DRM_BOCHS)        += bochs-drm.o
diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
deleted file mode 100644 (file)
index 7cac3f5..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#include "bochs.h"
-#include <drm/drm_atomic_helper.h>
-#include <drm/drm_gem_framebuffer_helper.h>
-
-/* ---------------------------------------------------------------------- */
-
-static struct drm_framebuffer *
-bochs_gem_fb_create(struct drm_device *dev, struct drm_file *file,
-                   const struct drm_mode_fb_cmd2 *mode_cmd)
-{
-       if (mode_cmd->pixel_format != DRM_FORMAT_XRGB8888 &&
-           mode_cmd->pixel_format != DRM_FORMAT_BGRX8888)
-               return ERR_PTR(-EINVAL);
-
-       return drm_gem_fb_create(dev, file, mode_cmd);
-}
-
-const struct drm_mode_config_funcs bochs_mode_funcs = {
-       .fb_create = bochs_gem_fb_create,
-       .atomic_check = drm_atomic_helper_check,
-       .atomic_commit = drm_atomic_helper_commit,
-};
index fc856a02a271a45f921a4036e62e0f752ecde874..e9d5dbc34676af19b3d0bb0eb5bd6dd8445d5232 100644 (file)
@@ -9,6 +9,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_atomic_uapi.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 
 static int defx = 1024;
 static int defy = 768;
@@ -256,6 +257,22 @@ static void bochs_connector_init(struct drm_device *dev)
        }
 }
 
+static struct drm_framebuffer *
+bochs_gem_fb_create(struct drm_device *dev, struct drm_file *file,
+                   const struct drm_mode_fb_cmd2 *mode_cmd)
+{
+       if (mode_cmd->pixel_format != DRM_FORMAT_XRGB8888 &&
+           mode_cmd->pixel_format != DRM_FORMAT_BGRX8888)
+               return ERR_PTR(-EINVAL);
+
+       return drm_gem_fb_create(dev, file, mode_cmd);
+}
+
+const struct drm_mode_config_funcs bochs_mode_funcs = {
+       .fb_create = bochs_gem_fb_create,
+       .atomic_check = drm_atomic_helper_check,
+       .atomic_commit = drm_atomic_helper_commit,
+};
 
 int bochs_kms_init(struct bochs_device *bochs)
 {