All of lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: dri-devel@lists.freedesktop.org, daniel@ffwll.ch
Cc: linux-arm-msm@vger.kernel.org, airlied@linux.ie,
	"Archit Taneja" <architt@codeaurora.org>,
	"Haixia Shi" <hshi@chromium.org>,
	"Stéphane Marchesin" <marcheu@chromium.org>
Subject: [RFC 12/21] drm/udl: Remove FB_KMS_HELPER and FB related config options
Date: Mon, 13 Jul 2015 12:13:59 +0530	[thread overview]
Message-ID: <1436769848-4990-13-git-send-email-architt@codeaurora.org> (raw)
In-Reply-To: <1436769848-4990-1-git-send-email-architt@codeaurora.org>

Remove FB_* config options since the driver doesn't call any fbdev
functions directly.

Remove FB_KMS_HELPER as this would now be selected by the top level
FBDEV_EMULATION config option. If the fbdev emulation isn't selected,
the drm_fb_helper functions will be stubbed out.

The code relying on DEFERRED_IO can't be stubbed out using drm_fb_helper
functions. This is because the deferred io members in fbdev core structs
are defined based on whether FB_DEFERRED_IO is defined or not.

For now, wrap around deferred io code with an #ifdef check for
CONFIG_DEFERRED_IO. We could consider creating stub fb helper functions
here, but this would require some changes in the core fbdev structs.

Cc: David Airlie <airlied@linux.ie>
Cc: Haixia Shi <hshi@chromium.org>
Cc: "Stéphane Marchesin" <marcheu@chromium.org>

Signed-off-by: Archit Taneja <architt@codeaurora.org>
---
 drivers/gpu/drm/udl/Kconfig  |  5 -----
 drivers/gpu/drm/udl/udl_fb.c | 10 ++++++++++
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/udl/Kconfig b/drivers/gpu/drm/udl/Kconfig
index 613ab06..1616ec4 100644
--- a/drivers/gpu/drm/udl/Kconfig
+++ b/drivers/gpu/drm/udl/Kconfig
@@ -4,12 +4,7 @@ config DRM_UDL
 	depends on USB_SUPPORT
 	depends on USB_ARCH_HAS_HCD
 	select USB
-	select FB_SYS_FILLRECT
-	select FB_SYS_COPYAREA
-	select FB_SYS_IMAGEBLIT
-	select FB_DEFERRED_IO
 	select DRM_KMS_HELPER
-        select DRM_KMS_FB_HELPER
 	help
 	  This is a KMS driver for the USB displaylink video adapters.
           Say M/Y to add support for these devices via drm/kms interfaces.
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index 9fd6e83..4aa5118d 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -24,11 +24,15 @@
 
 #define DL_DEFIO_WRITE_DELAY    (HZ/20) /* fb_deferred_io.delay in jiffies */
 
+#ifdef CONFIG_FB_DEFERRED_IO
 static int fb_defio = 0;  /* Optionally enable experimental fb_defio mmap support */
+#endif
 static int fb_bpp = 16;
 
 module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
+#ifdef CONFIG_FB_DEFERRED_IO
 module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
+#endif
 
 struct udl_fbdev {
 	struct drm_fb_helper helper;
@@ -78,6 +82,7 @@ static uint16_t rgb16(uint32_t col)
 }
 #endif
 
+#ifdef CONFIG_FB_DEFERRED_IO
 /*
  * NOTE: fb_defio.c is holding info->fbdefio.mutex
  *   Touching ANY framebuffer memory that triggers a page fault
@@ -139,6 +144,7 @@ error:
 		    >> 10)), /* Kcycles */
 		   &udl->cpu_kcycles_used);
 }
+#endif
 
 int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
 		      int width, int height)
@@ -331,6 +337,7 @@ static int udl_fb_open(struct fb_info *info, int user)
 
 	ufbdev->fb_count++;
 
+#ifdef CONFIG_FB_DEFERRED_IO
 	if (fb_defio && (info->fbdefio == NULL)) {
 		/* enable defio at last moment if not disabled by client */
 
@@ -346,6 +353,7 @@ static int udl_fb_open(struct fb_info *info, int user)
 		info->fbdefio = fbdefio;
 		fb_deferred_io_init(info);
 	}
+#endif
 
 	pr_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n",
 		  info->node, user, info, ufbdev->fb_count);
@@ -363,12 +371,14 @@ static int udl_fb_release(struct fb_info *info, int user)
 
 	ufbdev->fb_count--;
 
+#ifdef CONFIG_FB_DEFERRED_IO
 	if ((ufbdev->fb_count == 0) && (info->fbdefio)) {
 		fb_deferred_io_cleanup(info);
 		kfree(info->fbdefio);
 		info->fbdefio = NULL;
 		info->fbops->fb_mmap = udl_fb_mmap;
 	}
+#endif
 
 	pr_warn("released /dev/fb%d user=%d count=%d\n",
 		info->node, user, ufbdev->fb_count);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

  parent reply	other threads:[~2015-07-13  6:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  6:43 [RFC 00/21] drm: fb emulation: Step 3: Remove FB_KMS_HELPER config from drivers Archit Taneja
2015-07-13  6:43 ` [RFC 01/21] drm/cirrus: Remove FB_KMS_HELPER and FB related config options Archit Taneja
2015-07-13  6:43 ` [RFC 02/21] drm/rockchip: " Archit Taneja
2015-07-13  6:43 ` [RFC 03/21] drm/armada: " Archit Taneja
2015-07-13  6:43 ` [RFC 04/21] drm/ast: " Archit Taneja
2015-07-13  6:43 ` [RFC 05/21] drm/omap: " Archit Taneja
2015-08-01 10:02   ` Laurent Pinchart
2015-08-05  7:04     ` Archit Taneja
2015-07-13  6:43 ` [RFC 06/21] drm/exynos: " Archit Taneja
2015-07-13  6:43 ` [RFC 07/21] drm/gma500: " Archit Taneja
2015-07-13  6:43 ` [RFC 08/21] drm/mgag200: " Archit Taneja
2015-07-13  6:43 ` [RFC 09/21] drm/radeon: " Archit Taneja
2015-07-13  6:43 ` [RFC 10/21] drm/qxl: " Archit Taneja
2015-07-13  7:38   ` Daniel Vetter
2015-07-13  6:43 ` [RFC 11/21] drm/nouveau: " Archit Taneja
2015-07-13  6:43 ` Archit Taneja [this message]
2015-07-13  6:44 ` [RFC 13/21] drm/bochs: " Archit Taneja
2015-07-13  6:44 ` [RFC 14/21] drm/amdgpu: " Archit Taneja
2015-07-13  6:44 ` [RFC 15/21] drm/virtio: " Archit Taneja
2015-07-13  6:44 ` [RFC 16/21] drm/fb_cma_helper: " Archit Taneja
2015-07-13  6:44 ` [RFC 17/21] drm/atmel-hlcdc: Remove FB_KMS_HELPER config option Archit Taneja
2015-07-13  6:44 ` [RFC 18/21] drm/imx: " Archit Taneja
2015-07-13  6:44 ` [RFC 19/21] drm/rcar-du: " Archit Taneja
2015-08-01 10:02   ` Laurent Pinchart
2015-07-13  6:44 ` [RFC 20/21] drm/shmobile: " Archit Taneja
2015-08-01 10:02   ` Laurent Pinchart
2015-07-13  6:44 ` [RFC 21/21] drm/tilcdc: " Archit Taneja
2015-07-13 15:30 ` [RFC 00/21] drm: fb emulation: Step 3: Remove FB_KMS_HELPER config from drivers Alex Deucher
2015-07-13 15:37   ` Daniel Vetter
2015-07-14  6:31     ` Archit Taneja
2015-07-14  7:32       ` Daniel Vetter
2015-07-14  8:02       ` Thierry Reding
2015-07-14  8:23         ` Archit Taneja

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=1436769848-4990-13-git-send-email-architt@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hshi@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marcheu@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.