Skip to contentSkip to conversation

geodefb: Add Geode framebuffer driver

PATCH In review Antonino A. Daplas 1 participant 1 message Feb 17, 2005 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 5/7 geodefb: Add Geode framebuffer driver

Attached is a patch (against 2.6.10) for a framebuffer driver for the Geode family of processors. It does not use AMD's horrible Durango API.
It is, however, rather feature incomplete at the moment.

* Only Geode GX1 (with CS5530 companion chip) is supported.
* Tested resolutions: 640x480 to 1280x1024.
* Supported bit depths: 8 bit palette, 16 bit RGB 5-6-5.
* CRT output only.
* No accelerated features.
* Compression is not enabled.
* flat panel support (panel=<x>x<y> option). (Only one 640x480 panel has been tested though.)
* blank function for display blanking/powersaving.
* crt=<n> option to enable/disable the CRT output.

---

 Kconfig              |    2
 Makefile             |    1
 geode/Kconfig        |   29 ++++
 geode/Makefile       |    5
 geode/display_gx1.c  |  213 ++++++++++++++++++++++++++++++
 geode/display_gx1.h  |  154 +++++++++++++++++++++
 geode/geodefb.h      |   39 +++++
 geode/gx1fb_core.c   |  359 +++++++++++++++++++++++++++++++++++++++++++++++++++
 geode/video_cs5530.c |  194 +++++++++++++++++++++++++++
 geode/video_cs5530.h |   75 ++++++++++
 10 files changed, 1071 insertions(+)
drivers/video/Kconfig +2 -0
diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig
@@ -1179,6 +1179,8 @@
 	bool "Au1100 LCD Driver"
 	depends on FB && EXPERIMENTAL && PCI && MIPS && MIPS_PB1100=y
 
+source "drivers/video/geode/Kconfig"
+
 config FB_SBUS
 	bool "SBUS and UPA framebuffers"
 	depends on FB && (SPARC32 || SPARC64)
drivers/video/Makefile +1 -0
diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile
@@ -36,6 +36,7 @@
 obj-$(CONFIG_FB_SIS)		  += sis/
 obj-$(CONFIG_FB_KYRO)             += kyro/
 obj-$(CONFIG_FB_SAVAGE)		  += savage/
+obj-$(CONFIG_FB_GEODE)		  += geode/
 obj-$(CONFIG_FB_I810)             += vgastate.o
 obj-$(CONFIG_FB_RADEON_OLD)	  += radeonfb.o
 obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o vgastate.o
drivers/video/geode/Kconfig new file +29 -0
diff -Nru a/drivers/video/geode/Kconfig b/drivers/video/geode/Kconfig
@@ -0,0 +1,29 @@
+#
+# Geode family framebuffer configuration
+#
+config FB_GEODE
+	bool "AMD Geode family framebuffer support (EXPERIMENTAL)"
+	default n
+	depends on FB && EXPERIMENTAL
+	---help---
+	  Say 'Y' here to allow you to select framebuffer drivers for
+	  the AMD Geode family of processors.
+
+config FB_GEODE_GX1
+	tristate "AMD Geode GX1 framebuffer support (EXPERIMENTAL)"
+	default n
+	depends on FB_GEODE && EXPERIMENTAL
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select FB_SOFT_CURSOR
+	---help---
+	  Framebuffer driver for the display controller integrated into the
+	  AMD Geode GX1 processor.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called gx1fb. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
drivers/video/geode/Makefile new file +5 -0
diff -Nru a/drivers/video/geode/Makefile b/drivers/video/geode/Makefile
@@ -0,0 +1,5 @@
+# Makefile for the Geode family framebuffer drivers
+
+obj-$(CONFIG_FB_GEODE_GX1) += gx1fb.o
+
+gx1fb-objs   		:= gx1fb_core.o display_gx1.o video_cs5530.o
drivers/video/geode/display_gx1.c new file +213 -0

213 lines not on this page · raw message

drivers/video/geode/display_gx1.h new file +154 -0

154 lines not on this page · raw message

drivers/video/geode/geodefb.h new file +39 -0
diff -Nru a/drivers/video/geode/geodefb.h b/drivers/video/geode/geodefb.h
@@ -0,0 +1,39 @@
+/*
+ * drivers/video/geode/geodefb.h
+ *   -- Geode framebuffer driver
+ *
+ * Copyright (C) 2005 Arcom Control Systems Ltd.
+ *
+ * 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.
+ */
+#ifndef __GEODEFB_H__
+#define __GEODEFB_H__
+
+struct geodefb_info;
+
+struct geode_dc_ops {
+	void (*set_mode)(struct fb_info *);
+	void (*set_palette_reg)(struct fb_info *, unsigned, unsigned, unsigned, unsigned);
+};
+
+struct geode_vid_ops {
+	void (*set_dclk)(struct fb_info *);
+	void (*configure_display)(struct fb_info *);
+	int  (*blank_display)(struct fb_info *, int blank_mode);
+};
+
+struct geodefb_par {
+	int enable_crt;
+	int panel_x; /* dimensions of an attached flat panel, non-zero => enable panel */
+	int panel_y;
+	struct pci_dev *vid_dev;
+	void __iomem *dc_regs;
+	void __iomem *vid_regs;
+	struct geode_dc_ops  *dc_ops;
+	struct geode_vid_ops *vid_ops;
+};
+
+#endif /* !__GEODEFB_H__ */
drivers/video/geode/gx1fb_core.c new file +359 -0

359 lines not on this page · raw message

drivers/video/geode/video_cs5530.c new file +194 -0

194 lines not on this page · raw message

drivers/video/geode/video_cs5530.h new file +75 -0

75 lines not on this page · raw message

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click