Skip to contentSkip to conversation

Au1200fb driver.

PATCH In review Ralf Baechle 3 participants 3 messages Oct 17, 2005 – Oct 18, 2005 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Au1200fb driver.

Au1200 fb driver. Updated db1200 defconfig to include driver by default.

 drivers/video/Kconfig    |   12 
 drivers/video/Makefile   |    1 
 drivers/video/au1200fb.c | 1940 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/video/au1200fb.h |  288 ++++++
 4 files changed, 2241 insertions(+)
drivers/video/Kconfig +12 -0
Index: manual.git/drivers/video/Kconfig
===================================================================
@@ -1286,6 +1286,18 @@ config FB_AU1100
 	bool "Au1100 LCD Driver"
 	depends on (FB = y) && EXPERIMENTAL && PCI && MIPS && MIPS_PB1100=y
 
+config FB_AU1200
+	bool "Au1200 LCD Driver"
+	depends on FB && MIPS && SOC_AU1200
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select FB_SOFT_CURSOR
+	help
+	  This is the framebuffer driver for the AMD Au1200 SOC.  It can drive
+	  various panels and CRTs by passing in kernel cmd line option
+	  au1200fb:panel=<name>.
+
 source "drivers/video/geode/Kconfig"
 
 config FB_SBUS
drivers/video/Makefile +1 -0
Index: manual.git/drivers/video/Makefile
===================================================================
@@ -87,6 +87,7 @@ obj-$(CONFIG_FB_ASILIANT)	  += asiliantf
 obj-$(CONFIG_FB_PXA)		  += pxafb.o
 obj-$(CONFIG_FB_W100)		  += w100fb.o
 obj-$(CONFIG_FB_AU1100)		  += au1100fb.o
+obj-$(CONFIG_FB_AU1200)		  += au1200fb.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/au1200fb.c new file +1940 -0

1,940 lines not on this page · raw message

drivers/video/au1200fb.h new file +288 -0

288 lines not on this page · raw message

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl

#1 lore raw
Quoted 1 line · Ralf Baechle

Au1200 fb driver. Updated db1200 defconfig to include driver by default.

Besides coding style issues, here are a few comments:

drivers/video/au1200fb.c line 191

Quoted 6 lines
drivers/video/au1200fb.c new file +6 -0
+struct window_settings
+{
+	unsigned char name[64];
+	uint32 mode_backcolor;
+	uint32 mode_colorkey;
+	uint32 mode_colorkeymsk;

Any problems using u32 and family instead of uint32?

drivers/video/au1200fb.c line 1054

Quoted 13 lines
drivers/video/au1200fb.c new file +13 -0
+
+/* AU1200 framebuffer driver */
+
+int au1200fb_fb_open(struct fb_info *fbi, int user)
+{
+	return 0;
+}
+
+int au1200fb_fb_release(struct fb_info *fbi, int user)
+{
+	return 0;
+}
+

You can just remove the fb_release and fb_open methods if they're not doing anything.

Quoted 14 lines
drivers/video/au1200fb.c new file +14 -0
+
+/* fb_blank
+ * Blank the screen. Depending on the mode, the screen will be
+ * activated with the backlight color, or desactivated
+ */
+int au1200fb_fb_blank(int blank_mode, struct fb_info *fbi)
+{
+	/* Short-circuit screen blanking */
+	if (noblanking)
+		return 0;
+
+	switch (blank_mode) {
+
+	case VESA_NO_BLANKING:

drivers/video/au1200fb.c line 1236

Quoted 10 lines
drivers/video/au1200fb.c new file +10 -0
+		/* printk("turn on panel\n"); */
+		au1200_setpanel(panel);
+		break;
+
+	case VESA_VSYNC_SUSPEND:
+	case VESA_HSYNC_SUSPEND:
+	case VESA_POWERDOWN:
+		/* printk("turn off panel\n"); */
+		au1200_setpanel(NULL);
+		break;

Better to use the FB_BLANK_* constants defined in include/linux/fb.h instead of the VESA_* constants. There's also one constant, FB_BLANK_NORMAL, which usually means blank the display but keep monitor syncs on. But if you just have 2 blank states, might as well do an if (blank_mode)/else.

Tony

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl

#2 lore raw

Thanks Tony. I'll fix it up and resubmit.

Pete

Quoted 61 lines · Antonino A. Daplas
Quoted 1 line · Ralf Baechle

Au1200 fb driver. Updated db1200 defconfig to include driver by default.

Besides coding style issues, here are a few comments:

drivers/video/au1200fb.c line 191

Quoted 6 lines
drivers/video/au1200fb.c new file +6 -0
+struct window_settings
+{
+	unsigned char name[64];
+	uint32 mode_backcolor;
+	uint32 mode_colorkey;
+	uint32 mode_colorkeymsk;

Any problems using u32 and family instead of uint32?

drivers/video/au1200fb.c line 1054

Quoted 13 lines
drivers/video/au1200fb.c new file +13 -0
+
+/* AU1200 framebuffer driver */
+
+int au1200fb_fb_open(struct fb_info *fbi, int user)
+{
+	return 0;
+}
+
+int au1200fb_fb_release(struct fb_info *fbi, int user)
+{
+	return 0;
+}
+

You can just remove the fb_release and fb_open methods if they're not doing anything.

Quoted 14 lines
drivers/video/au1200fb.c new file +14 -0
+
+/* fb_blank
+ * Blank the screen. Depending on the mode, the screen will be
+ * activated with the backlight color, or desactivated
+ */
+int au1200fb_fb_blank(int blank_mode, struct fb_info *fbi)
+{
+	/* Short-circuit screen blanking */
+	if (noblanking)
+		return 0;
+
+	switch (blank_mode) {
+
+	case VESA_NO_BLANKING:

drivers/video/au1200fb.c line 1236

Quoted 10 lines
drivers/video/au1200fb.c new file +10 -0
+		/* printk("turn on panel\n"); */
+		au1200_setpanel(panel);
+		break;
+
+	case VESA_VSYNC_SUSPEND:
+	case VESA_HSYNC_SUSPEND:
+	case VESA_POWERDOWN:
+		/* printk("turn off panel\n"); */
+		au1200_setpanel(NULL);
+		break;

Better to use the FB_BLANK_* constants defined in include/linux/fb.h instead of the VESA_* constants. There's also one constant, FB_BLANK_NORMAL, which usually means blank the display but keep monitor syncs on. But if you just have 2 blank states, might as well do an if (blank_mode)/else.

Quoted 1 line

Tony

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl