rpms/kernel/F-12 drm-next-d4ac6a05.patch, NONE, 1.1 drm-nouveau.patch, 1.61, 1.62 drm-vga-arb.patch, 1.8, 1.9 kernel.spec, 1.1849, 1.1850 drm-next-4c57edba4.patch, 1.1, NONE
Dave Airlie
airlied at fedoraproject.org
Thu Oct 8 04:32:55 UTC 2009
Author: airlied
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10357
Modified Files:
drm-nouveau.patch drm-vga-arb.patch kernel.spec
Added Files:
drm-next-d4ac6a05.patch
Removed Files:
drm-next-4c57edba4.patch
Log Message:
* Thu Oct 08 2009 Dave Airlie <airlied at redhat.com> 2.6.31.1-64
- rebase latest drm-next, fixes many s/r and r600 problems
drm-next-d4ac6a05.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 | 1014
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 | 618
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 | 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 | 106
b/drivers/gpu/drm/radeon/avivod.h | 60
b/drivers/gpu/drm/radeon/mkregtable.c | 720
b/drivers/gpu/drm/radeon/r100.c | 1711 +
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 | 979
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 | 3
b/drivers/gpu/drm/radeon/r520.c | 281
b/drivers/gpu/drm/radeon/r520d.h | 187
b/drivers/gpu/drm/radeon/r600.c | 1817 +
b/drivers/gpu/drm/radeon/r600_blit.c | 846
b/drivers/gpu/drm/radeon/r600_blit_kms.c | 806
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 | 662
b/drivers/gpu/drm/radeon/radeon.h | 438
b/drivers/gpu/drm/radeon/radeon_asic.h | 351
b/drivers/gpu/drm/radeon/radeon_atombios.c | 180
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 | 58
b/drivers/gpu/drm/radeon/radeon_connectors.c | 545
b/drivers/gpu/drm/radeon/radeon_cp.c | 151
b/drivers/gpu/drm/radeon/radeon_cs.c | 104
b/drivers/gpu/drm/radeon/radeon_device.c | 303
b/drivers/gpu/drm/radeon/radeon_display.c | 146
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 | 143
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 | 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 | 7
b/drivers/gpu/drm/radeon/radeon_kms.c | 74
b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 86
b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 377
b/drivers/gpu/drm/radeon/radeon_legacy_tv.c | 904
b/drivers/gpu/drm/radeon/radeon_mode.h | 76
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 | 80
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 | 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 | 591
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 | 1034
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 | 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
181 files changed, 40690 insertions(+), 43475 deletions(-)
--- NEW FILE drm-next-d4ac6a05.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 */
};
[...92057 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-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 | 755
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, 58719 insertions(+)
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/drm-nouveau.patch,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- drm-nouveau.patch 29 Sep 2009 03:21:19 -0000 1.61
+++ drm-nouveau.patch 8 Oct 2009 04:32:54 -0000 1.62
@@ -13005,7 +13005,7 @@ index 0000000..071e3c6
+{
+ NV_DEBUG(dev, "\n");
+
-+ return drm_fb_helper_single_fb_probe(dev, nouveau_fbcon_create);
++ return drm_fb_helper_single_fb_probe(dev, 32, nouveau_fbcon_create);
+}
+
+int
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 | 19 +++++++++++++++++++
include/drm/drmP.h | 3 +++
13 files changed, 132 insertions(+)
Index: drm-vga-arb.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/drm-vga-arb.patch,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- drm-vga-arb.patch 25 Sep 2009 03:43:52 -0000 1.8
+++ drm-vga-arb.patch 8 Oct 2009 04:32:54 -0000 1.9
@@ -1,38 +1,6 @@
-From 28d520433b6375740990ab99d69b0d0067fd656b Mon Sep 17 00:00:00 2001
-From: Dave Airlie <airlied at redhat.com>
-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 ++++++++++++++++++++
- 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 | 3 +++
- 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
---- a/drivers/gpu/drm/drm_irq.c
-+++ b/drivers/gpu/drm/drm_irq.c
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/drm_irq.c.da linux-2.6.31.noarch/drivers/gpu/drm/drm_irq.c
+--- linux-2.6.31.noarch/drivers/gpu/drm/drm_irq.c.da 2009-09-10 08:13:59.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/drm_irq.c 2009-10-08 14:21:08.000000000 +1000
@@ -37,6 +37,7 @@
#include <linux/interrupt.h> /* For task queue support */
@@ -68,7 +36,7 @@ index f85aaf2..0a6f0b3 100644
/**
* Install IRQ handler.
*
-@@ -231,6 +252,9 @@ int drm_irq_install(struct drm_device *dev)
+@@ -231,6 +252,9 @@ int drm_irq_install(struct drm_device *d
return ret;
}
@@ -78,7 +46,7 @@ index f85aaf2..0a6f0b3 100644
/* After installing handler */
ret = dev->driver->irq_postinstall(dev);
if (ret < 0) {
-@@ -279,6 +303,9 @@ int drm_irq_uninstall(struct drm_device * dev)
+@@ -279,6 +303,9 @@ int drm_irq_uninstall(struct drm_device
DRM_DEBUG("irq=%d\n", dev->pdev->irq);
@@ -88,10 +56,9 @@ index f85aaf2..0a6f0b3 100644
dev->driver->irq_uninstall(dev);
free_irq(dev->pdev->irq, dev);
-diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
-index 9909505..5a49a18 100644
---- a/drivers/gpu/drm/i915/i915_dma.c
-+++ b/drivers/gpu/drm/i915/i915_dma.c
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_dma.c.da linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_dma.c
+--- linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_dma.c.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_dma.c 2009-10-08 14:21:08.000000000 +1000
@@ -33,6 +33,7 @@
#include "intel_drv.h"
#include "i915_drm.h"
@@ -100,7 +67,7 @@ index 9909505..5a49a18 100644
/* Really want an OS-independent resettable timer. Would like to have
* this loop run for (eg) 3 sec, but have the timer reset every time
-@@ -1012,6 +1013,19 @@ static int i915_probe_agp(struct drm_device *dev, uint32_t *aperture_size,
+@@ -1012,6 +1013,19 @@ static int i915_probe_agp(struct drm_dev
return 0;
}
@@ -120,7 +87,7 @@ index 9909505..5a49a18 100644
static int i915_load_modeset_init(struct drm_device *dev,
unsigned long prealloc_size,
unsigned long agp_size)
-@@ -1057,6 +1071,11 @@ static int i915_load_modeset_init(struct drm_device *dev,
+@@ -1057,6 +1071,11 @@ static int i915_load_modeset_init(struct
if (ret)
DRM_INFO("failed to find VBIOS tables\n");
@@ -132,7 +99,7 @@ index 9909505..5a49a18 100644
ret = drm_irq_install(dev);
if (ret)
goto destroy_ringbuffer;
-@@ -1324,6 +1343,7 @@ int i915_driver_unload(struct drm_device *dev)
+@@ -1324,6 +1343,7 @@ int i915_driver_unload(struct drm_device
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
drm_irq_uninstall(dev);
@@ -140,11 +107,10 @@ index 9909505..5a49a18 100644
}
if (dev->pdev->msi_enabled)
-diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
-index 77ed060..a0632f8 100644
---- a/drivers/gpu/drm/i915/i915_drv.h
-+++ b/drivers/gpu/drm/i915/i915_drv.h
-@@ -766,6 +766,7 @@ static inline void opregion_enable_asle(struct drm_device *dev) { return; }
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_drv.h.da linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_drv.h
+--- linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_drv.h.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_drv.h 2009-10-08 14:21:08.000000000 +1000
+@@ -766,6 +766,7 @@ static inline void opregion_enable_asle(
/* modesetting */
extern void intel_modeset_init(struct drm_device *dev);
extern void intel_modeset_cleanup(struct drm_device *dev);
@@ -152,10 +118,9 @@ index 77ed060..a0632f8 100644
/**
* Lock test for when it's just for synchronization of ring access.
-diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
-index e38cd21..3f79635 100644
---- a/drivers/gpu/drm/i915/i915_reg.h
-+++ b/drivers/gpu/drm/i915/i915_reg.h
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_reg.h.da linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_reg.h
+--- linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_reg.h.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/i915/i915_reg.h 2009-10-08 14:21:08.000000000 +1000
@@ -30,6 +30,7 @@
* fb aperture size and the amount of pre-reserved memory.
*/
@@ -164,11 +129,10 @@ index e38cd21..3f79635 100644
#define INTEL_GMCH_ENABLED 0x4
#define INTEL_GMCH_MEM_MASK 0x1
#define INTEL_GMCH_MEM_64M 0x1
-diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
-index 155719f..0227b16 100644
---- a/drivers/gpu/drm/i915/intel_display.c
-+++ b/drivers/gpu/drm/i915/intel_display.c
-@@ -3917,3 +3917,20 @@ struct drm_encoder *intel_best_encoder(struct drm_connector *connector)
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_display.c.da linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_display.c
+--- linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_display.c.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_display.c 2009-10-08 14:21:08.000000000 +1000
+@@ -3928,3 +3928,20 @@ struct drm_encoder *intel_best_encoder(s
return &intel_output->enc;
}
@@ -189,21 +153,19 @@ index 155719f..0227b16 100644
+ pci_write_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, gmch_ctrl);
+ return 0;
+}
-diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
-index b9e47f1..3a0004f 100644
---- a/drivers/gpu/drm/i915/intel_drv.h
-+++ b/drivers/gpu/drm/i915/intel_drv.h
-@@ -178,4 +178,5 @@ extern int intel_framebuffer_create(struct drm_device *dev,
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_drv.h.da linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_drv.h
+--- linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_drv.h.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_drv.h 2009-10-08 14:21:08.000000000 +1000
+@@ -181,4 +181,5 @@ extern int intel_framebuffer_create(stru
struct drm_mode_fb_cmd *mode_cmd,
struct drm_framebuffer **fb,
struct drm_gem_object *obj);
+
#endif /* __INTEL_DRV_H__ */
-diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
-index 737970b..be51c5f 100644
---- a/drivers/gpu/drm/radeon/r100.c
-+++ b/drivers/gpu/drm/radeon/r100.c
-@@ -1955,6 +1955,20 @@ void r100_vram_init_sizes(struct radeon_device *rdev)
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/radeon/r100.c.da linux-2.6.31.noarch/drivers/gpu/drm/radeon/r100.c
+--- linux-2.6.31.noarch/drivers/gpu/drm/radeon/r100.c.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/radeon/r100.c 2009-10-08 14:21:08.000000000 +1000
+@@ -1763,6 +1763,20 @@ void r100_vram_init_sizes(struct radeon_
rdev->mc.real_vram_size = rdev->mc.aper_size;
}
@@ -224,11 +186,10 @@ index 737970b..be51c5f 100644
void r100_vram_info(struct radeon_device *rdev)
{
r100_vram_get_type(rdev);
-diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
-index 5f42fad..eab31c1 100644
---- a/drivers/gpu/drm/radeon/r600.c
-+++ b/drivers/gpu/drm/radeon/r600.c
-@@ -1499,6 +1499,20 @@ int r600_startup(struct radeon_device *rdev)
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600.c.da linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600.c
+--- linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600.c.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600.c 2009-10-08 14:21:08.000000000 +1000
+@@ -1534,6 +1534,20 @@ int r600_startup(struct radeon_device *r
return 0;
}
@@ -249,10 +210,9 @@ index 5f42fad..eab31c1 100644
int r600_resume(struct radeon_device *rdev)
{
int r;
-diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h
-index 723295f..4a9028a 100644
---- a/drivers/gpu/drm/radeon/r600d.h
-+++ b/drivers/gpu/drm/radeon/r600d.h
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600d.h.da linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600d.h
+--- linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600d.h.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/radeon/r600d.h 2009-10-08 14:21:08.000000000 +1000
@@ -78,6 +78,7 @@
#define CB_COLOR0_MASK 0x28100
@@ -261,103 +221,82 @@ index 723295f..4a9028a 100644
#define CP_STAT 0x8680
#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 817af8e..c839b60 100644
---- a/drivers/gpu/drm/radeon/radeon.h
-+++ b/drivers/gpu/drm/radeon/radeon.h
-@@ -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);
-+ void (*vga_set_state)(struct radeon_device *rdev, bool state);
- int (*gpu_reset)(struct radeon_device *rdev);
- int (*mc_init)(struct radeon_device *rdev);
- void (*mc_fini)(struct radeon_device *rdev);
-@@ -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))
-+#define radeon_vga_set_state(rdev, state) (rdev)->asic->vga_set_state((rdev), (state))
- #define radeon_gpu_reset(rdev) (rdev)->asic->gpu_reset((rdev))
- #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 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);
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_asic.h.da linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_asic.h
+--- linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_asic.h.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_asic.h 2009-10-08 14:24:29.000000000 +1000
+@@ -47,6 +47,7 @@ extern int r100_suspend(struct radeon_de
+ extern int r100_resume(struct radeon_device *rdev);
+ uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg);
void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
- void r100_errata(struct radeon_device *rdev);
- void r100_vram_info(struct radeon_device *rdev);
+void r100_vga_set_state(struct radeon_device *rdev, bool state);
int r100_gpu_reset(struct radeon_device *rdev);
- int r100_mc_init(struct radeon_device *rdev);
- void r100_mc_fini(struct radeon_device *rdev);
-@@ -89,6 +90,7 @@ static struct radeon_asic r100_asic = {
- .init = &r100_init,
- .errata = &r100_errata,
- .vram_info = &r100_vram_info,
+ u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc);
+ void r100_pci_gart_tlb_flush(struct radeon_device *rdev);
+@@ -78,6 +79,7 @@ static struct radeon_asic r100_asic = {
+ .fini = &r100_fini,
+ .suspend = &r100_suspend,
+ .resume = &r100_resume,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &r100_gpu_reset,
- .mc_init = &r100_mc_init,
- .mc_fini = &r100_mc_fini,
-@@ -158,6 +160,7 @@ static struct radeon_asic r300_asic = {
- .init = &r300_init,
- .errata = &r300_errata,
- .vram_info = &r300_vram_info,
+ .gart_tlb_flush = &r100_pci_gart_tlb_flush,
+ .gart_set_page = &r100_pci_gart_set_page,
+@@ -130,6 +132,7 @@ static struct radeon_asic r300_asic = {
+ .fini = &r300_fini,
+ .suspend = &r300_suspend,
+ .resume = &r300_resume,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &r300_gpu_reset,
- .mc_init = &r300_mc_init,
- .mc_fini = &r300_mc_fini,
-@@ -208,6 +211,7 @@ static struct radeon_asic r420_asic = {
+ .gart_tlb_flush = &r100_pci_gart_tlb_flush,
+ .gart_set_page = &r100_pci_gart_set_page,
+@@ -166,6 +169,7 @@ static struct radeon_asic r420_asic = {
+ .fini = &r420_fini,
+ .suspend = &r420_suspend,
.resume = &r420_resume,
- .errata = NULL,
- .vram_info = NULL,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &r300_gpu_reset,
- .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,
+ .gart_tlb_flush = &rv370_pcie_gart_tlb_flush,
+ .gart_set_page = &rv370_pcie_gart_set_page,
+@@ -207,6 +211,7 @@ static struct radeon_asic rs400_asic = {
+ .fini = &rs400_fini,
+ .suspend = &rs400_suspend,
+ .resume = &rs400_resume,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &r300_gpu_reset,
- .mc_init = &rs400_mc_init,
- .mc_fini = &rs400_mc_fini,
-@@ -323,6 +328,7 @@ static struct radeon_asic rs600_asic = {
- .init = &rs600_init,
- .errata = &rs600_errata,
- .vram_info = &rs600_vram_info,
+ .gart_tlb_flush = &rs400_gart_tlb_flush,
+ .gart_set_page = &rs400_gart_set_page,
+@@ -252,6 +257,7 @@ static struct radeon_asic rs600_asic = {
+ .fini = &rs600_fini,
+ .suspend = &rs600_suspend,
+ .resume = &rs600_resume,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &r300_gpu_reset,
- .mc_init = &rs600_mc_init,
- .mc_fini = &rs600_mc_fini,
-@@ -372,6 +378,7 @@ static struct radeon_asic rs690_asic = {
- .init = &rs600_init,
- .errata = &rs690_errata,
- .vram_info = &rs690_vram_info,
+ .gart_tlb_flush = &rs600_gart_tlb_flush,
+ .gart_set_page = &rs600_gart_set_page,
+@@ -290,6 +296,7 @@ static struct radeon_asic rs690_asic = {
+ .fini = &rs690_fini,
+ .suspend = &rs690_suspend,
+ .resume = &rs690_resume,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &r300_gpu_reset,
- .mc_init = &rs690_mc_init,
- .mc_fini = &rs690_mc_fini,
-@@ -428,6 +435,7 @@ static struct radeon_asic rv515_asic = {
- .init = &rv515_init,
- .errata = &rv515_errata,
- .vram_info = &rv515_vram_info,
+ .gart_tlb_flush = &rs400_gart_tlb_flush,
+ .gart_set_page = &rs400_gart_set_page,
+@@ -334,6 +341,7 @@ static struct radeon_asic rv515_asic = {
+ .fini = &rv515_fini,
+ .suspend = &rv515_suspend,
+ .resume = &rv515_resume,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &rv515_gpu_reset,
- .mc_init = &rv515_mc_init,
- .mc_fini = &rv515_mc_fini,
-@@ -477,6 +485,7 @@ static struct radeon_asic r520_asic = {
- .init = &rv515_init,
- .errata = &r520_errata,
- .vram_info = &r520_vram_info,
+ .gart_tlb_flush = &rv370_pcie_gart_tlb_flush,
+ .gart_set_page = &rv370_pcie_gart_set_page,
+@@ -369,6 +377,7 @@ static struct radeon_asic r520_asic = {
+ .fini = &rv515_fini,
+ .suspend = &rv515_suspend,
+ .resume = &r520_resume,
+ .vga_set_state = &r100_vga_set_state,
.gpu_reset = &rv515_gpu_reset,
- .mc_init = &r520_mc_init,
- .mc_fini = &r520_mc_fini,
-@@ -520,6 +529,7 @@ int r600_init(struct radeon_device *rdev);
+ .gart_tlb_flush = &rv370_pcie_gart_tlb_flush,
+ .gart_set_page = &rv370_pcie_gart_set_page,
+@@ -400,6 +409,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);
@@ -365,26 +304,25 @@ index 5f2a9e6..8968f78 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);
-@@ -556,6 +566,7 @@ static struct radeon_asic r600_asic = {
+@@ -432,6 +442,7 @@ static struct radeon_asic r600_asic = {
+ .fini = &r600_fini,
+ .suspend = &r600_suspend,
.resume = &r600_resume,
- .cp_commit = &r600_cp_commit,
- .vram_info = NULL,
+ .vga_set_state = &r600_vga_set_state,
+ .cp_commit = &r600_cp_commit,
.gpu_reset = &r600_gpu_reset,
- .mc_init = NULL,
- .mc_fini = NULL,
-@@ -606,6 +617,7 @@ static struct radeon_asic rv770_asic = {
+ .gart_tlb_flush = &r600_pcie_gart_tlb_flush,
+@@ -468,6 +479,7 @@ static struct radeon_asic rv770_asic = {
+ .fini = &rv770_fini,
+ .suspend = &rv770_suspend,
+ .resume = &rv770_resume,
++ .vga_set_state = &r600_vga_set_state,
.cp_commit = &r600_cp_commit,
- .vram_info = NULL,
.gpu_reset = &rv770_gpu_reset,
-+ .vga_set_state = &r600_vga_set_state,
- .mc_init = NULL,
- .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 8a40c61..daf5db7 100644
---- a/drivers/gpu/drm/radeon/radeon_device.c
-+++ b/drivers/gpu/drm/radeon/radeon_device.c
+ .gart_tlb_flush = &r600_pcie_gart_tlb_flush,
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_device.c.da linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_device.c
+--- linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_device.c.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon_device.c 2009-10-08 14:25:26.000000000 +1000
@@ -29,6 +29,7 @@
#include <drm/drmP.h>
#include <drm/drm_crtc_helper.h>
@@ -393,8 +331,8 @@ index 8a40c61..daf5db7 100644
#include "radeon_reg.h"
#include "radeon.h"
#include "radeon_asic.h"
-@@ -480,7 +481,18 @@ void radeon_combios_fini(struct radeon_device *rdev)
- {
+@@ -374,7 +375,18 @@ int radeon_asic_init(struct radeon_devic
+ return 0;
}
+/* if we get transitioned to only one device, tak VGA back */
@@ -410,42 +348,51 @@ index 8a40c61..daf5db7 100644
+ return VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM;
+}
/*
- * Radeon device.
+ * Wrapper around modesetting bits.
*/
-@@ -578,6 +590,13 @@ int radeon_device_init(struct radeon_device *rdev,
- if (r) {
- return r;
- }
-+
+@@ -568,6 +580,12 @@ int radeon_device_init(struct radeon_dev
+ DRM_INFO("register mmio base: 0x%08X\n", (uint32_t)rdev->rmmio_base);
+ 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;
+ }
+
- 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);
-
-- /* TODO: disable VGA need to use VGA request */
- /* BIOS*/
- if (!radeon_get_bios(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);
-+ vga_client_register(rdev->pdev, NULL, NULL, NULL);
- radeon_fence_driver_fini(rdev);
- radeon_clocks_fini(rdev);
- radeon_object_fini(rdev);
-diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index eeefb63..c8e64bb 100644
---- a/include/drm/drmP.h
-+++ b/include/drm/drmP.h
+ r = radeon_init(rdev);
+ if (r)
+ return r;
+@@ -597,6 +615,7 @@ void radeon_device_fini(struct radeon_de
+ rdev->shutdown = true;
+ /* Order matter so becarefull if you rearrange anythings */
+ radeon_fini(rdev);
++ vga_client_register(rdev->pdev, NULL, NULL, NULL);
+ iounmap(rdev->rmmio);
+ rdev->rmmio = NULL;
+ }
+diff -up linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon.h.da linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon.h
+--- linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon.h.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/drivers/gpu/drm/radeon/radeon.h 2009-10-08 14:22:15.000000000 +1000
+@@ -590,6 +590,7 @@ struct radeon_asic {
+ void (*fini)(struct radeon_device *rdev);
+ int (*resume)(struct radeon_device *rdev);
+ int (*suspend)(struct radeon_device *rdev);
++ void (*vga_set_state)(struct radeon_device *rdev, bool state);
+ int (*gpu_reset)(struct radeon_device *rdev);
+ void (*gart_tlb_flush)(struct radeon_device *rdev);
+ int (*gart_set_page)(struct radeon_device *rdev, int i, uint64_t addr);
+@@ -935,6 +936,7 @@ static inline void radeon_ring_write(str
+ #define radeon_fini(rdev) (rdev)->asic->fini((rdev))
+ #define radeon_resume(rdev) (rdev)->asic->resume((rdev))
+ #define radeon_suspend(rdev) (rdev)->asic->suspend((rdev))
++#define radeon_vga_set_state(rdev, state) (rdev)->asic->vga_set_state((rdev), (state))
+ #define radeon_cs_parse(p) rdev->asic->cs_parse((p))
+ #define radeon_gpu_reset(rdev) (rdev)->asic->gpu_reset((rdev))
+ #define radeon_gart_tlb_flush(rdev) (rdev)->asic->gart_tlb_flush((rdev))
+diff -up linux-2.6.31.noarch/include/drm/drmP.h.da linux-2.6.31.noarch/include/drm/drmP.h
+--- linux-2.6.31.noarch/include/drm/drmP.h.da 2009-10-08 14:20:49.000000000 +1000
++++ linux-2.6.31.noarch/include/drm/drmP.h 2009-10-08 14:21:08.000000000 +1000
@@ -810,6 +810,9 @@ struct drm_driver {
int (*gem_init_object) (struct drm_gem_object *obj);
void (*gem_free_object) (struct drm_gem_object *obj);
@@ -456,6 +403,3 @@ index eeefb63..c8e64bb 100644
/* Driver private ops for this object */
struct vm_operations_struct *gem_vm_ops;
---
-1.6.4.2
-
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1849
retrieving revision 1.1850
diff -u -p -r1.1849 -r1.1850
--- kernel.spec 8 Oct 2009 00:26:32 -0000 1.1849
+++ kernel.spec 8 Oct 2009 04:32:54 -0000 1.1850
@@ -706,7 +706,7 @@ Patch1585: linux-2.6-xen-increase-device
Patch1586: linux-2.6-virtio_blk-add-support-for-cache-flush.patch
# nouveau + drm fixes
-Patch1812: drm-next-4c57edba4.patch
+Patch1812: drm-next-d4ac6a05.patch
Patch1813: drm-radeon-pm.patch
Patch1814: drm-nouveau.patch
Patch1818: drm-i915-resume-force-mode.patch
@@ -1383,7 +1383,7 @@ ApplyPatch linux-2.6-block-silently-erro
ApplyPatch linux-2.6-e1000-ich9.patch
# Nouveau DRM + drm fixes
-ApplyPatch drm-next-4c57edba4.patch
+ApplyPatch drm-next-d4ac6a05.patch
ApplyPatch drm-nouveau.patch
# pm broken on my thinkpad t60p - airlied
@@ -2079,6 +2079,9 @@ fi
# and build.
%changelog
+* Thu Oct 08 2009 Dave Airlie <airlied at redhat.com> 2.6.31.1-64
+- rebase latest drm-next, fixes many s/r and r600 problems
+
* Wed Oct 07 2009 Dave Jones <davej at redhat.com>
- Don't mark the initramfs file as a ghost.
--- drm-next-4c57edba4.patch DELETED ---
More information about the fedora-extras-commits
mailing list