http://drm.bkbits.net/drm-2.6
airlied@starflyer.(none)|ChangeSet|20040829123419|43632 airlied

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/29 22:34:19+10:00 airlied@starflyer.(none) 
#   DRM doesn't use DRIVER_COUNT_CARDS anymore
#   remove ffb driver use of it, it is dead code currenly.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ffb_drv.c
#   2004/08/29 22:34:12+10:00 airlied@starflyer.(none) +0 -29
#   DRM doesn't use DRIVER_COUNT_CARDS anymore
#   remove ffb driver use of it, it is dead code currenly.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/08/29 21:00:11+10:00 airlied@starflyer.(none) 
#   Stop i830 and i915 being built at the same time into the kernel
#   Provide better info on which one is needed where...
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/Kconfig
#   2004/08/29 20:56:58+10:00 airlied@starflyer.(none) +6 -4
#   Stop i830 and i915 being built at the same time into the kernel
#   Provide better info on which one is needed where...
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
diff -Nru a/drivers/char/drm/Kconfig b/drivers/char/drm/Kconfig
--- a/drivers/char/drm/Kconfig	2004-09-02 16:53:48 -07:00
+++ b/drivers/char/drm/Kconfig	2004-09-02 16:53:48 -07:00
@@ -57,22 +57,24 @@
 
 config DRM_I830
 	tristate "Intel 830M, 845G, 852GM, 855GM, 865G"
-	depends on DRM && AGP && AGP_INTEL
+	depends on DRM && AGP && AGP_INTEL && !(DRM_I915=y)
 	help
 	  Choose this option if you have a system that has Intel 830M, 845G,
 	  852GM, 855GM or 865G integrated graphics.  If M is selected, the
 	  module will be called i830.  AGP support is required for this driver
 	  to work. This driver will eventually be replaced by the i915 one.
+	  This driver should be used for systems running Xorg 6.7 and XFree86 4.4
+	  or previous releases.
 
 config DRM_I915
 	tristate "Intel 830M, 845G, 852GM, 855GM, 865G, 915G"
-	depends on DRM && AGP && AGP_INTEL
+	depends on DRM && AGP && AGP_INTEL && !(DRM_I830=y)
 	help
 	  Choose this option if you have a system that has Intel 830M, 845G,
 	  852GM, 855GM 865G or 915G integrated graphics.  If M is selected, the
 	  module will be called i915.  AGP support is required for this driver
-	  to work. This driver will eventually replace the I830 driver, when
-	  later release of X start to use the new DDX and DRI.
+	  to work. This driver should be used for systems running Xorg 6.8 and
+	  XFree86 releases after (but not including 4.4).
 	
 
 config DRM_MGA
diff -Nru a/drivers/char/drm/ffb_drv.c b/drivers/char/drm/ffb_drv.c
--- a/drivers/char/drm/ffb_drv.c	2004-09-02 16:53:48 -07:00
+++ b/drivers/char/drm/ffb_drv.c	2004-09-02 16:53:48 -07:00
@@ -40,7 +40,6 @@
 	.get_unmapped_area	= ffb_get_unmapped_area,		\
 }
 
-#define DRIVER_COUNT_CARDS()	ffb_count_card_instances()
 /* Allocate private structure and fill it */
 #define DRIVER_PRESETUP()	do {		\
 	int _ret;				\
@@ -220,34 +219,6 @@
 }
 
 static int ffb_presetup(drm_device_t *);
-
-static int __init ffb_count_card_instances(void)
-{
-	int root, total, instance;
-
-	total = ffb_count_siblings(prom_root_node);
-	root = prom_getchild(prom_root_node);
-	for (root = prom_searchsiblings(root, "upa"); root;
-	     root = prom_searchsiblings(prom_getsibling(root), "upa"))
-		total += ffb_count_siblings(root);
-
-	ffb_position = kmalloc(sizeof(ffb_position_t) * total, GFP_KERNEL);
-
-	/* Actual failure will be caught during ffb_presetup b/c we can't catch
-	 * it easily here.
-	 */
-	if (!ffb_position)
-		return -ENOMEM;
-
-	instance = ffb_scan_siblings(prom_root_node, 0);
-
-	root = prom_getchild(prom_root_node);
-	for (root = prom_searchsiblings(root, "upa"); root;
-	     root = prom_searchsiblings(prom_getsibling(root), "upa"))
-		instance = ffb_scan_siblings(root, instance);
-
-	return total;
-}
 
 static drm_map_t *ffb_find_map(struct file *filp, unsigned long off)
 {
