public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org, David Airlie <airlied@redhat.com>
Cc: andr2000@gmail.com, Gerd Hoffmann <kraxel@redhat.com>,
	David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org (open list),
	virtualization@lists.linux-foundation.org (open list:DRM DRIVER
	FOR BOCHS VIRTUAL GPU)
Subject: [PATCH v2 14/15] drm/bochs: move remaining fb bits to kms
Date: Tue,  8 Jan 2019 12:25:18 +0100	[thread overview]
Message-ID: <20190108112519.27473-15-kraxel@redhat.com> (raw)
In-Reply-To: <20190108112519.27473-1-kraxel@redhat.com>

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>
---
 drivers/gpu/drm/bochs/bochs_fbdev.c | 29 -----------------------------
 drivers/gpu/drm/bochs/bochs_kms.c   | 17 +++++++++++++++++
 drivers/gpu/drm/bochs/Makefile      |  2 +-
 3 files changed, 18 insertions(+), 30 deletions(-)
 delete mode 100644 drivers/gpu/drm/bochs/bochs_fbdev.c

diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
deleted file mode 100644
index 7cac3f5253..0000000000
--- a/drivers/gpu/drm/bochs/bochs_fbdev.c
+++ /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,
-};
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index fc856a02a2..e9d5dbc346 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -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)
 {
diff --git a/drivers/gpu/drm/bochs/Makefile b/drivers/gpu/drm/bochs/Makefile
index 98ef60a19e..e9e0f8f5eb 100644
--- a/drivers/gpu/drm/bochs/Makefile
+++ b/drivers/gpu/drm/bochs/Makefile
@@ -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
-- 
2.9.3


  parent reply	other threads:[~2019-01-08 11:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190108112519.27473-1-kraxel@redhat.com>
2019-01-08 11:25 ` [PATCH v2 01/15] drm/bochs: encoder cleanup Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 02/15] drm/bochs: split bochs_hw_setmode Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 03/15] drm/bochs: atomic: add atomic_flush+atomic_enable callbacks Gerd Hoffmann
2019-01-09 10:06   ` Daniel Vetter
2019-01-08 11:25 ` [PATCH v2 04/15] drm/bochs: atomic: add mode_set_nofb callback Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 05/15] drm/bochs: atomic: switch planes to atomic, wire up helpers Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 06/15] drm/bochs: atomic: use atomic set_config helper Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 07/15] drm/bochs: atomic: use atomic page_flip helper Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 08/15] drm/bochs: atomic: set DRIVER_ATOMIC Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 09/15] drm/bochs: remove old bochs_crtc_* functions Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 10/15] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin() Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 11/15] drm/bochs: add basic prime support Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 12/15] drm/bochs: switch to generic drm fbdev emulation Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 13/15] drm/bochs: drop old fbdev emulation code Gerd Hoffmann
2019-01-08 11:25 ` Gerd Hoffmann [this message]
2019-01-08 11:25 ` [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin Gerd Hoffmann
2019-01-09 10:10   ` Daniel Vetter
2019-01-09 14:54     ` Gerd Hoffmann
2019-01-09 17:35       ` Daniel Vetter
2019-01-09 18:45         ` Alex Deucher
2019-01-09 20:51         ` Gerd Hoffmann
2019-01-09 21:45           ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190108112519.27473-15-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=andr2000@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox