Skip to contentSkip to conversation

ARM: Add support for the display controllers in VT8500 and WM8505

PATCH New Alexey Charkov 1 participant 1 message Nov 8, 2010 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 ARM: Add support for the display controllers in VT8500 and WM8505

This adds drivers for the LCD controller found in VIA VT8500 SoC, GOVR display controller found in WonderMedia WM8505 SoC and for the Graphics Engine present in both of them that provides hardware accelerated raster operations (used for copyarea and fillrect).

---

This incorporates fixes to the issues last mentioned by Paul.

I just dropped <asm/irq.h>, as that seems to be not used at all currently (must have been some old cut-and-paste as well). As for the Graphics Engine, I decided not to disable it for now at device exit time, at least until we reach a conclusion on how or whether to implement support for its alpha-mixing capabilities. Unlike with display drivers, this should have no user-visible consequences. This can be changed later, when time comes for device clocks and power management support.

Thanks,
Alexey

 drivers/video/Kconfig         |   26 +++
 drivers/video/Makefile        |    3 +
 drivers/video/vt8500lcdfb.c   |  447 +++++++++++++++++++++++++++++++++++++++++
 drivers/video/vt8500lcdfb.h   |   34 +++
 drivers/video/wm8505fb.c      |  422 ++++++++++++++++++++++++++++++++++++++
 drivers/video/wm8505fb_regs.h |   76 +++++++
 drivers/video/wmt_ge_rops.c   |  192 ++++++++++++++++++
 drivers/video/wmt_ge_rops.h   |    5 +
 8 files changed, 1205 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/vt8500lcdfb.c
 create mode 100644 drivers/video/vt8500lcdfb.h
 create mode 100644 drivers/video/wm8505fb.c
 create mode 100644 drivers/video/wm8505fb_regs.h
 create mode 100644 drivers/video/wmt_ge_rops.c
 create mode 100644 drivers/video/wmt_ge_rops.h
drivers/video/Kconfig +26 -0
index 27c1fb4..954f6e9 100644
@@ -186,6 +186,14 @@ config FB_SYS_FOPS
        depends on FB
        default n
 
+config FB_WMT_GE_ROPS
+	tristate
+	depends on FB
+	default n
+	---help---
+	  Include functions for accelerated rectangle filling and area
+	  copying using WonderMedia Graphics Engine operations.
+
 config FB_DEFERRED_IO
 	bool
 	depends on FB
@@ -1722,6 +1730,24 @@ config FB_AU1200
 	  various panels and CRTs by passing in kernel cmd line option
 	  au1200fb:panel=<name>.
 
+config FB_VT8500
+	bool "VT8500 LCD Driver"
+	depends on (FB = y) && ARM && ARCH_VT8500 && VTWM_VERSION_VT8500
+	select FB_WMT_GE_ROPS
+	select FB_SYS_IMAGEBLIT
+	help
+	  This is the framebuffer driver for VIA VT8500 integrated LCD
+	  controller.
+
+config FB_WM8505
+	bool "WM8505 frame buffer support"
+	depends on (FB = y) && ARM && ARCH_VT8500 && VTWM_VERSION_WM8505
+	select FB_WMT_GE_ROPS
+	select FB_SYS_IMAGEBLIT
+	help
+	  This is the framebuffer driver for WonderMedia WM8505
+	  integrated LCD controller.
+
 source "drivers/video/geode/Kconfig"
 
 config FB_HIT
drivers/video/Makefile +3 -0
index 485e8ed..8d916dc 100644
@@ -26,6 +26,7 @@ obj-$(CONFIG_FB_SVGALIB)       += svgalib.o
 obj-$(CONFIG_FB_MACMODES)      += macmodes.o
 obj-$(CONFIG_FB_DDC)           += fb_ddc.o
 obj-$(CONFIG_FB_DEFERRED_IO)   += fb_defio.o
+obj-$(CONFIG_FB_WMT_GE_ROPS)   += wmt_ge_rops.o
 
 # Hardware specific drivers go first
 obj-$(CONFIG_FB_AMIGA)            += amifb.o c2p_planar.o
@@ -104,6 +105,8 @@ obj-$(CONFIG_FB_W100)		  += w100fb.o
 obj-$(CONFIG_FB_TMIO)		  += tmiofb.o
 obj-$(CONFIG_FB_AU1100)		  += au1100fb.o
 obj-$(CONFIG_FB_AU1200)		  += au1200fb.o
+obj-$(CONFIG_FB_VT8500)		  += vt8500lcdfb.o
+obj-$(CONFIG_FB_WM8505)		  += wm8505fb.o
 obj-$(CONFIG_FB_PMAG_AA)	  += pmag-aa-fb.o
 obj-$(CONFIG_FB_PMAG_BA)	  += pmag-ba-fb.o
 obj-$(CONFIG_FB_PMAGB_B)	  += pmagb-b-fb.o
drivers/video/vt8500lcdfb.c new file +447 -0

447 lines not on this page · raw message

drivers/video/vt8500lcdfb.h new file +34 -0
new file mode 100644
index 0000000..36ca3ca
@@ -0,0 +1,34 @@
+/*
+ *  linux/drivers/video/vt8500lcdfb.h
+ *
+ *  Copyright (C) 2010 Alexey Charkov <[email protected]>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+struct vt8500lcd_info {
+	struct fb_info		fb;
+	void __iomem		*regbase;
+	void __iomem		*palette_cpu;
+	dma_addr_t		palette_phys;
+	size_t			palette_size;
+	wait_queue_head_t	wait;
+};
+
+static int bpp_values[] = {
+	1,
+	2,
+	4,
+	8,
+	12,
+	16,
+	18,
+	24,
+};
drivers/video/wm8505fb.c new file +422 -0

422 lines not on this page · raw message

drivers/video/wm8505fb_regs.h new file +76 -0

76 lines not on this page · raw message

drivers/video/wmt_ge_rops.c new file +192 -0

192 lines not on this page · raw message

drivers/video/wmt_ge_rops.h new file +5 -0
new file mode 100644
index 0000000..8738075
@@ -0,0 +1,5 @@
+extern void wmt_ge_fillrect(struct fb_info *info,
+			    const struct fb_fillrect *rect);
+extern void wmt_ge_copyarea(struct fb_info *info,
+			    const struct fb_copyarea *area);
+extern int wmt_ge_sync(struct fb_info *info);
Signature · 1 line
1.7.3.2