rpms/kernel/F-12 drm-next-fc7f7119.patch, NONE, 1.1 drm-radeon-kms-arbiter-return-ignore.patch, NONE, 1.1 kernel.spec, 1.1888, 1.1889 drm-next-3e5cb98d.patch, 1.1, NONE

Dave Airlie airlied at fedoraproject.org
Wed Oct 28 05:59:34 UTC 2009


Author: airlied

Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17732

Modified Files:
	kernel.spec 
Added Files:
	drm-next-fc7f7119.patch 
	drm-radeon-kms-arbiter-return-ignore.patch 
Removed Files:
	drm-next-3e5cb98d.patch 
Log Message:
* Wed Oct 28 2009 Dave Airlie <airlied at redhat.com> 2.6.31.5-103
- drm-next-fc7f7119.patch: fix oops in SS code, fix multi-card, dvo.
- drm-radeon-kms-arbiter-return-ignore.patch: fix arbiter for non-VGA display


drm-next-fc7f7119.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                      |  551 
 b/drivers/gpu/drm/drm_encoder_slave.c             |  116 
 b/drivers/gpu/drm/drm_fb_helper.c                 | 1030 
 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          |   65 
 b/drivers/gpu/drm/i915/i915_irq.c                 |   21 
 b/drivers/gpu/drm/i915/i915_reg.h                 |  139 
 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            |  608 
 b/drivers/gpu/drm/i915/intel_drv.h                |    9 
 b/drivers/gpu/drm/i915/intel_fb.c                 |  748 
 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               |  239 
 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               |   13 
 b/drivers/gpu/drm/radeon/atombios_crtc.c          |  359 
 b/drivers/gpu/drm/radeon/avivod.h                 |   60 
 b/drivers/gpu/drm/radeon/mkregtable.c             |  720 
 b/drivers/gpu/drm/radeon/r100.c                   | 1737 +
 b/drivers/gpu/drm/radeon/r100_track.h             |  183 
 b/drivers/gpu/drm/radeon/r100d.h                  |  714 
 b/drivers/gpu/drm/radeon/r200.c                   |  454 
 b/drivers/gpu/drm/radeon/r300.c                   |  981 
 b/drivers/gpu/drm/radeon/r300d.h                  |  306 
 b/drivers/gpu/drm/radeon/r420.c                   |  305 
 b/drivers/gpu/drm/radeon/r420d.h                  |  249 
 b/drivers/gpu/drm/radeon/r500_reg.h               |   12 
 b/drivers/gpu/drm/radeon/r520.c                   |  281 
 b/drivers/gpu/drm/radeon/r520d.h                  |  187 
 b/drivers/gpu/drm/radeon/r600.c                   | 1838 +
 b/drivers/gpu/drm/radeon/r600_blit.c              |  858 
 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                |  783 
 b/drivers/gpu/drm/radeon/r600d.h                  |  666 
 b/drivers/gpu/drm/radeon/radeon.h                 |  441 
 b/drivers/gpu/drm/radeon/radeon_asic.h            |  351 
 b/drivers/gpu/drm/radeon/radeon_atombios.c        |  299 
 b/drivers/gpu/drm/radeon/radeon_benchmark.c       |    4 
 b/drivers/gpu/drm/radeon/radeon_bios.c            |   49 
 b/drivers/gpu/drm/radeon/radeon_clocks.c          |   18 
 b/drivers/gpu/drm/radeon/radeon_combios.c         |  187 
 b/drivers/gpu/drm/radeon/radeon_connectors.c      |  646 
 b/drivers/gpu/drm/radeon/radeon_cp.c              |  151 
 b/drivers/gpu/drm/radeon/radeon_cs.c              |  104 
 b/drivers/gpu/drm/radeon/radeon_cursor.c          |   10 
 b/drivers/gpu/drm/radeon/radeon_device.c          |  332 
 b/drivers/gpu/drm/radeon/radeon_display.c         |  168 
 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        |  223 
 b/drivers/gpu/drm/radeon/radeon_family.h          |   97 
 b/drivers/gpu/drm/radeon/radeon_fb.c              |  694 
 b/drivers/gpu/drm/radeon/radeon_fence.c           |   49 
 b/drivers/gpu/drm/radeon/radeon_gart.c            |   29 
 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         |   16 
 b/drivers/gpu/drm/radeon/radeon_kms.c             |   74 
 b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c     |  126 
 b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c |  392 
 b/drivers/gpu/drm/radeon/radeon_legacy_tv.c       |  904 
 b/drivers/gpu/drm/radeon/radeon_mode.h            |  105 
 b/drivers/gpu/drm/radeon/radeon_object.c          |   27 
 b/drivers/gpu/drm/radeon/radeon_object.h          |    1 
 b/drivers/gpu/drm/radeon/radeon_reg.h             |   86 
 b/drivers/gpu/drm/radeon/radeon_ring.c            |  143 
 b/drivers/gpu/drm/radeon/radeon_state.c           |   23 
 b/drivers/gpu/drm/radeon/radeon_test.c            |    6 
 b/drivers/gpu/drm/radeon/radeon_ttm.c             |   95 
 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/rs100d.h                 |   40 
 b/drivers/gpu/drm/radeon/rs400.c                  |  329 
 b/drivers/gpu/drm/radeon/rs400d.h                 |  160 
 b/drivers/gpu/drm/radeon/rs600.c                  |  609 
 b/drivers/gpu/drm/radeon/rs600d.h                 |  470 
 b/drivers/gpu/drm/radeon/rs690.c                  |  358 
 b/drivers/gpu/drm/radeon/rs690d.h                 |  307 
 b/drivers/gpu/drm/radeon/rv200d.h                 |   36 
 b/drivers/gpu/drm/radeon/rv250d.h                 |  123 
 b/drivers/gpu/drm/radeon/rv350d.h                 |   52 
 b/drivers/gpu/drm/radeon/rv515.c                  |  881 
 b/drivers/gpu/drm/radeon/rv515d.h                 |  603 
 b/drivers/gpu/drm/radeon/rv770.c                  | 1056 
 b/drivers/gpu/drm/radeon/rv770d.h                 |  346 
 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                |    6 
 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                   |   10 
 b/include/drm/drm_encoder_slave.h                 |  162 
 b/include/drm/drm_fb_helper.h                     |  111 
 b/include/drm/drm_mm.h                            |    7 
 b/include/drm/drm_mode.h                          |   11 
 b/include/drm/drm_pciids.h                        |    4 
 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/rs690r.h                   |   99 
 drivers/gpu/drm/radeon/rs780.c                    |  102 
 drivers/gpu/drm/radeon/rv515r.h                   |  170 
 184 files changed, 41270 insertions(+), 43800 deletions(-)

--- NEW FILE drm-next-fc7f7119.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..5cae0b3 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 */
 };
[...93468 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_ */

drm-radeon-kms-arbiter-return-ignore.patch:
 radeon_device.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- NEW FILE drm-radeon-kms-arbiter-return-ignore.patch ---
>From 93239ea158368016a017200cb133e1057fb3ef89 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied at redhat.com>
Date: Wed, 28 Oct 2009 11:09:58 +1000
Subject: [PATCH 1/3] drm/radeon/kms: ignore vga arbiter return.

Since we register all radeon devices, and the arbiter only cares about
VGA class ones, we will fail to startup on display controller class devices.
We don't gain anything by using the return value here.

this helps kms on sparc64 get started.

Reported-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/radeon/radeon_device.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 3d66703..df98814 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -582,10 +582,9 @@ int radeon_device_init(struct radeon_device *rdev,
 	DRM_INFO("register mmio size: %u\n", (unsigned)rdev->rmmio_size);
 
 	/* 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;
-	}
+	/* this will fail for cards that aren't VGA class devices, just
+	 * ignore it */
+	vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode);
 
 	r = radeon_init(rdev);
 	if (r)
-- 
1.6.5.1



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1888
retrieving revision 1.1889
diff -u -p -r1.1888 -r1.1889
--- kernel.spec	27 Oct 2009 15:42:23 -0000	1.1888
+++ kernel.spec	28 Oct 2009 05:59:33 -0000	1.1889
@@ -687,7 +687,7 @@ Patch1586: linux-2.6-virtio_blk-add-supp
 
 # nouveau + drm fixes
 Patch1810: kms-offb-handoff.patch
-Patch1812: drm-next-3e5cb98d.patch
+Patch1812: drm-next-fc7f7119.patch
 Patch1813: drm-radeon-pm.patch
 Patch1814: drm-nouveau.patch
 Patch1818: drm-i915-resume-force-mode.patch
@@ -696,6 +696,7 @@ Patch1824: drm-intel-next.patch
 Patch1825: drm-intel-pm.patch
 Patch1826: drm-intel-no-tv-hotplug.patch
 Patch1827: drm-disable-r600-aspm.patch
+Patch1828: drm-radeon-kms-arbiter-return-ignore.patch
 
 # vga arb
 Patch1900: linux-2.6-vga-arb.patch
@@ -1378,7 +1379,7 @@ ApplyPatch linux-2.6-e1000-ich9.patch
 
 # Nouveau DRM + drm fixes
 ApplyPatch kms-offb-handoff.patch
-ApplyPatch drm-next-3e5cb98d.patch
+ApplyPatch drm-next-fc7f7119.patch
 
 ApplyPatch drm-nouveau.patch
 # pm broken on my thinkpad t60p - airlied
@@ -1393,6 +1394,7 @@ ApplyPatch drm-disable-r600-aspm.patch
 # VGA arb + drm
 ApplyPatch linux-2.6-vga-arb.patch
 ApplyPatch drm-vga-arb.patch
+ApplyPatch drm-radeon-kms-arbiter-return-ignore.patch
 
 # linux1394 git patches
 #ApplyPatch linux-2.6-firewire-git-update.patch
@@ -2100,6 +2102,10 @@ fi
 # and build.
 
 %changelog
+* Wed Oct 28 2009 Dave Airlie <airlied at redhat.com> 2.6.31.5-103
+- drm-next-fc7f7119.patch: fix oops in SS code, fix multi-card, dvo.
+- drm-radeon-kms-arbiter-return-ignore.patch: fix arbiter for non-VGA display
+
 * Tue Oct 27 2009 Chuck Ebbert <cebbert at redhat.com>
 - Fix oops in VIA padlock-aes code.
 


--- drm-next-3e5cb98d.patch DELETED ---




More information about the fedora-extras-commits mailing list