Author: airlied
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1521
Modified Files:
kernel.spec
Added Files:
drm-next-4e16e5a5.patch
Removed Files:
drm-next-44c83571.patch drm-radeon-hdp-cache-flush.patch
Log Message:
* Tue Dec 01 2009 Dave Airlie <airlied(a)redhat.com> 2.6.31.6-156
- drm-next: fixes LVDS resume on r4xx, div/0 on no bios (#540593)
lockup on tv-out only startup.
drm-next-4e16e5a5.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 | 308
b/drivers/gpu/drm/drm_drv.c | 4
b/drivers/gpu/drm/drm_edid.c | 557
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 | 13
b/drivers/gpu/drm/drm_mm.c | 30
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/atom.c | 1
b/drivers/gpu/drm/radeon/atombios.h | 13
b/drivers/gpu/drm/radeon/atombios_crtc.c | 366
b/drivers/gpu/drm/radeon/avivod.h | 60
b/drivers/gpu/drm/radeon/mkregtable.c | 720
b/drivers/gpu/drm/radeon/r100.c | 1770 +
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 | 987
b/drivers/gpu/drm/radeon/r300d.h | 306
b/drivers/gpu/drm/radeon/r420.c | 310
b/drivers/gpu/drm/radeon/r420d.h | 249
b/drivers/gpu/drm/radeon/r500_reg.h | 12
b/drivers/gpu/drm/radeon/r520.c | 283
b/drivers/gpu/drm/radeon/r520d.h | 187
b/drivers/gpu/drm/radeon/r600.c | 1843 +
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 | 667
b/drivers/gpu/drm/radeon/radeon.h | 453
b/drivers/gpu/drm/radeon/radeon_agp.c | 12
b/drivers/gpu/drm/radeon/radeon_asic.h | 386
b/drivers/gpu/drm/radeon/radeon_atombios.c | 434
b/drivers/gpu/drm/radeon/radeon_benchmark.c | 4
b/drivers/gpu/drm/radeon/radeon_bios.c | 46
b/drivers/gpu/drm/radeon/radeon_clocks.c | 24
b/drivers/gpu/drm/radeon/radeon_combios.c | 717
b/drivers/gpu/drm/radeon/radeon_connectors.c | 751
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 | 334
b/drivers/gpu/drm/radeon/radeon_display.c | 193
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 | 309
b/drivers/gpu/drm/radeon/radeon_family.h | 97
b/drivers/gpu/drm/radeon/radeon_fb.c | 701
b/drivers/gpu/drm/radeon/radeon_fence.c | 49
b/drivers/gpu/drm/radeon/radeon_gart.c | 29
b/drivers/gpu/drm/radeon/radeon_gem.c | 10
b/drivers/gpu/drm/radeon/radeon_i2c.c | 109
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 | 152
b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 505
b/drivers/gpu/drm/radeon/radeon_legacy_tv.c | 904
b/drivers/gpu/drm/radeon/radeon_mode.h | 170
b/drivers/gpu/drm/radeon/radeon_object.c | 28
b/drivers/gpu/drm/radeon/radeon_object.h | 1
b/drivers/gpu/drm/radeon/radeon_pm.c | 65
b/drivers/gpu/drm/radeon/radeon_reg.h | 126
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 | 101
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 | 332
b/drivers/gpu/drm/radeon/rs400d.h | 160
b/drivers/gpu/drm/radeon/rs600.c | 611
b/drivers/gpu/drm/radeon/rs600d.h | 470
b/drivers/gpu/drm/radeon/rs690.c | 360
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 | 884
b/drivers/gpu/drm/radeon/rv515d.h | 603
b/drivers/gpu/drm/radeon/rv770.c | 1059 -
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 | 105
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
189 files changed, 42487 insertions(+), 44062 deletions(-)
--- NEW FILE drm-next-4e16e5a5.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 */
};
[...95895 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_ */
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1941
retrieving revision 1.1942
diff -u -p -r1.1941 -r1.1942
--- kernel.spec 30 Nov 2009 19:13:30 -0000 1.1941
+++ kernel.spec 30 Nov 2009 23:59:38 -0000 1.1942
@@ -710,7 +710,7 @@ Patch1586: linux-2.6-virtio_blk-add-supp
# nouveau + drm fixes
Patch1810: kms-offb-handoff.patch
-Patch1812: drm-next-44c83571.patch
+Patch1812: drm-next-4e16e5a5.patch
Patch1813: drm-radeon-pm.patch
Patch1814: drm-nouveau.patch
Patch1818: drm-i915-resume-force-mode.patch
@@ -723,7 +723,6 @@ Patch1831: drm-conservative-fallback-mod
Patch1832: drm-edid-retry.patch
Patch1834: drm-edid-header-fixup.patch
Patch1835: drm-default-mode.patch
-Patch1836: drm-radeon-hdp-cache-flush.patch
Patch1837: drm-i915-fix-sync-to-vbl-when-vga-is-off.patch
# vga arb
@@ -1421,8 +1420,7 @@ ApplyPatch linux-2.6-e1000-ich9.patch
# Nouveau DRM + drm fixes
ApplyPatch kms-offb-handoff.patch
-ApplyPatch drm-next-44c83571.patch
-ApplyPatch drm-radeon-hdp-cache-flush.patch
+ApplyPatch drm-next-4e16e5a5.patch
ApplyPatch drm-conservative-fallback-modes.patch
ApplyPatch drm-edid-retry.patch
ApplyPatch drm-edid-header-fixup.patch
@@ -2155,6 +2153,10 @@ fi
# and build.
%changelog
+* Tue Dec 01 2009 Dave Airlie <airlied(a)redhat.com> 2.6.31.6-156
+- drm-next: fixes LVDS resume on r4xx, div/0 on no bios (#540593)
+ lockup on tv-out only startup.
+
* Mon Nov 30 2009 Kyle McMartin <kyle(a)redhat.com>
- drm-i915-fix-sync-to-vbl-when-vga-is-off.patch: add (rhbz#541670)
--- drm-next-44c83571.patch DELETED ---
--- drm-radeon-hdp-cache-flush.patch DELETED ---