rpms/kernel/devel drm-next-8ef8678c8.patch, NONE, 1.1.2.1 linux-2.6-xen-check-efer-fix.patch, NONE, 1.1.2.1 linux-2.6-xen-spinlock-enable-interrupts-only-when-blocking.patch, NONE, 1.1.2.1 linux-2.6-xen-spinlock-stronger-barrier.patch, NONE, 1.1.2.1 config-generic, 1.238.6.39, 1.238.6.40 drm-nouveau.patch, 1.8.6.20, 1.8.6.21 drm-vga-arb.patch, 1.5.2.4, 1.5.2.5 kernel.spec, 1.1294.2.69, 1.1294.2.70 drm-edid-fixes.patch, 1.1.2.1, NONE drm-next.patch, 1.6.6.10, NONE

myoung myoung at fedoraproject.org
Sat Sep 26 15:28:09 UTC 2009


Author: myoung

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15091

Modified Files:
      Tag: private-myoung-dom0-branch
	config-generic drm-nouveau.patch drm-vga-arb.patch kernel.spec 
Added Files:
      Tag: private-myoung-dom0-branch
	drm-next-8ef8678c8.patch linux-2.6-xen-check-efer-fix.patch 
	linux-2.6-xen-spinlock-enable-interrupts-only-when-blocking.patch 
	linux-2.6-xen-spinlock-stronger-barrier.patch 
Removed Files:
      Tag: private-myoung-dom0-branch
	drm-edid-fixes.patch drm-next.patch 
Log Message:
disable DRM_RADEON and DRM_NOUVEAU due to pvops build problem


drm-next-8ef8678c8.patch:
 b/drivers/gpu/drm/Kconfig                         |   18 
 b/drivers/gpu/drm/Makefile                        |    8 
 b/drivers/gpu/drm/drm_bufs.c                      |    4 
 b/drivers/gpu/drm/drm_cache.c                     |   46 
 b/drivers/gpu/drm/drm_crtc.c                      |   78 
 b/drivers/gpu/drm/drm_crtc_helper.c               |  307 
 b/drivers/gpu/drm/drm_drv.c                       |    4 
 b/drivers/gpu/drm/drm_edid.c                      |  536 
 b/drivers/gpu/drm/drm_encoder_slave.c             |  116 
 b/drivers/gpu/drm/drm_fb_helper.c                 |  939 
 b/drivers/gpu/drm/drm_gem.c                       |   11 
 b/drivers/gpu/drm/drm_mm.c                        |   21 
 b/drivers/gpu/drm/drm_modes.c                     |  434 
 b/drivers/gpu/drm/drm_proc.c                      |   17 
 b/drivers/gpu/drm/drm_sysfs.c                     |   28 
 b/drivers/gpu/drm/i915/Makefile                   |    2 
 b/drivers/gpu/drm/i915/i915_debugfs.c             |  445 
 b/drivers/gpu/drm/i915/i915_dma.c                 |  100 
 b/drivers/gpu/drm/i915/i915_drv.c                 |    9 
 b/drivers/gpu/drm/i915/i915_drv.h                 |   62 
 b/drivers/gpu/drm/i915/i915_gem.c                 |   14 
 b/drivers/gpu/drm/i915/i915_gem_tiling.c          |   80 
 b/drivers/gpu/drm/i915/i915_irq.c                 |   21 
 b/drivers/gpu/drm/i915/i915_reg.h                 |  143 
 b/drivers/gpu/drm/i915/i915_suspend.c             |    4 
 b/drivers/gpu/drm/i915/intel_bios.c               |    8 
 b/drivers/gpu/drm/i915/intel_crt.c                |   28 
 b/drivers/gpu/drm/i915/intel_display.c            |  607 
 b/drivers/gpu/drm/i915/intel_drv.h                |    7 
 b/drivers/gpu/drm/i915/intel_fb.c                 |  742 
 b/drivers/gpu/drm/i915/intel_i2c.c                |    8 
 b/drivers/gpu/drm/i915/intel_lvds.c               |   22 
 b/drivers/gpu/drm/i915/intel_sdvo.c               |  331 
 b/drivers/gpu/drm/i915/intel_tv.c                 |   30 
 b/drivers/gpu/drm/mga/mga_dma.c                   |    4 
 b/drivers/gpu/drm/mga/mga_drv.h                   |    1 
 b/drivers/gpu/drm/mga/mga_warp.c                  |  180 
 b/drivers/gpu/drm/r128/r128_cce.c                 |  116 
 b/drivers/gpu/drm/r128/r128_drv.h                 |    8 
 b/drivers/gpu/drm/r128/r128_state.c               |   36 
 b/drivers/gpu/drm/radeon/.gitignore               |    3 
 b/drivers/gpu/drm/radeon/Kconfig                  |    1 
 b/drivers/gpu/drm/radeon/Makefile                 |   43 
 b/drivers/gpu/drm/radeon/atombios.h               |   11 
 b/drivers/gpu/drm/radeon/atombios_crtc.c          |  105 
 b/drivers/gpu/drm/radeon/avivod.h                 |   69 
 b/drivers/gpu/drm/radeon/mkregtable.c             |  720 
 b/drivers/gpu/drm/radeon/r100.c                   | 1290 -
 b/drivers/gpu/drm/radeon/r100_track.h             |  183 
 b/drivers/gpu/drm/radeon/r100d.h                  |  607 
 b/drivers/gpu/drm/radeon/r200.c                   |  455 
 b/drivers/gpu/drm/radeon/r300.c                   |  687 
 b/drivers/gpu/drm/radeon/r300d.h                  |  101 
 b/drivers/gpu/drm/radeon/r420.c                   |  301 
 b/drivers/gpu/drm/radeon/r420d.h                  |  249 
 b/drivers/gpu/drm/radeon/r520.c                   |    6 
 b/drivers/gpu/drm/radeon/r600.c                   | 1788 +
 b/drivers/gpu/drm/radeon/r600_blit.c              |  850 
 b/drivers/gpu/drm/radeon/r600_blit_kms.c          |  805 
 b/drivers/gpu/drm/radeon/r600_blit_shaders.c      | 1072 +
 b/drivers/gpu/drm/radeon/r600_blit_shaders.h      |   14 
 b/drivers/gpu/drm/radeon/r600_cp.c                |  541 
 b/drivers/gpu/drm/radeon/r600_cs.c                |  659 
 b/drivers/gpu/drm/radeon/r600d.h                  |  661 
 b/drivers/gpu/drm/radeon/radeon.h                 |  357 
 b/drivers/gpu/drm/radeon/radeon_asic.h            |  228 
 b/drivers/gpu/drm/radeon/radeon_atombios.c        |  180 
 b/drivers/gpu/drm/radeon/radeon_clocks.c          |   10 
 b/drivers/gpu/drm/radeon/radeon_combios.c         |   58 
 b/drivers/gpu/drm/radeon/radeon_connectors.c      |  509 
 b/drivers/gpu/drm/radeon/radeon_cp.c              |  151 
 b/drivers/gpu/drm/radeon/radeon_cs.c              |  106 
 b/drivers/gpu/drm/radeon/radeon_device.c          |  404 
 b/drivers/gpu/drm/radeon/radeon_display.c         |  101 
 b/drivers/gpu/drm/radeon/radeon_drv.c             |   28 
 b/drivers/gpu/drm/radeon/radeon_drv.h             |  216 
 b/drivers/gpu/drm/radeon/radeon_encoders.c        |  137 
 b/drivers/gpu/drm/radeon/radeon_family.h          |   97 
 b/drivers/gpu/drm/radeon/radeon_fb.c              |  682 
 b/drivers/gpu/drm/radeon/radeon_fence.c           |   49 
 b/drivers/gpu/drm/radeon/radeon_gart.c            |    9 
 b/drivers/gpu/drm/radeon/radeon_ioc32.c           |   15 
 b/drivers/gpu/drm/radeon/radeon_irq.c             |   18 
 b/drivers/gpu/drm/radeon/radeon_irq_kms.c         |    1 
 b/drivers/gpu/drm/radeon/radeon_kms.c             |   74 
 b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c     |   85 
 b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c |  368 
 b/drivers/gpu/drm/radeon/radeon_legacy_tv.c       |  904 
 b/drivers/gpu/drm/radeon/radeon_mode.h            |   74 
 b/drivers/gpu/drm/radeon/radeon_object.c          |   10 
 b/drivers/gpu/drm/radeon/radeon_object.h          |    1 
 b/drivers/gpu/drm/radeon/radeon_reg.h             |   79 
 b/drivers/gpu/drm/radeon/radeon_ring.c            |  143 
 b/drivers/gpu/drm/radeon/radeon_state.c           |   23 
 b/drivers/gpu/drm/radeon/radeon_ttm.c             |   96 
 b/drivers/gpu/drm/radeon/reg_srcs/r100            |  105 
 b/drivers/gpu/drm/radeon/reg_srcs/r200            |  184 
 b/drivers/gpu/drm/radeon/reg_srcs/r300            |  729 
 b/drivers/gpu/drm/radeon/reg_srcs/rn50            |   30 
 b/drivers/gpu/drm/radeon/reg_srcs/rs600           |  729 
 b/drivers/gpu/drm/radeon/reg_srcs/rv515           |  486 
 b/drivers/gpu/drm/radeon/rs400.c                  |   56 
 b/drivers/gpu/drm/radeon/rs600.c                  |  106 
 b/drivers/gpu/drm/radeon/rs690.c                  |    4 
 b/drivers/gpu/drm/radeon/rv515.c                  |  524 
 b/drivers/gpu/drm/radeon/rv515d.h                 |  220 
 b/drivers/gpu/drm/radeon/rv770.c                  | 1050 
 b/drivers/gpu/drm/radeon/rv770d.h                 |  341 
 b/drivers/gpu/drm/ttm/ttm_bo.c                    |  295 
 b/drivers/gpu/drm/ttm/ttm_bo_util.c               |    4 
 b/drivers/gpu/drm/ttm/ttm_global.c                |    4 
 b/drivers/gpu/drm/ttm/ttm_memory.c                |  508 
 b/drivers/gpu/drm/ttm/ttm_module.c                |   58 
 b/drivers/gpu/drm/ttm/ttm_tt.c                    |  104 
 b/drivers/video/fbmem.c                           |    2 
 b/firmware/Makefile                               |   16 
 b/firmware/WHENCE                                 |  121 
 b/firmware/matrox/g200_warp.H16                   |   28 
 b/firmware/matrox/g400_warp.H16                   |   44 
 b/firmware/r128/r128_cce.bin.ihex                 |  129 
 b/firmware/radeon/R100_cp.bin.ihex                |  130 
 b/firmware/radeon/R200_cp.bin.ihex                |  130 
 b/firmware/radeon/R300_cp.bin.ihex                |  130 
 b/firmware/radeon/R420_cp.bin.ihex                |  130 
 b/firmware/radeon/R520_cp.bin.ihex                |  130 
 b/firmware/radeon/R600_me.bin.ihex                | 1345 +
 b/firmware/radeon/R600_pfp.bin.ihex               |  145 
 b/firmware/radeon/RS600_cp.bin.ihex               |  130 
 b/firmware/radeon/RS690_cp.bin.ihex               |  130 
 b/firmware/radeon/RS780_me.bin.ihex               | 1345 +
 b/firmware/radeon/RS780_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV610_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV610_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV620_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV620_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV630_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV630_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV635_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV635_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV670_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV670_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV710_me.bin.ihex               |  341 
 b/firmware/radeon/RV710_pfp.bin.ihex              |  213 
 b/firmware/radeon/RV730_me.bin.ihex               |  341 
 b/firmware/radeon/RV730_pfp.bin.ihex              |  213 
 b/firmware/radeon/RV770_me.bin.ihex               |  341 
 b/firmware/radeon/RV770_pfp.bin.ihex              |  213 
 b/include/drm/drmP.h                              |   54 
 b/include/drm/drm_cache.h                         |   38 
 b/include/drm/drm_crtc.h                          |   28 
 b/include/drm/drm_crtc_helper.h                   |    3 
 b/include/drm/drm_encoder_slave.h                 |  162 
 b/include/drm/drm_fb_helper.h                     |  106 
 b/include/drm/drm_mm.h                            |    7 
 b/include/drm/drm_mode.h                          |   11 
 b/include/drm/drm_sysfs.h                         |   12 
 b/include/drm/radeon_drm.h                        |   12 
 b/include/drm/ttm/ttm_bo_api.h                    |   13 
 b/include/drm/ttm/ttm_bo_driver.h                 |   94 
 b/include/drm/ttm/ttm_memory.h                    |   43 
 b/include/drm/ttm/ttm_module.h                    |    2 
 drivers/gpu/drm/i915/i915_gem_debugfs.c           |  396 
 drivers/gpu/drm/mga/mga_ucode.h                   |11645 ----------
 drivers/gpu/drm/radeon/r300.h                     |   36 
 drivers/gpu/drm/radeon/r600_microcode.h           |23297 ----------------------
 drivers/gpu/drm/radeon/radeon_microcode.h         | 1844 -
 drivers/gpu/drm/radeon/radeon_share.h             |   39 
 drivers/gpu/drm/radeon/rs780.c                    |  102 
 drivers/gpu/drm/radeon/rv515r.h                   |  170 
 169 files changed, 36764 insertions(+), 42238 deletions(-)

--- NEW FILE drm-next-8ef8678c8.patch ---
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 39b393d..e4d971c 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -18,6 +18,14 @@ menuconfig DRM
 	  details.  You should also select and configure AGP
 	  (/dev/agpgart) support.
 
+config DRM_KMS_HELPER
+	tristate
+	depends on DRM
+	select FB
+	select FRAMEBUFFER_CONSOLE if !EMBEDDED
+	help
+	  FB and CRTC helpers for KMS drivers.
+
 config DRM_TTM
 	tristate
 	depends on DRM
@@ -36,6 +44,7 @@ config DRM_TDFX
 config DRM_R128
 	tristate "ATI Rage 128"
 	depends on DRM && PCI
+	select FW_LOADER
 	help
 	  Choose this option if you have an ATI Rage 128 graphics card.  If M
 	  is selected, the module will be called r128.  AGP support for
@@ -47,8 +56,9 @@ config DRM_RADEON
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-	select FB
-	select FRAMEBUFFER_CONSOLE if !EMBEDDED
+	select FW_LOADER
+        select DRM_KMS_HELPER
+        select DRM_TTM
 	help
 	  Choose this option if you have an ATI Radeon graphics card.  There
 	  are both PCI and AGP versions.  You don't need to choose this to
@@ -82,11 +92,10 @@ config DRM_I830
 config DRM_I915
 	tristate "i915 driver"
 	depends on AGP_INTEL
+	select DRM_KMS_HELPER
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-	select FB
-	select FRAMEBUFFER_CONSOLE if !EMBEDDED
 	# i915 depends on ACPI_VIDEO when ACPI is enabled
 	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
 	select VIDEO_OUTPUT_CONTROL if ACPI
@@ -116,6 +125,7 @@ endchoice
 config DRM_MGA
 	tristate "Matrox g200/g400"
 	depends on DRM
+	select FW_LOADER
 	help
 	  Choose this option if you have a Matrox G200, G400 or G450 graphics
 	  card.  If M is selected, the module will be called mga.  AGP
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index fe23f29..3c8827a 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -10,11 +10,15 @@ drm-y       :=	drm_auth.o drm_bufs.o drm_cache.o \
 		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
 		drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
 		drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
-		drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o \
-		drm_info.o drm_debugfs.o
+		drm_crtc.o drm_modes.o drm_edid.o \
+		drm_info.o drm_debugfs.o drm_encoder_slave.o
 
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
 
+drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o
+
+obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
+
 obj-$(CONFIG_DRM)	+= drm.o
 obj-$(CONFIG_DRM_TTM)	+= ttm/
 obj-$(CONFIG_DRM_TDFX)	+= tdfx/
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index 6246e3f..3d09e30 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -310,10 +310,10 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
 			  (unsigned long long)map->offset, map->size);
 
 		break;
+	}
 	case _DRM_GEM:
-		DRM_ERROR("tried to rmmap GEM object\n");
+		DRM_ERROR("tried to addmap GEM object\n");
 		break;
-	}
 	case _DRM_SCATTER_GATHER:
 		if (!dev->sg) {
 			kfree(map);
diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 0e994a0..0e3bd5b 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -45,6 +45,23 @@ drm_clflush_page(struct page *page)
 		clflush(page_virtual + i);
 	kunmap_atomic(page_virtual, KM_USER0);
 }
+
+static void drm_cache_flush_clflush(struct page *pages[],
+				    unsigned long num_pages)
+{
+	unsigned long i;
+
+	mb();
+	for (i = 0; i < num_pages; i++)
+		drm_clflush_page(*pages++);
+	mb();
+}
+
+static void
+drm_clflush_ipi_handler(void *null)
+{
+	wbinvd();
+}
 #endif
 
 void
@@ -53,17 +70,30 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
 
 #if defined(CONFIG_X86)
 	if (cpu_has_clflush) {
-		unsigned long i;
-
-		mb();
-		for (i = 0; i < num_pages; ++i)
-			drm_clflush_page(*pages++);
-		mb();
-
+		drm_cache_flush_clflush(pages, num_pages);
 		return;
 	}
 
-	wbinvd();
+	if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0)
+		printk(KERN_ERR "Timed out waiting for cache flush.\n");
+
+#elif defined(__powerpc__)
+	unsigned long i;
+	for (i = 0; i < num_pages; i++) {
+		struct page *page = pages[i];
+		void *page_virtual;
+
+		if (unlikely(page == NULL))
+			continue;
+
+		page_virtual = kmap_atomic(page, KM_USER0);
+		flush_dcache_range((unsigned long)page_virtual,
+				   (unsigned long)page_virtual + PAGE_SIZE);
+		kunmap_atomic(page_virtual, KM_USER0);
+	}
+#else
+	printk(KERN_ERR "Architecture has no drm_cache.c support\n");
+	WARN_ON_ONCE(1);
 #endif
 }
 EXPORT_SYMBOL(drm_clflush_pages);
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 2f631c7..8e7b0eb 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -68,10 +68,10 @@ DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list)
  */
 static struct drm_prop_enum_list drm_scaling_mode_enum_list[] =
 {
-	{ DRM_MODE_SCALE_NON_GPU, "Non-GPU" },
-	{ DRM_MODE_SCALE_FULLSCREEN, "Fullscreen" },
-	{ DRM_MODE_SCALE_NO_SCALE, "No scale" },
-	{ DRM_MODE_SCALE_ASPECT, "Aspect" },
+	{ DRM_MODE_SCALE_NONE, "None" },
+	{ DRM_MODE_SCALE_FULLSCREEN, "Full" },
+	{ DRM_MODE_SCALE_CENTER, "Center" },
+	{ DRM_MODE_SCALE_ASPECT, "Full aspect" },
 };
 
 static struct drm_prop_enum_list drm_dithering_mode_enum_list[] =
@@ -108,6 +108,7 @@ static struct drm_prop_enum_list drm_tv_select_enum_list[] =
 	{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_SVIDEO,    "SVIDEO"    }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_Component, "Component" }, /* TV-out */
+	{ DRM_MODE_SUBCONNECTOR_SCART,     "SCART"     }, /* TV-out */
 };
 
 DRM_ENUM_NAME_FN(drm_get_tv_select_name, drm_tv_select_enum_list)
@@ -118,6 +119,7 @@ static struct drm_prop_enum_list drm_tv_subconnector_enum_list[] =
 	{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_SVIDEO,    "SVIDEO"    }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_Component, "Component" }, /* TV-out */
+	{ DRM_MODE_SUBCONNECTOR_SCART,     "SCART"     }, /* TV-out */
 };
[...86285 lines suppressed...]
+ */
+
+struct ttm_bo_global {
+
+	/**
+	 * Constant after init.
+	 */
+
+	struct kobject kobj;
+	struct ttm_mem_global *mem_glob;
+	struct page *dummy_read_page;
+	struct ttm_mem_shrink shrink;
+	size_t ttm_bo_extra_size;
+	size_t ttm_bo_size;
+	struct mutex device_list_mutex;
+	spinlock_t lru_lock;
+
+	/**
+	 * Protected by device_list_mutex.
+	 */
+	struct list_head device_list;
+
+	/**
+	 * Protected by the lru_lock.
+	 */
+	struct list_head swap_lru;
+
+	/**
+	 * Internal protection.
+	 */
+	atomic_t bo_count;
+};
+
+
+#define TTM_NUM_MEM_TYPES 8
+
+#define TTM_BO_PRIV_FLAG_MOVING  0	/* Buffer object is moving and needs
+					   idling before CPU mapping */
+#define TTM_BO_PRIV_FLAG_MAX 1
+/**
+ * struct ttm_bo_device - Buffer object driver device-specific data.
+ *
+ * @driver: Pointer to a struct ttm_bo_driver struct setup by the driver.
  * @man: An array of mem_type_managers.
  * @addr_space_mm: Range manager for the device address space.
  * lru_lock: Spinlock that protects the buffer+device lru lists and
@@ -399,32 +449,21 @@ struct ttm_bo_device {
 	/*
 	 * Constant after bo device init / atomic.
 	 */
-
-	struct ttm_mem_global *mem_glob;
+	struct list_head device_list;
+	struct ttm_bo_global *glob;
 	struct ttm_bo_driver *driver;
-	struct page *dummy_read_page;
-	struct ttm_mem_shrink shrink;
-
-	size_t ttm_bo_extra_size;
-	size_t ttm_bo_size;
-
 	rwlock_t vm_lock;
+	struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES];
 	/*
 	 * Protected by the vm lock.
 	 */
-	struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES];
 	struct rb_root addr_space_rb;
 	struct drm_mm addr_space_mm;
 
 	/*
-	 * Might want to change this to one lock per manager.
-	 */
-	spinlock_t lru_lock;
-	/*
-	 * Protected by the lru lock.
+	 * Protected by the global:lru lock.
 	 */
 	struct list_head ddestroy;
-	struct list_head swap_lru;
 
 	/*
 	 * Protected by load / firstopen / lastclose /unload sync.
@@ -640,6 +679,9 @@ extern int ttm_bo_pci_offset(struct ttm_bo_device *bdev,
 			     unsigned long *bus_offset,
 			     unsigned long *bus_size);
 
+extern void ttm_bo_global_release(struct ttm_global_reference *ref);
+extern int ttm_bo_global_init(struct ttm_global_reference *ref);
+
 extern int ttm_bo_device_release(struct ttm_bo_device *bdev);
 
 /**
@@ -657,7 +699,7 @@ extern int ttm_bo_device_release(struct ttm_bo_device *bdev);
  * !0: Failure.
  */
 extern int ttm_bo_device_init(struct ttm_bo_device *bdev,
-			      struct ttm_mem_global *mem_glob,
+			      struct ttm_bo_global *glob,
 			      struct ttm_bo_driver *driver,
 			      uint64_t file_page_offset, bool need_dma32);
 
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
index d8b8f04..6983a7c 100644
--- a/include/drm/ttm/ttm_memory.h
+++ b/include/drm/ttm/ttm_memory.h
@@ -32,6 +32,7 @@
 #include <linux/spinlock.h>
 #include <linux/wait.h>
 #include <linux/errno.h>
+#include <linux/kobject.h>
 
 /**
  * struct ttm_mem_shrink - callback to shrink TTM memory usage.
@@ -60,34 +61,33 @@ struct ttm_mem_shrink {
  * @queue: Wait queue for processes suspended waiting for memory.
  * @lock: Lock to protect the @shrink - and the memory accounting members,
  * that is, essentially the whole structure with some exceptions.
- * @emer_memory: Lowmem memory limit available for root.
- * @max_memory: Lowmem memory limit available for non-root.
- * @swap_limit: Lowmem memory limit where the shrink workqueue kicks in.
- * @used_memory: Currently used lowmem memory.
- * @used_total_memory: Currently used total (lowmem + highmem) memory.
- * @total_memory_swap_limit: Total memory limit where the shrink workqueue
- * kicks in.
- * @max_total_memory: Total memory available to non-root processes.
- * @emer_total_memory: Total memory available to root processes.
+ * @zones: Array of pointers to accounting zones.
+ * @num_zones: Number of populated entries in the @zones array.
+ * @zone_kernel: Pointer to the kernel zone.
+ * @zone_highmem: Pointer to the highmem zone if there is one.
+ * @zone_dma32: Pointer to the dma32 zone if there is one.
  *
  * Note that this structure is not per device. It should be global for all
  * graphics devices.
  */
 
+#define TTM_MEM_MAX_ZONES 2
+struct ttm_mem_zone;
 struct ttm_mem_global {
+	struct kobject kobj;
 	struct ttm_mem_shrink *shrink;
 	struct workqueue_struct *swap_queue;
 	struct work_struct work;
 	wait_queue_head_t queue;
 	spinlock_t lock;
-	uint64_t emer_memory;
-	uint64_t max_memory;
-	uint64_t swap_limit;
-	uint64_t used_memory;
-	uint64_t used_total_memory;
-	uint64_t total_memory_swap_limit;
-	uint64_t max_total_memory;
-	uint64_t emer_total_memory;
+	struct ttm_mem_zone *zones[TTM_MEM_MAX_ZONES];
+	unsigned int num_zones;
+	struct ttm_mem_zone *zone_kernel;
+#ifdef CONFIG_HIGHMEM
+	struct ttm_mem_zone *zone_highmem;
+#else
+	struct ttm_mem_zone *zone_dma32;
+#endif
 };
 
 /**
@@ -146,8 +146,13 @@ static inline void ttm_mem_unregister_shrink(struct ttm_mem_global *glob,
 extern int ttm_mem_global_init(struct ttm_mem_global *glob);
 extern void ttm_mem_global_release(struct ttm_mem_global *glob);
 extern int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory,
-				bool no_wait, bool interruptible, bool himem);
+				bool no_wait, bool interruptible);
 extern void ttm_mem_global_free(struct ttm_mem_global *glob,
-				uint64_t amount, bool himem);
+				uint64_t amount);
+extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
+				     struct page *page,
+				     bool no_wait, bool interruptible);
+extern void ttm_mem_global_free_page(struct ttm_mem_global *glob,
+				     struct page *page);
 extern size_t ttm_round_pot(size_t size);
 #endif
diff --git a/include/drm/ttm/ttm_module.h b/include/drm/ttm/ttm_module.h
index d1d4338..cf416ae 100644
--- a/include/drm/ttm/ttm_module.h
+++ b/include/drm/ttm/ttm_module.h
@@ -32,6 +32,7 @@
 #define _TTM_MODULE_H_
 
 #include <linux/kernel.h>
+struct kobject;
 
 #define TTM_PFX "[TTM] "
 
@@ -54,5 +55,6 @@ extern void ttm_global_init(void);
 extern void ttm_global_release(void);
 extern int ttm_global_item_ref(struct ttm_global_reference *ref);
 extern void ttm_global_item_unref(struct ttm_global_reference *ref);
+extern struct kobject *ttm_get_kobj(void);
 
 #endif /* _TTM_MODULE_H_ */

linux-2.6-xen-check-efer-fix.patch:
 mm/Makefile     |    1 +
 xen/enlighten.c |   10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

--- NEW FILE linux-2.6-xen-check-efer-fix.patch ---
>From b75fe4e5b869f8dbebd36df64a7fcda0c5b318ed Mon Sep 17 00:00:00 2001
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Date: Mon, 21 Sep 2009 13:34:06 -0700
Subject: [PATCH] xen: check EFER for NX before setting up GDT mapping

x86-64 assumes NX is available by default, so we need to
explicitly check for it before using NX.  Some first-generation
Intel x86-64 processors didn't support NX, and even recent systems
allow it to be disabled in BIOS.

[ Impact: prevent Xen crash on NX-less 64-bit machines ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Cc: Stable Kernel <stable at kernel.org>

diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
index 9b5a9f5..dd313d0 100644
--- a/arch/x86/mm/Makefile
+++ b/arch/x86/mm/Makefile
@@ -4,6 +4,7 @@ obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
 # Make sure __phys_addr has no stackprotector
 nostackp := $(call cc-option, -fno-stack-protector)
 CFLAGS_ioremap.o		:= $(nostackp)
+CFLAGS_init.o			:= $(nostackp)
 
 obj-$(CONFIG_SMP)		+= tlb.o
 
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 0dd0c2c..5d701bf 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1083,6 +1083,11 @@ asmlinkage void __init xen_start_kernel(void)
 
 	__supported_pte_mask |= _PAGE_IOMAP;
 
+#ifdef CONFIG_X86_64
+	/* Work out if we support NX */
+	check_efer();
+#endif
+
 	xen_setup_features();
 
 	/* Get mfn list */
@@ -1123,11 +1128,6 @@ asmlinkage void __init xen_start_kernel(void)
 
 	pgd = (pgd_t *)xen_start_info->pt_base;
 
-#ifdef CONFIG_X86_64
-	/* Work out if we support NX */
-	check_efer();
-#endif
-
 	/* Don't do the full vcpu_info placement stuff until we have a
 	   possible map and a non-dummy shared_info. */
 	per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];

linux-2.6-xen-spinlock-enable-interrupts-only-when-blocking.patch:
 spinlock.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

--- NEW FILE linux-2.6-xen-spinlock-enable-interrupts-only-when-blocking.patch ---
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Date: Wed, 9 Sep 2009 19:33:51 +0000 (-0700)
Subject: xen: only enable interrupts while actually blocking for spinlock
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=4d576b57b50a92801e6493e76e5243d6cff193d2

xen: only enable interrupts while actually blocking for spinlock

Where possible we enable interrupts while waiting for a spinlock to
become free, in order to reduce big latency spikes in interrupt handling.

However, at present if we manage to pick up the spinlock just before
blocking, we'll end up holding the lock with interrupts enabled for a
while.  This will cause a deadlock if we recieve an interrupt in that
window, and the interrupt handler tries to take the lock too.

Solve this by shrinking the interrupt-enabled region to just around the
blocking call.

[ Impact: avoid race/deadlock when using Xen PV spinlocks ]

Reported-by: "Yang, Xiaowei" <xiaowei.yang at intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
---

diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 5601506..2f91e56 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -187,7 +187,6 @@ static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enabl
 	struct xen_spinlock *prev;
 	int irq = __get_cpu_var(lock_kicker_irq);
 	int ret;
-	unsigned long flags;
 	u64 start;
 
 	/* If kicker interrupts not initialized yet, just spin */
@@ -199,16 +198,12 @@ static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enabl
 	/* announce we're spinning */
 	prev = spinning_lock(xl);
 
-	flags = __raw_local_save_flags();
-	if (irq_enable) {
-		ADD_STATS(taken_slow_irqenable, 1);
-		raw_local_irq_enable();
-	}
-
 	ADD_STATS(taken_slow, 1);
 	ADD_STATS(taken_slow_nested, prev != NULL);
 
 	do {
+		unsigned long flags;
+
 		/* clear pending */
 		xen_clear_irq_pending(irq);
 
@@ -228,6 +223,12 @@ static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enabl
 			goto out;
 		}
 
+		flags = __raw_local_save_flags();
+		if (irq_enable) {
+			ADD_STATS(taken_slow_irqenable, 1);
+			raw_local_irq_enable();
+		}
+
 		/*
 		 * Block until irq becomes pending.  If we're
 		 * interrupted at this point (after the trylock but
@@ -238,13 +239,15 @@ static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enabl
 		 * pending.
 		 */
 		xen_poll_irq(irq);
+
+		raw_local_irq_restore(flags);
+
 		ADD_STATS(taken_slow_spurious, !xen_test_irq_pending(irq));
 	} while (!xen_test_irq_pending(irq)); /* check for spurious wakeups */
 
 	kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
 
 out:
-	raw_local_irq_restore(flags);
 	unspinning_lock(xl, prev);
 	spin_time_accum_blocked(start);
 

linux-2.6-xen-spinlock-stronger-barrier.patch:
 spinlock.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-xen-spinlock-stronger-barrier.patch ---
From: Yang Xiaowei <xiaowei.yang at intel.com>
Date: Wed, 9 Sep 2009 19:44:52 +0000 (-0700)
Subject: xen: use stronger barrier after unlocking lock
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=2496afbf1e50c70f80992656bcb730c8583ddac3

xen: use stronger barrier after unlocking lock

We need to have a stronger barrier between releasing the lock and
checking for any waiting spinners.  A compiler barrier is not sufficient
because the CPU's ordering rules do not prevent the read xl->spinners
from happening before the unlock assignment, as they are different
memory locations.

We need to have an explicit barrier to enforce the write-read ordering
to different memory locations.

Because of it, I can't bring up > 4 HVM guests on one SMP machine.

[ Code and commit comments expanded -J ]

[ Impact: avoid deadlock when using Xen PV spinlocks ]

Signed-off-by: Yang Xiaowei <xiaowei.yang at intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
---

diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 2f91e56..36a5141 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -326,8 +326,13 @@ static void xen_spin_unlock(struct raw_spinlock *lock)
 	smp_wmb();		/* make sure no writes get moved after unlock */
 	xl->lock = 0;		/* release lock */
 
-	/* make sure unlock happens before kick */
-	barrier();
+	/*
+	 * Make sure unlock happens before checking for waiting
+	 * spinners.  We need a strong barrier to enforce the
+	 * write-read ordering to different memory locations, as the
+	 * CPU makes no implied guarantees about their ordering.
+	 */
+	mb();
 
 	if (unlikely(xl->spinners))
 		xen_spin_unlock_slow(xl);


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.238.6.39
retrieving revision 1.238.6.40
diff -u -p -r1.238.6.39 -r1.238.6.40
--- config-generic	10 Sep 2009 14:00:23 -0000	1.238.6.39
+++ config-generic	26 Sep 2009 15:27:37 -0000	1.238.6.40
@@ -2234,8 +2234,8 @@ CONFIG_VGA_ARB=y
 CONFIG_DRM=m
 CONFIG_DRM_TDFX=m
 CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_RADEON_KMS=y
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_RADEON_KMS is not set
 CONFIG_DRM_I810=m
 CONFIG_DRM_I830=m
 CONFIG_DRM_MGA=m
@@ -2244,9 +2244,9 @@ CONFIG_DRM_SAVAGE=m
 CONFIG_DRM_I915=m
 CONFIG_DRM_I915_KMS=y
 CONFIG_DRM_VIA=m
-CONFIG_DRM_NOUVEAU=m
-CONFIG_DRM_NOUVEAU_KMS=y
-CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+# CONFIG_DRM_NOUVEAU is not set
+# CONFIG_DRM_NOUVEAU_KMS is not set
+# CONFIG_DRM_NOUVEAU_BACKLIGHT is not set
 CONFIG_DRM_I2C_CH7006=m
 
 #

drm-nouveau.patch:
 drivers/gpu/drm/Kconfig                     |   45 
 drivers/gpu/drm/Makefile                    |    2 
 drivers/gpu/drm/i2c/Makefile                |    4 
 drivers/gpu/drm/i2c/ch7006_drv.c            |  531 
 drivers/gpu/drm/i2c/ch7006_mode.c           |  473 
 drivers/gpu/drm/i2c/ch7006_priv.h           |  344 
 drivers/gpu/drm/nouveau/Makefile            |   29 
 drivers/gpu/drm/nouveau/nouveau_acpi.c      |  125 
 drivers/gpu/drm/nouveau/nouveau_backlight.c |  155 
 drivers/gpu/drm/nouveau/nouveau_bios.c      | 5499 ++++++
 drivers/gpu/drm/nouveau/nouveau_bios.h      |  235 
 drivers/gpu/drm/nouveau/nouveau_bo.c        |  620 
 drivers/gpu/drm/nouveau/nouveau_calc.c      |  626 
 drivers/gpu/drm/nouveau/nouveau_channel.c   |  482 
 drivers/gpu/drm/nouveau/nouveau_connector.c |  761 
 drivers/gpu/drm/nouveau/nouveau_connector.h |   55 
 drivers/gpu/drm/nouveau/nouveau_crtc.h      |   95 
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   |  157 
 drivers/gpu/drm/nouveau/nouveau_display.c   |  115 
 drivers/gpu/drm/nouveau/nouveau_dma.c       |  206 
 drivers/gpu/drm/nouveau/nouveau_dma.h       |  148 
 drivers/gpu/drm/nouveau/nouveau_drv.c       |  421 
 drivers/gpu/drm/nouveau/nouveau_drv.h       | 1281 +
 drivers/gpu/drm/nouveau/nouveau_encoder.h   |   66 
 drivers/gpu/drm/nouveau/nouveau_fb.h        |   47 
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  360 
 drivers/gpu/drm/nouveau/nouveau_fbcon.h     |   48 
 drivers/gpu/drm/nouveau/nouveau_fence.c     |  262 
 drivers/gpu/drm/nouveau/nouveau_gem.c       |  954 +
 drivers/gpu/drm/nouveau/nouveau_hw.c        | 1078 +
 drivers/gpu/drm/nouveau/nouveau_hw.h        |  448 
 drivers/gpu/drm/nouveau/nouveau_i2c.c       |  256 
 drivers/gpu/drm/nouveau/nouveau_i2c.h       |   45 
 drivers/gpu/drm/nouveau/nouveau_ioc32.c     |   72 
 drivers/gpu/drm/nouveau/nouveau_irq.c       |  688 
 drivers/gpu/drm/nouveau/nouveau_mem.c       |  572 
 drivers/gpu/drm/nouveau/nouveau_notifier.c  |  195 
 drivers/gpu/drm/nouveau/nouveau_object.c    | 1294 +
 drivers/gpu/drm/nouveau/nouveau_reg.h       |  788 
 drivers/gpu/drm/nouveau/nouveau_sgdma.c     |  318 
 drivers/gpu/drm/nouveau/nouveau_state.c     |  872 +
 drivers/gpu/drm/nouveau/nouveau_swmthd.h    |   33 
 drivers/gpu/drm/nouveau/nouveau_ttm.c       |  131 
 drivers/gpu/drm/nouveau/nv04_crtc.c         | 1019 +
 drivers/gpu/drm/nouveau/nv04_cursor.c       |   70 
 drivers/gpu/drm/nouveau/nv04_dac.c          |  529 
 drivers/gpu/drm/nouveau/nv04_dfp.c          |  621 
 drivers/gpu/drm/nouveau/nv04_display.c      |  293 
 drivers/gpu/drm/nouveau/nv04_fb.c           |   21 
 drivers/gpu/drm/nouveau/nv04_fbcon.c        |  295 
 drivers/gpu/drm/nouveau/nv04_fifo.c         |  257 
 drivers/gpu/drm/nouveau/nv04_graph.c        |  579 
 drivers/gpu/drm/nouveau/nv04_instmem.c      |  210 
 drivers/gpu/drm/nouveau/nv04_mc.c           |   20 
 drivers/gpu/drm/nouveau/nv04_timer.c        |   51 
 drivers/gpu/drm/nouveau/nv04_tv.c           |  305 
 drivers/gpu/drm/nouveau/nv10_fb.c           |   24 
 drivers/gpu/drm/nouveau/nv10_fifo.c         |  248 
 drivers/gpu/drm/nouveau/nv10_graph.c        |  949 +
 drivers/gpu/drm/nouveau/nv17_tv.c           |  689 
 drivers/gpu/drm/nouveau/nv17_tv.h           |  156 
 drivers/gpu/drm/nouveau/nv17_tv_modes.c     |  583 
 drivers/gpu/drm/nouveau/nv20_graph.c        |  769 
 drivers/gpu/drm/nouveau/nv40_fb.c           |   62 
 drivers/gpu/drm/nouveau/nv40_fifo.c         |  304 
 drivers/gpu/drm/nouveau/nv40_graph.c        | 2247 ++
 drivers/gpu/drm/nouveau/nv40_mc.c           |   38 
 drivers/gpu/drm/nouveau/nv50_crtc.c         |  810 +
 drivers/gpu/drm/nouveau/nv50_cursor.c       |  151 
 drivers/gpu/drm/nouveau/nv50_dac.c          |  295 
 drivers/gpu/drm/nouveau/nv50_display.c      |  902 +
 drivers/gpu/drm/nouveau/nv50_display.h      |   46 
 drivers/gpu/drm/nouveau/nv50_evo.h          |  113 
 drivers/gpu/drm/nouveau/nv50_fbcon.c        |  256 
 drivers/gpu/drm/nouveau/nv50_fifo.c         |  481 
 drivers/gpu/drm/nouveau/nv50_graph.c        |  472 
 drivers/gpu/drm/nouveau/nv50_grctx.h        |22284 ++++++++++++++++++++++++++++
 drivers/gpu/drm/nouveau/nv50_instmem.c      |  508 
 drivers/gpu/drm/nouveau/nv50_mc.c           |   40 
 drivers/gpu/drm/nouveau/nv50_sor.c          |  250 
 drivers/gpu/drm/nouveau/nvreg.h             |  535 
 drivers/gpu/drm/ttm/ttm_bo.c                |    4 
 include/drm/Kbuild                          |    1 
 include/drm/i2c/ch7006.h                    |   86 
 include/drm/nouveau_drm.h                   |  216 
 85 files changed, 58725 insertions(+)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.8.6.20 -r 1.8.6.21 drm-nouveau.patchIndex: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.8.6.20
retrieving revision 1.8.6.21
diff -u -p -r1.8.6.20 -r1.8.6.21
--- drm-nouveau.patch	24 Sep 2009 21:05:07 -0000	1.8.6.20
+++ drm-nouveau.patch	26 Sep 2009 15:27:46 -0000	1.8.6.21
@@ -1474,10 +1474,10 @@ index 0000000..ab46e3a
 +obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
 diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
 new file mode 100644
-index 0000000..f71789a
+index 0000000..ec0f2f3
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
-@@ -0,0 +1,127 @@
+@@ -0,0 +1,125 @@
 +#include <linux/pci.h>
 +#include <linux/acpi.h>
 +#include <acpi/acpi_drivers.h>
@@ -1508,13 +1508,14 @@ index 0000000..f71789a
 +#define NOUVEAU_DSM_POWER_SPEED 0x01
 +#define NOUVEAU_DSM_POWER_STAMINA 0x02
 +
-+static int nvidia_dsm(struct pci_dev *dev, int func, int arg, int *result)
++static int nouveau_dsm(struct drm_device *dev, int func, int arg, int *result)
 +{
 +	static char muid[] = {
 +		0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
 +		0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
 +	};
 +
++	struct pci_dev *pdev = dev->pdev;
 +	struct acpi_handle *handle;
 +	struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
 +	struct acpi_object_list input;
@@ -1522,7 +1523,7 @@ index 0000000..f71789a
 +	union acpi_object *obj;
 +	int err;
 +
-+	handle = DEVICE_ACPI_HANDLE(&dev->dev);
++	handle = DEVICE_ACPI_HANDLE(&pdev->dev);
 +
 +	if (!handle)
 +		return -ENODEV;
@@ -1541,8 +1542,7 @@ index 0000000..f71789a
 +
 +	err = acpi_evaluate_object(handle, "_DSM", &input, &output);
 +	if (err) {
-+		printk(KERN_ERR "nvidia-control: failed to evaluate _DSM: %d\n",
-+		       err);
++		NV_ERROR(dev, "failed to evaluate _DSM: %d\n", err);
 +		return err;
 +	}
 +
@@ -1568,24 +1568,23 @@ index 0000000..f71789a
 +
 +int nouveau_hybrid_setup(struct drm_device *dev)
 +{
-+	struct pci_dev *pdev = dev->pdev;
 +	int result;
 +
-+	if (nvidia_dsm(pdev, NOUVEAU_DSM_ACTIVE, NOUVEAU_DSM_ACTIVE_QUERY,
-+		       &result))
++	if (nouveau_dsm(dev, NOUVEAU_DSM_ACTIVE, NOUVEAU_DSM_ACTIVE_QUERY,
++								&result))
 +		return -ENODEV;
 +
-+	printk(KERN_INFO "nouveau: _DSM hardware status gave 0x%x\n", result);
++	NV_INFO(dev, "_DSM hardware status gave 0x%x\n", result);
 +
 +	if (result & 0x1) {	/* Stamina mode - disable the external GPU */
-+		nvidia_dsm(pdev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_STAMINA,
-+			   NULL);
-+		nvidia_dsm(pdev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STAMINA,
-+			   NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_STAMINA,
++									NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STAMINA,
++									NULL);
 +	} else {		/* Ensure that the external GPU is enabled */
-+		nvidia_dsm(pdev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL);
-+		nvidia_dsm(pdev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED,
-+			   NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED,
++									NULL);
 +	}
 +
 +	return 0;
@@ -1593,11 +1592,10 @@ index 0000000..f71789a
 +
 +bool nouveau_dsm_probe(struct drm_device *dev)
 +{
-+	struct pci_dev *pdev = dev->pdev;
 +	int support = 0;
 +
-+	if (nvidia_dsm(pdev, NOUVEAU_DSM_SUPPORTED,
-+		       NOUVEAU_DSM_SUPPORTED_FUNCTIONS, &support))
++	if (nouveau_dsm(dev, NOUVEAU_DSM_SUPPORTED,
++				NOUVEAU_DSM_SUPPORTED_FUNCTIONS, &support))
 +		return false;
 +
 +	if (!support)
@@ -1768,10 +1766,10 @@ index 0000000..20564f8
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
 new file mode 100644
-index 0000000..585790f
+index 0000000..09ccffd
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,5476 @@
+@@ -0,0 +1,5499 @@
 +/*
 + * Copyright 2005-2006 Erik Waling
 + * Copyright 2006 Stephane Marchesin
@@ -1961,14 +1959,14 @@ index 0000000..585790f
 +static struct methods nv04_methods[] = {
 +	{ "PROM", load_vbios_prom, false },
 +	{ "PRAMIN", load_vbios_pramin, true },
-+	{ "PCI ROM", load_vbios_pci, true },
++	{ "PCIROM", load_vbios_pci, true },
 +	{ }
 +};
 +
 +static struct methods nv50_methods[] = {
 +	{ "PRAMIN", load_vbios_pramin, true },
 +	{ "PROM", load_vbios_prom, false },
-+	{ "PCI ROM", load_vbios_pci, true },
++	{ "PCIROM", load_vbios_pci, true },
 +	{ }
 +};
 +
@@ -1978,6 +1976,26 @@ index 0000000..585790f
 +	struct methods *methods, *method;
 +	int testscore = 3;
 +
++	if (nouveau_vbios) {
++		method = nv04_methods;
++		while (method->loadbios) {
++			if (!strcasecmp(nouveau_vbios, method->desc))
++				break;
++			method++;
++		}
++
++		if (method->loadbios) {
++			NV_INFO(dev, "Attempting to use BIOS image from %s\n",
++				method->desc);
++
++			method->loadbios(dev, data);
++			if (score_vbios(dev, data, method->rw))
++				return true;
++		}
++
++		NV_ERROR(dev, "VBIOS source \'%s\' invalid\n", nouveau_vbios);
++	}
++
 +	if (dev_priv->card_type < NV_50)
 +		methods = nv04_methods;
 +	else
@@ -7151,9 +7169,12 @@ index 0000000..585790f
 +		parse_init_table(bios, bios->some_script_ptr, &iexec);
 +	}
 +
-+	for (i = 0; i < bios->bdcb.dcb.entries; i++) {
-+		nouveau_bios_run_display_table(dev, &bios->bdcb.dcb.entry[i],
-+					       0, 0);
++	if (dev_priv->card_type >= NV_50) {
++		for (i = 0; i < bios->bdcb.dcb.entries; i++) {
++			nouveau_bios_run_display_table(dev,
++						       &bios->bdcb.dcb.entry[i],
++						       0, 0);
++		}
 +	}
 +
 +	NVLockVgaCrtcs(dev, true);
@@ -8749,10 +8770,10 @@ index 0000000..3f80db8
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
 new file mode 100644
-index 0000000..ebc01ad
+index 0000000..1a87041
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
-@@ -0,0 +1,540 @@
+@@ -0,0 +1,482 @@
 +/*
 + * Copyright 2005-2006 Stephane Marchesin
 + * All Rights Reserved.
@@ -8865,9 +8886,9 @@ index 0000000..ebc01ad
 +		      uint32_t vram_handle, uint32_t tt_handle)
 +{
 +	struct drm_nouveau_private *dev_priv = dev->dev_private;
-+	struct nouveau_engine *engine = &dev_priv->engine;
++	struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
++	struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo;
 +	struct nouveau_channel *chan;
-+	unsigned fbdev_flags = 0;
[...2857 lines suppressed...]
 +	0x0040a405, 0x00600009, 0x00700005, 0x00700006, 0x0060000e, ~0
 +};
 +
-+static uint32_t nv4e_ctx_prog[] = {
++static uint32_t nv4e_ctxprog[] = {
 +	0x00400889, 0x00200000, 0x0060000a, 0x00200000, 0x00300000, 0x00800001,
 +	0x00700009, 0x0060000e, 0x00400d64, 0x00400d05, 0x00409565, 0x00409a06,
 +	0x0040a868, 0x00200000, 0x0060000a, 0x00700000, 0x00106000, 0x00700080,
@@ -31307,7 +31371,7 @@ index 0000000..ed85386
 +{
 +	struct drm_nouveau_private *dev_priv =
 +		(struct drm_nouveau_private *)dev->dev_private;
-+	uint32_t *ctx_prog = NULL;
++	uint32_t *ctxprog = NULL;
 +	uint32_t vramsz, tmp;
 +	int i, j;
 +
@@ -31318,39 +31382,39 @@ index 0000000..ed85386
 +
 +	switch (dev_priv->chipset) {
 +	case 0x40:
-+		ctx_prog = nv40_ctx_prog;
++		ctxprog = nv40_ctxprog;
 +		break;
 +	case 0x41:
 +	case 0x42:
-+		ctx_prog = nv41_ctx_prog;
++		ctxprog = nv41_ctxprog;
 +		break;
 +	case 0x43:
-+		ctx_prog = nv43_ctx_prog;
++		ctxprog = nv43_ctxprog;
 +		break;
 +	case 0x44:
-+		ctx_prog = nv44_ctx_prog;
++		ctxprog = nv44_ctxprog;
 +		break;
 +	case 0x46:
-+		ctx_prog = nv46_ctx_prog;
++		ctxprog = nv46_ctxprog;
 +		break;
 +	case 0x47:
-+		ctx_prog = nv47_ctx_prog;
++		ctxprog = nv47_ctxprog;
 +		break;
 +	case 0x49:
-+		ctx_prog = nv49_4b_ctx_prog;
++		ctxprog = nv49_4b_ctxprog;
 +		break;
 +	case 0x4a:
-+		ctx_prog = nv4a_ctx_prog;
++		ctxprog = nv4a_ctxprog;
 +		break;
 +	case 0x4b:
-+		ctx_prog = nv49_4b_ctx_prog;
++		ctxprog = nv49_4b_ctxprog;
 +		break;
 +	case 0x4c:
 +	case 0x67:
-+		ctx_prog = nv4c_ctx_prog;
++		ctxprog = nv4c_ctxprog;
 +		break;
 +	case 0x4e:
-+		ctx_prog = nv4e_ctx_prog;
++		ctxprog = nv4e_ctxprog;
 +		break;
 +	default:
 +		NV_ERROR(dev, "Context program for 0x%02x unavailable\n",
@@ -31360,13 +31424,13 @@ index 0000000..ed85386
 +	}
 +
 +	/* Load the context program onto the card */
-+	if (ctx_prog) {
++	if (ctxprog) {
 +		NV_DEBUG(dev, "Loading context program\n");
 +
 +		i = 0;
 +		nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0);
-+		while (ctx_prog[i] != ~0) {
-+			nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, ctx_prog[i]);
++		while (ctxprog[i] != ~0) {
++			nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, ctxprog[i]);
 +			i++;
 +		}
 +	}
@@ -31544,20 +31608,6 @@ index 0000000..ed85386
 +		break;
 +	}
 +
-+	/* per-context state, doesn't belong here */
-+	nv_wr32(dev, 0x400B20, 0x00000000);
-+	nv_wr32(dev, 0x400B04, 0xFFFFFFFF);
-+
-+	tmp = nv_rd32(dev, NV10_PGRAPH_SURFACE) & 0x0007ff00;
-+	nv_wr32(dev, NV10_PGRAPH_SURFACE, tmp);
-+	tmp = nv_rd32(dev, NV10_PGRAPH_SURFACE) | 0x00020100;
-+	nv_wr32(dev, NV10_PGRAPH_SURFACE, tmp);
-+
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_XMIN, 0);
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_YMIN, 0);
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_XMAX, 0x7fff);
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_YMAX, 0x7fff);
-+
 +	return 0;
 +}
 +
@@ -31631,10 +31681,10 @@ index 0000000..2a3495e
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
 new file mode 100644
-index 0000000..c4bc54a
+index 0000000..5e7df86
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
-@@ -0,0 +1,809 @@
+@@ -0,0 +1,810 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -32191,6 +32241,7 @@ index 0000000..c4bc54a
 +		format = NV50_EVO_CRTC_FB_DEPTH_16;
 +		break;
 +	case 24:
++	case 32:
 +		format = NV50_EVO_CRTC_FB_DEPTH_24;
 +		break;
 +	case 30:
@@ -34245,10 +34296,10 @@ index 0000000..aca9ea6
 +
 diff --git a/drivers/gpu/drm/nouveau/nv50_fifo.c b/drivers/gpu/drm/nouveau/nv50_fifo.c
 new file mode 100644
-index 0000000..bec78d6
+index 0000000..10ed193
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_fifo.c
-@@ -0,0 +1,479 @@
+@@ -0,0 +1,481 @@
 +/*
 + * Copyright (C) 2007 Ben Skeggs.
 + * All Rights Reserved.
@@ -34457,6 +34508,8 @@ index 0000000..bec78d6
 +	nv50_fifo_init_context_table(dev);
 +	nv50_fifo_init_regs__nv(dev);
 +	nv50_fifo_init_regs(dev);
++	dev_priv->engine.fifo.enable(dev);
++	dev_priv->engine.fifo.reassign(dev, true);
 +
 +	return 0;
 +}
@@ -34730,10 +34783,10 @@ index 0000000..bec78d6
 +
 diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c
 new file mode 100644
-index 0000000..c163859
+index 0000000..d9c3e21
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_graph.c
-@@ -0,0 +1,450 @@
+@@ -0,0 +1,472 @@
 +/*
 + * Copyright (C) 2007 Ben Skeggs.
 + * All Rights Reserved.
@@ -34803,7 +34856,7 @@ index 0000000..c163859
 +	nv_wr32(dev, 0x400108, 0xffffffff);
 +
 +	nv_wr32(dev, 0x400824, 0x00004000);
-+	nv_wr32(dev, 0x400500, 0x00000000);
++	nv_wr32(dev, 0x400500, 0x00010001);
 +}
 +
 +static void
@@ -34912,6 +34965,28 @@ index 0000000..c163859
 +		nv_wr32(dev, 0x400500, nv_rd32(dev, 0x400500) & ~mask);
 +}
 +
++struct nouveau_channel *
++nv50_graph_channel(struct drm_device *dev)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	uint32_t inst;
++	int i;
++
++	inst = nv_rd32(dev, NV50_PGRAPH_CTXCTL_CUR);
++	if (!(inst & NV50_PGRAPH_CTXCTL_CUR_LOADED))
++		return NULL;
++	inst = (inst & NV50_PGRAPH_CTXCTL_CUR_INSTANCE) << 12;
++
++	for (i = 0; i < dev_priv->engine.fifo.channels; i++) {
++		struct nouveau_channel *chan = dev_priv->fifos[i];
++
++		if (chan && chan->ramin && chan->ramin->instance == inst)
++			return chan;
++	}
++
++	return NULL;
++}
++
 +int
 +nv50_graph_create_context(struct nouveau_channel *chan)
 +{

drm-vga-arb.patch:
 drivers/gpu/drm/drm_irq.c              |   27 +++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_dma.c        |   20 ++++++++++++++++++++
 drivers/gpu/drm/i915/i915_drv.h        |    1 +
 drivers/gpu/drm/i915/i915_reg.h        |    1 +
 drivers/gpu/drm/i915/intel_display.c   |   17 +++++++++++++++++
 drivers/gpu/drm/i915/intel_drv.h       |    1 +
 drivers/gpu/drm/radeon/r100.c          |   14 ++++++++++++++
 drivers/gpu/drm/radeon/r600.c          |   14 ++++++++++++++
 drivers/gpu/drm/radeon/r600d.h         |    1 +
 drivers/gpu/drm/radeon/radeon.h        |    2 ++
 drivers/gpu/drm/radeon/radeon_asic.h   |   12 ++++++++++++
 drivers/gpu/drm/radeon/radeon_device.c |   21 ++++++++++++++++++++-
 include/drm/drmP.h                     |    4 +++-
 13 files changed, 133 insertions(+), 2 deletions(-)

Index: drm-vga-arb.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-vga-arb.patch,v
retrieving revision 1.5.2.4
retrieving revision 1.5.2.5
diff -u -p -r1.5.2.4 -r1.5.2.5
--- drm-vga-arb.patch	10 Sep 2009 14:00:29 -0000	1.5.2.4
+++ drm-vga-arb.patch	26 Sep 2009 15:27:52 -0000	1.5.2.5
@@ -1,8 +1,18 @@
-From ba0d10c754ca30de35063a5e14c92bb7328a9f32 Mon Sep 17 00:00:00 2001
+From 28d520433b6375740990ab99d69b0d0067fd656b Mon Sep 17 00:00:00 2001
 From: Dave Airlie <airlied at redhat.com>
-Date: Tue, 8 Sep 2009 13:54:31 +1000
-Subject: [PATCH] drm-vga-arb.patch
+Date: Mon, 21 Sep 2009 14:33:58 +1000
+Subject: [PATCH] drm/vgaarb: add VGA arbitration support to the drm and kms.
 
+VGA arb requires DRM support for non-kms drivers, to turn on/off
+irqs when disabling the mem/io regions.
+
+VGA arb requires KMS support for GPUs where we can turn off VGA
+decoding. Currently we know how to do this for intel and radeon
+kms drivers, which allows them to be removed from the arbiter.
+
+This patch comes from Fedora rawhide kernel.
+
+Signed-off-by: Dave Airlie <airlied at redhat.com>
 ---
  drivers/gpu/drm/drm_irq.c              |   27 +++++++++++++++++++++++++++
  drivers/gpu/drm/i915/i915_dma.c        |   20 ++++++++++++++++++++
@@ -15,9 +25,9 @@ Subject: [PATCH] drm-vga-arb.patch
  drivers/gpu/drm/radeon/r600d.h         |    1 +
  drivers/gpu/drm/radeon/radeon.h        |    2 ++
  drivers/gpu/drm/radeon/radeon_asic.h   |   12 ++++++++++++
- drivers/gpu/drm/radeon/radeon_device.c |   19 +++++++++++++++++++
+ drivers/gpu/drm/radeon/radeon_device.c |   21 ++++++++++++++++++++-
  include/drm/drmP.h                     |    3 +++
- 13 files changed, 132 insertions(+), 0 deletions(-)
+ 13 files changed, 133 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
 index f85aaf2..0a6f0b3 100644
@@ -190,10 +200,10 @@ index b9e47f1..3a0004f 100644
 +
  #endif /* __INTEL_DRV_H__ */
 diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
-index 5708c07..386ddbc 100644
+index 737970b..be51c5f 100644
 --- a/drivers/gpu/drm/radeon/r100.c
 +++ b/drivers/gpu/drm/radeon/r100.c
-@@ -1916,6 +1916,20 @@ void r100_vram_init_sizes(struct radeon_device *rdev)
+@@ -1955,6 +1955,20 @@ void r100_vram_init_sizes(struct radeon_device *rdev)
  		rdev->mc.real_vram_size = rdev->mc.aper_size;
  }
  
@@ -215,11 +225,11 @@ index 5708c07..386ddbc 100644
  {
  	r100_vram_get_type(rdev);
 diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
-index d8fcef4..3417dff 100644
+index 5f42fad..eab31c1 100644
 --- a/drivers/gpu/drm/radeon/r600.c
 +++ b/drivers/gpu/drm/radeon/r600.c
-@@ -1444,6 +1444,20 @@ bool r600_card_posted(struct radeon_device *rdev)
- 	return false;
+@@ -1499,6 +1499,20 @@ int r600_startup(struct radeon_device *rdev)
+ 	return 0;
  }
  
 +void r600_vga_set_state(struct radeon_device *rdev, bool state)
@@ -252,10 +262,10 @@ index 723295f..4a9028a 100644
  #define	CP_COHER_BASE					0x85F8
  #define	CP_DEBUG					0xC1FC
 diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
-index 3299733..98a0c7f 100644
+index 817af8e..c839b60 100644
 --- a/drivers/gpu/drm/radeon/radeon.h
 +++ b/drivers/gpu/drm/radeon/radeon.h
-@@ -592,6 +592,7 @@ struct radeon_asic {
+@@ -596,6 +596,7 @@ struct radeon_asic {
  	int (*suspend)(struct radeon_device *rdev);
  	void (*errata)(struct radeon_device *rdev);
  	void (*vram_info)(struct radeon_device *rdev);
@@ -263,7 +273,7 @@ index 3299733..98a0c7f 100644
  	int (*gpu_reset)(struct radeon_device *rdev);
  	int (*mc_init)(struct radeon_device *rdev);
  	void (*mc_fini)(struct radeon_device *rdev);
-@@ -901,6 +902,7 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v)
+@@ -954,6 +955,7 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v)
  #define radeon_cs_parse(p) rdev->asic->cs_parse((p))
  #define radeon_errata(rdev) (rdev)->asic->errata((rdev))
  #define radeon_vram_info(rdev) (rdev)->asic->vram_info((rdev))
@@ -272,7 +282,7 @@ index 3299733..98a0c7f 100644
  #define radeon_mc_init(rdev) (rdev)->asic->mc_init((rdev))
  #define radeon_mc_fini(rdev) (rdev)->asic->mc_fini((rdev))
 diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
-index e87bb91..fd18cd6 100644
+index 5f2a9e6..8968f78 100644
 --- a/drivers/gpu/drm/radeon/radeon_asic.h
 +++ b/drivers/gpu/drm/radeon/radeon_asic.h
 @@ -47,6 +47,7 @@ uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg);
@@ -283,7 +293,7 @@ index e87bb91..fd18cd6 100644
  int r100_gpu_reset(struct radeon_device *rdev);
  int r100_mc_init(struct radeon_device *rdev);
  void r100_mc_fini(struct radeon_device *rdev);
-@@ -87,6 +88,7 @@ static struct radeon_asic r100_asic = {
+@@ -89,6 +90,7 @@ static struct radeon_asic r100_asic = {
  	.init = &r100_init,
  	.errata = &r100_errata,
  	.vram_info = &r100_vram_info,
@@ -291,7 +301,7 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &r100_gpu_reset,
  	.mc_init = &r100_mc_init,
  	.mc_fini = &r100_mc_fini,
-@@ -152,6 +154,7 @@ static struct radeon_asic r300_asic = {
+@@ -158,6 +160,7 @@ static struct radeon_asic r300_asic = {
  	.init = &r300_init,
  	.errata = &r300_errata,
  	.vram_info = &r300_vram_info,
@@ -299,15 +309,15 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &r300_gpu_reset,
  	.mc_init = &r300_mc_init,
  	.mc_fini = &r300_mc_fini,
-@@ -197,6 +200,7 @@ static struct radeon_asic r420_asic = {
- 	.init = &r300_init,
- 	.errata = &r420_errata,
- 	.vram_info = &r420_vram_info,
+@@ -208,6 +211,7 @@ static struct radeon_asic r420_asic = {
+ 	.resume = &r420_resume,
+ 	.errata = NULL,
+ 	.vram_info = NULL,
 +	.vga_set_state = &r100_vga_set_state,
  	.gpu_reset = &r300_gpu_reset,
- 	.mc_init = &r420_mc_init,
- 	.mc_fini = &r420_mc_fini,
-@@ -249,6 +253,7 @@ static struct radeon_asic rs400_asic = {
+ 	.mc_init = NULL,
+ 	.mc_fini = NULL,
+@@ -262,6 +266,7 @@ static struct radeon_asic rs400_asic = {
  	.init = &r300_init,
  	.errata = &rs400_errata,
  	.vram_info = &rs400_vram_info,
@@ -315,7 +325,7 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &r300_gpu_reset,
  	.mc_init = &rs400_mc_init,
  	.mc_fini = &rs400_mc_fini,
-@@ -306,6 +311,7 @@ static struct radeon_asic rs600_asic = {
+@@ -323,6 +328,7 @@ static struct radeon_asic rs600_asic = {
  	.init = &rs600_init,
  	.errata = &rs600_errata,
  	.vram_info = &rs600_vram_info,
@@ -323,7 +333,7 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &r300_gpu_reset,
  	.mc_init = &rs600_mc_init,
  	.mc_fini = &rs600_mc_fini,
-@@ -353,6 +359,7 @@ static struct radeon_asic rs690_asic = {
+@@ -372,6 +378,7 @@ static struct radeon_asic rs690_asic = {
  	.init = &rs600_init,
  	.errata = &rs690_errata,
  	.vram_info = &rs690_vram_info,
@@ -331,7 +341,7 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &r300_gpu_reset,
  	.mc_init = &rs690_mc_init,
  	.mc_fini = &rs690_mc_fini,
-@@ -407,6 +414,7 @@ static struct radeon_asic rv515_asic = {
+@@ -428,6 +435,7 @@ static struct radeon_asic rv515_asic = {
  	.init = &rv515_init,
  	.errata = &rv515_errata,
  	.vram_info = &rv515_vram_info,
@@ -339,7 +349,7 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &rv515_gpu_reset,
  	.mc_init = &rv515_mc_init,
  	.mc_fini = &rv515_mc_fini,
-@@ -454,6 +462,7 @@ static struct radeon_asic r520_asic = {
+@@ -477,6 +485,7 @@ static struct radeon_asic r520_asic = {
  	.init = &rv515_init,
  	.errata = &r520_errata,
  	.vram_info = &r520_vram_info,
@@ -347,7 +357,7 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &rv515_gpu_reset,
  	.mc_init = &r520_mc_init,
  	.mc_fini = &r520_mc_fini,
-@@ -495,6 +504,7 @@ int r600_init(struct radeon_device *rdev);
+@@ -520,6 +529,7 @@ int r600_init(struct radeon_device *rdev);
  void r600_fini(struct radeon_device *rdev);
  int r600_suspend(struct radeon_device *rdev);
  int r600_resume(struct radeon_device *rdev);
@@ -355,7 +365,7 @@ index e87bb91..fd18cd6 100644
  int r600_wb_init(struct radeon_device *rdev);
  void r600_wb_fini(struct radeon_device *rdev);
  void r600_cp_commit(struct radeon_device *rdev);
-@@ -531,6 +541,7 @@ static struct radeon_asic r600_asic = {
+@@ -556,6 +566,7 @@ static struct radeon_asic r600_asic = {
  	.resume = &r600_resume,
  	.cp_commit = &r600_cp_commit,
  	.vram_info = NULL,
@@ -363,7 +373,7 @@ index e87bb91..fd18cd6 100644
  	.gpu_reset = &r600_gpu_reset,
  	.mc_init = NULL,
  	.mc_fini = NULL,
-@@ -581,6 +592,7 @@ static struct radeon_asic rv770_asic = {
+@@ -606,6 +617,7 @@ static struct radeon_asic rv770_asic = {
  	.cp_commit = &r600_cp_commit,
  	.vram_info = NULL,
  	.gpu_reset = &rv770_gpu_reset,
@@ -372,7 +382,7 @@ index e87bb91..fd18cd6 100644
  	.mc_fini = NULL,
  	.wb_init = &r600_wb_init,
 diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
-index f2469c5..764d2f8 100644
+index 8a40c61..daf5db7 100644
 --- a/drivers/gpu/drm/radeon/radeon_device.c
 +++ b/drivers/gpu/drm/radeon/radeon_device.c
 @@ -29,6 +29,7 @@
@@ -383,9 +393,9 @@ index f2469c5..764d2f8 100644
  #include "radeon_reg.h"
  #include "radeon.h"
  #include "radeon_asic.h"
-@@ -468,7 +469,18 @@ void radeon_combios_fini(struct radeon_device *rdev)
- int radeon_modeset_init(struct radeon_device *rdev);
- void radeon_modeset_fini(struct radeon_device *rdev);
+@@ -480,7 +481,18 @@ void radeon_combios_fini(struct radeon_device *rdev)
+ {
+ }
  
 +/* if we get transitioned to only one device, tak VGA back */
 +static unsigned int radeon_vga_set_decode(void *cookie, bool state)
@@ -402,20 +412,29 @@ index f2469c5..764d2f8 100644
  /*
   * Radeon device.
   */
-@@ -559,6 +571,12 @@ int radeon_device_init(struct radeon_device *rdev,
+@@ -578,6 +590,13 @@ int radeon_device_init(struct radeon_device *rdev,
+ 	if (r) {
+ 		return r;
+ 	}
++
++	/* if we have > 1 VGA cards, then disable the radeon VGA resources */
++	r = vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode);
++	if (r) {
++		return -EINVAL;
++	}
++
+ 	if (!rdev->new_init_path) {
+ 		/* Setup errata flags */
+ 		radeon_errata(rdev);
+@@ -586,7 +605,6 @@ int radeon_device_init(struct radeon_device *rdev,
  		/* Initialize surface registers */
  		radeon_surface_init(rdev);
  
-+		/* if we have > 1 VGA cards, then disable the radeon VGA resources */
-+		ret = vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode);
-+		if (ret) {
-+			return -EINVAL;
-+		}
-+
- 		/* TODO: disable VGA need to use VGA request */
+-		/* TODO: disable VGA need to use VGA request */
  		/* BIOS*/
  		if (!radeon_get_bios(rdev)) {
-@@ -693,6 +711,7 @@ void radeon_device_fini(struct radeon_device *rdev)
+ 			if (ASIC_IS_AVIVO(rdev))
+@@ -697,6 +715,7 @@ void radeon_device_fini(struct radeon_device *rdev)
  		radeon_agp_fini(rdev);
  #endif
  		radeon_irq_kms_fini(rdev);
@@ -438,5 +457,5 @@ index eeefb63..c8e64bb 100644
  	struct vm_operations_struct *gem_vm_ops;
  
 -- 
-1.6.0.6
+1.6.4.2
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1294.2.69
retrieving revision 1.1294.2.70
diff -u -p -r1.1294.2.69 -r1.1294.2.70
--- kernel.spec	24 Sep 2009 21:05:13 -0000	1.1294.2.69
+++ kernel.spec	26 Sep 2009 15:27:53 -0000	1.1294.2.70
@@ -697,9 +697,12 @@ Patch1552: linux-2.6-ksm-updates.patch
 Patch1553: linux-2.6-ksm-fix-munlock.patch
 Patch1578: linux-2.6-xen-stack-protector-fix.patch
 Patch1579: linux-2.6-virtio_blk-revert-QUEUE_FLAG_VIRT-addition.patch
+Patch1580: linux-2.6-xen-check-efer-fix.patch
+Patch1581: linux-2.6-xen-spinlock-enable-interrupts-only-when-blocking.patch
+Patch1582: linux-2.6-xen-spinlock-stronger-barrier.patch
 
 # nouveau + drm fixes
-Patch1812: drm-next.patch
+Patch1812: drm-next-8ef8678c8.patch
 Patch1813: drm-radeon-pm.patch
 Patch1814: drm-nouveau.patch
 Patch1818: drm-i915-resume-force-mode.patch
@@ -708,7 +711,6 @@ Patch1819: drm-intel-big-hammer.patch
 Patch1824: drm-intel-next.patch
 Patch1825: drm-intel-pm.patch
 Patch1826: drm-intel-no-tv-hotplug.patch
-Patch1827: drm-edid-fixes.patch
 
 # vga arb
 Patch1900: linux-2.6-vga-arb.patch
@@ -1361,6 +1363,11 @@ ApplyPatch linux-2.6-ksm-kvm.patch
 # Assorted Virt Fixes
 #ApplyPatch linux-2.6-xen-stack-protector-fix.patch
 ApplyPatch linux-2.6-virtio_blk-revert-QUEUE_FLAG_VIRT-addition.patch
+#ApplyPatch linux-2.6-xen-check-efer-fix.patch
+
+# improve xen spinlock scalability
+#ApplyPatch linux-2.6-xen-spinlock-enable-interrupts-only-when-blocking.patch
+#ApplyPatch linux-2.6-xen-spinlock-stronger-barrier.patch
 
 # Fix block I/O errors in KVM
 ApplyPatch linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch
@@ -1368,7 +1375,7 @@ ApplyPatch linux-2.6-block-silently-erro
 ApplyPatch linux-2.6-e1000-ich9.patch
 
 # Nouveau DRM + drm fixes
-ApplyPatch drm-next.patch
+ApplyPatch drm-next-8ef8678c8.patch
 
 ApplyPatch drm-nouveau.patch
 # pm broken on my thinkpad t60p - airlied
@@ -1379,7 +1386,6 @@ ApplyOptionalPatch drm-intel-next.patch
 #this appears to be upstream - mjg59?
 #ApplyPatch drm-intel-pm.patch
 ApplyPatch drm-intel-no-tv-hotplug.patch
-ApplyPatch drm-edid-fixes.patch
 
 # VGA arb + drm
 ApplyPatch linux-2.6-vga-arb.patch
@@ -2070,6 +2076,30 @@ fi
 # and build.
 
 %changelog
+* Sat Sep 26 2009 Michael Young <m.a.young at durham.ac.uk>
+- disable DRM_RADEON  and DRM_NOUVEAU due to build problems
+
+* Sat Sep 26 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.1-49
+- Add Xen spinlock patches to improve scalability.
+
+* Sat Sep 26 2009 Dave Airlie <airlied at redhat.com> 2.6.31.1-48
+- drm-next-8ef8678c8.patch: fix intel/nouveau kms
+
+* Fri Sep 25 2009 Justin M. Forbes <bskeggs at redhat.com> 2.6.31.1-47
+- Fix xen guest booting when NX is disabled (#525290)
+
+* Fri Sep 25 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.1-46
+- drm-nouveau.patch: cleanups, fixes, pre-G80 s/r fixes, init rework
+
+* Fri Sep 25 2009 Dave Airlie <airlied at redhat.com> 2.6.31.1-45
+- drm-next-adea4796c.patch: fix r600 glxgears
+
+* Fri Sep 25 2009 Dave Airlie <airlied at redhat.com> 2.6.31.1-44
+- bump a extra one because I accidentially CVS.
+
+* Thu Sep 24 2009 Dave Airlie <airlied at redhat.com> 2.6.31.1-42
+- drm-next update - fix r600 s/r, and command line mode picking and r600 tv
+
 * Thu Sep 24 2009 Michael Young <m.a.young at durham.ac.uk>
 - Try a dri fix in the latest xen/master
 


--- drm-edid-fixes.patch DELETED ---


--- drm-next.patch DELETED ---




More information about the fedora-extras-commits mailing list