r2263 - in trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian: . patches patches/series

Christoph Hellwig hch-guest@costa.debian.org
Mon, 10 Jan 2005 22:28:49 +0100


Author: hch-guest
Date: 2005-01-10 22:28:48 +0100 (Mon, 10 Jan 2005)
New Revision: 2263

Added:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-vesafb-3.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4
Log:

  * Fix modular-vesafb.dpatch to not break the non-modular case
    (Christoph Hellwig) (closes: #289610).



Modified: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-01-10 20:59:58 UTC (rev 2262)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-01-10 21:28:48 UTC (rev 2263)
@@ -22,6 +22,9 @@
     than 8192 bytes to follow the ioctl semantics and thus not break powerpc
     builds. Userland ioctl value is still changed. (Sven Luther)
 
+  * Fix modular-vesafb.dpatch to not break the non-modular case
+    (Christoph Hellwig) (closes: #289610).
+
  -- Sven Luther <luther@debian.org>  Mon, 10 Jan 2005 18:06:29 +0100
 
 kernel-source-2.6.10 (2.6.10-3) unstable; urgency=low

Added: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-vesafb-3.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-vesafb-3.dpatch	2005-01-10 20:59:58 UTC (rev 2262)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-vesafb-3.dpatch	2005-01-10 21:28:48 UTC (rev 2263)
@@ -0,0 +1,110 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: modularised VESA FB
+## DP: Patch author: unknown
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- kernel-source-2.6.6/drivers/video/Kconfig	2004-05-10 19:48:01.000000000 +1000
++++ kernel-source-2.6.6-1/drivers/video/Kconfig	2004-05-10 22:21:43.000000000 +1000
+@@ -283,7 +283,7 @@
+ 	  cards. Say Y if you have one of those.
+ 
+ config FB_VESA
+-	bool "VESA VGA graphics support"
++	tristate "VESA VGA graphics support"
+ 	depends on FB && (X86 || X86_64)
+ 	help
+ 	  This is the frame buffer device driver for generic VESA 2.0
+
+--- a/drivers/video/vesafb.c	2004-10-18 17:53:11.000000000 -0400
++++ b/drivers/video/vesafb.c	2004-10-23 01:58:33.000000000 -0400
+@@ -19,6 +19,7 @@
+ #include <linux/fb.h>
+ #include <linux/ioport.h>
+ #include <linux/init.h>
++#include <linux/moduleparam.h>
+ #ifdef __i386__
+ #include <video/edid.h>
+ #endif
+@@ -49,6 +50,7 @@
+ 
+ static int             inverse   = 0;
+ static int             mtrr      = 1;
++static int             mtrr_hdl;
+ static int	       vram_remap __initdata = 0; /* Set amount of memory to be used */
+ static int        vram_total __initdata = 0; /* Set total amount of memory */
+ static int             pmi_setpal = 0;	/* pmi for palette changes ??? */
+@@ -56,6 +58,9 @@
+ static void            (*pmi_start)(void);
+ static void            (*pmi_pal)(void);
+ 
++static char	       *options;
++module_param(options, charp, 0);
++
+ /* --------------------------------------------------------------------- */
+ 
+ static int vesafb_pan_display(struct fb_var_screeninfo *var,
+@@ -221,6 +226,8 @@
+ 	struct fb_info *info;
+ 	int i, err;
+ 
++	vesafb_setup(options);
++
+ 	if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
+ 		return -ENXIO;
+ 
+@@ -368,7 +375,7 @@
+                 	temp_size &= (temp_size - 1);
+                         
+                 /* Try and find a power of two to add */
+-		while (temp_size && mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
++		while (temp_size && (mtrr_hdl = mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)) == -EINVAL) {
+ 			temp_size >>= 1;
+ 		}
+ 	}
+@@ -390,6 +397,7 @@
+ 	}
+ 	printk(KERN_INFO "fb%d: %s frame buffer device\n",
+ 	       info->node, info->fix.id);
++	dev_set_drvdata(device, info);
+ 	return 0;
+ err:
+ 	framebuffer_release(info);
+@@ -397,6 +405,17 @@
+ 	return err;
+ }
+ 
++static void __exit vesafb_remove(struct device *device)
++{
++	struct fb_info *info = dev_get_drvdata(device);
++
++	unregister_framebuffer(info);
++	if (mtrr && mtrr_hdl >= 0)
++		mtrr_del(mtrr_hdl, 0, 0);
++	iounmap(info->screen_base);
++	release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
++}
++
+ static struct device_driver vesafb_driver = {
+ 	.name	= "vesafb",
+ 	.bus	= &platform_bus_type,
+@@ -424,7 +443,14 @@
+ 	}
+ 	return ret;
+ }
++
++static void __exit vesafb_exit(void)
++{
++	platform_device_unregister(&vesafb_device);
++	driver_unregister(&vesafb_driver);
++}
+ module_init(vesafb_init);
++module_exit(vesafb_exit);
+ 
+ /*
+  * Overrides for Emacs so that we follow Linus's tabbing style.

Modified: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4	2005-01-10 20:59:58 UTC (rev 2262)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4	2005-01-10 21:28:48 UTC (rev 2263)
@@ -10,3 +10,5 @@
 + fix-mxser-compile.dpatch
 + fix-alpha-ext3-oops.dpatch
 + alsa-emu10k1-ioctl-fix
+- modular-vesafb.dpatch
++ modular-vesafb-3.dpatch