diff --git a/packages/linux/meta b/packages/linux/meta index 22e58e429f..208299b283 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -14,6 +14,6 @@ PKG_LONGDESC="This package contains a precompiled kernel image and the modules." PKG_IS_ADDON="no" if [ "$LINUX_NEXT" = "yes" ]; then - PKG_VERSION="2.6.37-rc1" + PKG_VERSION="2.6.37-rc2" PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/testing/$PKG_NAME-$PKG_VERSION.tar.bz2" fi diff --git a/packages/linux/patches/linux-2.6.37-rc1-000_crosscompile.patch b/packages/linux/patches/linux-2.6.37-rc2-000_crosscompile.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-000_crosscompile.patch rename to packages/linux/patches/linux-2.6.37-rc2-000_crosscompile.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-000_fix_include.patch b/packages/linux/patches/linux-2.6.37-rc2-000_fix_include.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-000_fix_include.patch rename to packages/linux/patches/linux-2.6.37-rc2-000_fix_include.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-000_fix_userspace_build_of_fs.h.patch b/packages/linux/patches/linux-2.6.37-rc2-000_fix_userspace_build_of_fs.h.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-000_fix_userspace_build_of_fs.h.patch rename to packages/linux/patches/linux-2.6.37-rc2-000_fix_userspace_build_of_fs.h.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-002_bash_only_feature.patch b/packages/linux/patches/linux-2.6.37-rc2-002_bash_only_feature.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-002_bash_only_feature.patch rename to packages/linux/patches/linux-2.6.37-rc2-002_bash_only_feature.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-003-no_dev_console.patch b/packages/linux/patches/linux-2.6.37-rc2-003-no_dev_console.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-003-no_dev_console.patch rename to packages/linux/patches/linux-2.6.37-rc2-003-no_dev_console.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-004_lower_undefined_mode_timeout.patch b/packages/linux/patches/linux-2.6.37-rc2-004_lower_undefined_mode_timeout.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-004_lower_undefined_mode_timeout.patch rename to packages/linux/patches/linux-2.6.37-rc2-004_lower_undefined_mode_timeout.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-005_kconfig_no_timestamp.patch b/packages/linux/patches/linux-2.6.37-rc2-005_kconfig_no_timestamp.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-005_kconfig_no_timestamp.patch rename to packages/linux/patches/linux-2.6.37-rc2-005_kconfig_no_timestamp.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-006_enable_utf8.patch b/packages/linux/patches/linux-2.6.37-rc2-006_enable_utf8.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-006_enable_utf8.patch rename to packages/linux/patches/linux-2.6.37-rc2-006_enable_utf8.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-007_die_floppy_die.patch b/packages/linux/patches/linux-2.6.37-rc2-007_die_floppy_die.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-007_die_floppy_die.patch rename to packages/linux/patches/linux-2.6.37-rc2-007_die_floppy_die.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-008-hda_intel_prealloc_4mb_dmabuffer.patch b/packages/linux/patches/linux-2.6.37-rc2-008-hda_intel_prealloc_4mb_dmabuffer.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-008-hda_intel_prealloc_4mb_dmabuffer.patch rename to packages/linux/patches/linux-2.6.37-rc2-008-hda_intel_prealloc_4mb_dmabuffer.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-009_disable_i8042_check_on_apple_mac.patch b/packages/linux/patches/linux-2.6.37-rc2-009_disable_i8042_check_on_apple_mac.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-009_disable_i8042_check_on_apple_mac.patch rename to packages/linux/patches/linux-2.6.37-rc2-009_disable_i8042_check_on_apple_mac.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-050_add_appleir_usb_driver.patch b/packages/linux/patches/linux-2.6.37-rc2-050_add_appleir_usb_driver.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-050_add_appleir_usb_driver.patch rename to packages/linux/patches/linux-2.6.37-rc2-050_add_appleir_usb_driver.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-052-aureal_remote_quirk-0.1.patch b/packages/linux/patches/linux-2.6.37-rc2-052-aureal_remote_quirk-0.1.patch similarity index 100% rename from packages/linux/patches/linux-2.6.37-rc1-052-aureal_remote_quirk-0.1.patch rename to packages/linux/patches/linux-2.6.37-rc2-052-aureal_remote_quirk-0.1.patch diff --git a/packages/linux/patches/linux-2.6.37-rc1-110-drm_nouveau_upstream-20101111.patch b/packages/linux/patches/linux-2.6.37-rc2-110-drm_nouveau_upstream-20101116.patch similarity index 89% rename from packages/linux/patches/linux-2.6.37-rc1-110-drm_nouveau_upstream-20101111.patch rename to packages/linux/patches/linux-2.6.37-rc2-110-drm_nouveau_upstream-20101116.patch index 8a8e34765b..0c914966ed 100644 --- a/packages/linux/patches/linux-2.6.37-rc1-110-drm_nouveau_upstream-20101111.patch +++ b/packages/linux/patches/linux-2.6.37-rc2-110-drm_nouveau_upstream-20101116.patch @@ -1,6 +1,6 @@ -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/Makefile linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/Makefile ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/Makefile 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/Makefile 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/Makefile linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/Makefile +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/Makefile 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/Makefile 2010-11-17 02:20:11.000000000 +0100 @@ -5,7 +5,7 @@ ccflags-y := -Iinclude/drm nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ @@ -21,9 +21,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/Makefile linux-2.6.37-rc1.no nv50_cursor.o nv50_display.o nv50_fbcon.o \ nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \ nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o \ -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_backlight.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_backlight.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_backlight.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_backlight.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_backlight.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_backlight.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_backlight.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_backlight.c 2010-11-17 02:20:11.000000000 +0100 @@ -31,6 +31,7 @@ */ @@ -47,9 +47,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_backlight.c linux-2. switch (dev_priv->card_type) { case NV_40: return nouveau_nv40_backlight_init(dev); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-11-17 02:20:11.000000000 +0100 @@ -6039,7 +6039,6 @@ if (type != cte->type) NV_WARN(dev, " -> type 0x%02x\n", cte->type); @@ -67,9 +67,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.37- if (NVReadVgaCrtc(dev, 0, 0x00) == 0 && NVReadVgaCrtc(dev, 0, 0x1a) == 0) return false; -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-11-17 02:20:11.000000000 +0100 @@ -46,9 +46,7 @@ if (unlikely(nvbo->gem)) DRM_ERROR("bo %p still attached to GEM object\n", bo); @@ -281,10 +281,56 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.37-rc .fault_reserve_notify = &nouveau_ttm_fault_reserve_notify, .io_mem_reserve = &nouveau_ttm_io_mem_reserve, .io_mem_free = &nouveau_ttm_io_mem_free, -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-11-12 06:18:06.000000000 +0100 -@@ -107,53 +107,56 @@ +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-11-17 02:20:11.000000000 +0100 +@@ -39,22 +39,22 @@ + + if (dev_priv->card_type >= NV_50) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, +- dev_priv->vm_end, NV_DMA_ACCESS_RO, +- NV_DMA_TARGET_AGP, &pushbuf); ++ dev_priv->vm_end, NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_VM, &pushbuf); + chan->pushbuf_base = pb->bo.offset; + } else + if (pb->bo.mem.mem_type == TTM_PL_TT) { +- ret = nouveau_gpuobj_gart_dma_new(chan, 0, +- dev_priv->gart_info.aper_size, +- NV_DMA_ACCESS_RO, &pushbuf, +- NULL); ++ ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, ++ dev_priv->gart_info.aper_size, ++ NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_GART, &pushbuf); + chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; + } else + if (dev_priv->card_type != NV_04) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, + dev_priv->fb_available_size, +- NV_DMA_ACCESS_RO, +- NV_DMA_TARGET_VIDMEM, &pushbuf); ++ NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_VRAM, &pushbuf); + chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; + } else { + /* NV04 cmdbuf hack, from original ddx.. not sure of it's +@@ -62,11 +62,10 @@ + * VRAM. + */ + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, +- pci_resource_start(dev->pdev, +- 1), ++ pci_resource_start(dev->pdev, 1), + dev_priv->fb_available_size, +- NV_DMA_ACCESS_RO, +- NV_DMA_TARGET_PCI, &pushbuf); ++ NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_PCI, &pushbuf); + chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; + } + +@@ -107,53 +106,56 @@ int nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, struct drm_file *file_priv, @@ -370,7 +416,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. return ret; } -@@ -161,18 +164,18 @@ +@@ -161,18 +163,18 @@ /* Locate channel's user control regs */ if (dev_priv->card_type < NV_40) @@ -393,7 +439,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. return -ENOMEM; } chan->user_put = 0x40; -@@ -182,15 +185,15 @@ +@@ -182,15 +184,15 @@ ret = nouveau_notifier_init_channel(chan); if (ret) { NV_ERROR(dev, "ntfy %d\n", ret); @@ -412,7 +458,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. return ret; } -@@ -198,7 +201,7 @@ +@@ -198,7 +200,7 @@ ret = nouveau_channel_pushbuf_ctxdma_init(chan); if (ret) { NV_ERROR(dev, "pbctxdma %d\n", ret); @@ -421,7 +467,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. return ret; } -@@ -206,16 +209,18 @@ +@@ -206,16 +208,18 @@ pfifo->reassign(dev, false); /* Create a graphics context for new channel */ @@ -445,7 +491,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. return ret; } -@@ -225,83 +230,121 @@ +@@ -225,83 +229,121 @@ if (!ret) ret = nouveau_fence_channel_init(chan); if (ret) { @@ -596,7 +642,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. nouveau_gpuobj_ref(NULL, &chan->pushbuf); if (chan->pushbuf_bo) { nouveau_bo_unmap(chan->pushbuf_bo); -@@ -310,44 +353,62 @@ +@@ -310,44 +352,62 @@ } nouveau_gpuobj_channel_takedown(chan); nouveau_notifier_takedown_channel(chan); @@ -677,7 +723,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. /*********************************** * ioctls wrapping the functions -@@ -395,24 +456,26 @@ +@@ -395,24 +455,26 @@ /* Named memory object area */ ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem, &init->notifier_handle); @@ -712,7 +758,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. return 0; } -@@ -421,18 +484,18 @@ +@@ -421,18 +483,18 @@ ***********************************/ struct drm_ioctl_desc nouveau_ioctls[] = { @@ -743,9 +789,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6. }; int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_connector.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_connector.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-11-17 02:20:11.000000000 +0100 @@ -37,6 +37,8 @@ #include "nouveau_connector.h" #include "nouveau_hw.h" @@ -959,9 +1005,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_connector.c linux-2. + + drm_helper_hpd_irq_event(dev); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_connector.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_connector.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-11-17 02:20:11.000000000 +0100 @@ -52,9 +52,6 @@ struct drm_connector * nouveau_connector_create(struct drm_device *, int index); @@ -972,9 +1018,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_connector.h linux-2. int nouveau_connector_bpp(struct drm_connector *); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_display.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_display.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c 2010-11-17 02:20:11.000000000 +0100 @@ -29,6 +29,9 @@ #include "nouveau_drv.h" #include "nouveau_fb.h" @@ -1193,9 +1239,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6. + spin_unlock_irqrestore(&dev->event_lock, flags); + return 0; +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-11-17 02:20:11.000000000 +0100 @@ -279,7 +279,7 @@ struct bit_displayport_encoder_table *dpe; int dpe_headerlen; @@ -1223,9 +1269,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.37-rc return eq_done; } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_drv.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-11-17 02:20:11.000000000 +0100 @@ -115,6 +115,10 @@ int nouveau_perflvl_wr; module_param_named(perflvl_wr, nouveau_perflvl_wr, int, 0400); @@ -1341,9 +1387,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.c linux-2.6.37-r nouveau_register_dsm_handler(); return drm_init(&driver); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-11-17 02:20:11.000000000 +0100 @@ -54,6 +54,7 @@ #include "nouveau_drm.h" #include "nouveau_reg.h" @@ -1482,11 +1528,12 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r void (*flush)(struct drm_device *); }; -@@ -276,12 +310,16 @@ +@@ -276,12 +310,17 @@ struct nouveau_fb_engine { int num_tiles; + struct drm_mm tag_heap; ++ void *priv; int (*init)(struct drm_device *dev); void (*takedown)(struct drm_device *dev); @@ -1501,7 +1548,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r }; struct nouveau_fifo_engine { -@@ -304,23 +342,12 @@ +@@ -304,23 +343,12 @@ void (*destroy_context)(struct nouveau_channel *); int (*load_context)(struct nouveau_channel *); int (*unload_context)(struct drm_device *); @@ -1527,7 +1574,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r int grctx_size; /* NV2x/NV3x context table (0x400780) */ -@@ -336,9 +363,9 @@ +@@ -336,9 +364,9 @@ void (*destroy_context)(struct nouveau_channel *); int (*load_context)(struct nouveau_channel *); int (*unload_context)(struct drm_device *); @@ -1539,7 +1586,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r }; struct nouveau_display_engine { -@@ -350,13 +377,19 @@ +@@ -350,13 +378,19 @@ }; struct nouveau_gpio_engine { @@ -1560,7 +1607,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r }; struct nouveau_pm_voltage_level { -@@ -432,6 +465,7 @@ +@@ -432,6 +466,7 @@ struct nouveau_pm_level *cur; struct device *hwmon; @@ -1568,7 +1615,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r int (*clock_get)(struct drm_device *, u32 id); void *(*clock_pre)(struct drm_device *, struct nouveau_pm_level *, -@@ -444,6 +478,16 @@ +@@ -444,6 +479,16 @@ int (*temp_get)(struct drm_device *); }; @@ -1585,7 +1632,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r struct nouveau_engine { struct nouveau_instmem_engine instmem; struct nouveau_mc_engine mc; -@@ -454,6 +498,7 @@ +@@ -454,6 +499,7 @@ struct nouveau_display_engine display; struct nouveau_gpio_engine gpio; struct nouveau_pm_engine pm; @@ -1593,7 +1640,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r }; struct nouveau_pll_vals { -@@ -485,13 +530,13 @@ +@@ -485,13 +531,13 @@ }; struct nv04_crtc_reg { @@ -1609,7 +1656,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* PCRTC regs */ uint32_t fb_start; -@@ -539,43 +584,9 @@ +@@ -539,43 +585,9 @@ }; struct nv04_mode_state { @@ -1654,7 +1701,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r }; enum nouveau_card_type { -@@ -606,12 +617,15 @@ +@@ -606,12 +618,15 @@ bool ramin_available; struct drm_mm ramin_heap; struct list_head gpuobj_list; @@ -1671,7 +1718,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r struct list_head vbl_waiting; -@@ -628,8 +642,10 @@ +@@ -628,8 +643,10 @@ struct nouveau_bo *bo; } fence; @@ -1684,7 +1731,12 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r struct nouveau_engine engine; struct nouveau_channel *channel; -@@ -660,7 +676,10 @@ +@@ -655,12 +672,13 @@ + uint64_t aper_free; + + struct nouveau_gpuobj *sg_ctxdma; +- struct page *sg_dummy_page; +- dma_addr_t sg_dummy_bus; } gart_info; /* nv10-nv40 tiling regions */ @@ -1696,7 +1748,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* VRAM/fb configuration */ uint64_t vram_size; -@@ -697,6 +716,7 @@ +@@ -697,6 +715,7 @@ struct backlight_device *backlight; struct nouveau_channel *evo; @@ -1704,7 +1756,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r struct { struct dcb_entry *dcb; u16 script; -@@ -742,16 +762,6 @@ +@@ -742,16 +761,6 @@ return 0; } @@ -1721,7 +1773,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* nouveau_drv.c */ extern int nouveau_agpmode; extern int nouveau_duallink; -@@ -771,6 +781,7 @@ +@@ -771,6 +780,7 @@ extern int nouveau_override_conntype; extern char *nouveau_perflvl; extern int nouveau_perflvl_wr; @@ -1729,7 +1781,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); extern int nouveau_pci_resume(struct pci_dev *pdev); -@@ -798,13 +809,12 @@ +@@ -798,13 +808,12 @@ extern int nouveau_mem_init_agp(struct drm_device *); extern int nouveau_mem_reset_agp(struct drm_device *); extern void nouveau_mem_close(struct drm_device *); @@ -1749,7 +1801,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nv50_mem_vm_bind_linear(struct drm_device *, uint64_t virt, uint32_t size, uint32_t flags, uint64_t phys); -@@ -826,21 +836,43 @@ +@@ -826,21 +835,43 @@ extern struct drm_ioctl_desc nouveau_ioctls[]; extern int nouveau_max_ioctl; extern void nouveau_channel_cleanup(struct drm_device *, struct drm_file *); @@ -1797,12 +1849,24 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nouveau_gpuobj_channel_init(struct nouveau_channel *, uint32_t vram_h, uint32_t tt_h); extern void nouveau_gpuobj_channel_takedown(struct nouveau_channel *); -@@ -861,15 +893,18 @@ - uint32_t *o_ret); +@@ -855,21 +886,26 @@ + extern int nouveau_gpuobj_dma_new(struct nouveau_channel *, int class, + uint64_t offset, uint64_t size, int access, + int target, struct nouveau_gpuobj **); +-extern int nouveau_gpuobj_gart_dma_new(struct nouveau_channel *, +- uint64_t offset, uint64_t size, +- int access, struct nouveau_gpuobj **, +- uint32_t *o_ret); extern int nouveau_gpuobj_gr_new(struct nouveau_channel *, int class, struct nouveau_gpuobj **); -extern int nouveau_gpuobj_sw_new(struct nouveau_channel *, int class, - struct nouveau_gpuobj **); ++extern int nv50_gpuobj_dma_new(struct nouveau_channel *, int class, u64 base, ++ u64 size, int target, int access, u32 type, ++ u32 comp, struct nouveau_gpuobj **pobj); ++extern void nv50_gpuobj_dma_init(struct nouveau_gpuobj *, u32 offset, ++ int class, u64 base, u64 size, int target, ++ int access, u32 type, u32 comp); extern int nouveau_ioctl_grobj_alloc(struct drm_device *, void *data, struct drm_file *); extern int nouveau_ioctl_gpuobj_free(struct drm_device *, void *data, @@ -1818,7 +1882,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern void nouveau_irq_preinstall(struct drm_device *); extern int nouveau_irq_postinstall(struct drm_device *); extern void nouveau_irq_uninstall(struct drm_device *); -@@ -989,18 +1024,25 @@ +@@ -989,18 +1025,25 @@ /* nv10_fb.c */ extern int nv10_fb_init(struct drm_device *); extern void nv10_fb_takedown(struct drm_device *); @@ -1848,7 +1912,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* nv50_fb.c */ extern int nv50_fb_init(struct drm_device *); extern void nv50_fb_takedown(struct drm_device *); -@@ -1012,6 +1054,7 @@ +@@ -1012,6 +1055,7 @@ /* nv04_fifo.c */ extern int nv04_fifo_init(struct drm_device *); @@ -1856,7 +1920,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern void nv04_fifo_disable(struct drm_device *); extern void nv04_fifo_enable(struct drm_device *); extern bool nv04_fifo_reassign(struct drm_device *, bool); -@@ -1021,19 +1064,18 @@ +@@ -1021,19 +1065,18 @@ extern void nv04_fifo_destroy_context(struct nouveau_channel *); extern int nv04_fifo_load_context(struct nouveau_channel *); extern int nv04_fifo_unload_context(struct drm_device *); @@ -1877,7 +1941,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nv40_fifo_load_context(struct nouveau_channel *); extern int nv40_fifo_unload_context(struct drm_device *); -@@ -1045,6 +1087,7 @@ +@@ -1045,6 +1088,7 @@ extern void nv50_fifo_destroy_context(struct nouveau_channel *); extern int nv50_fifo_load_context(struct nouveau_channel *); extern int nv50_fifo_unload_context(struct drm_device *); @@ -1885,7 +1949,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* nvc0_fifo.c */ extern int nvc0_fifo_init(struct drm_device *); -@@ -1060,7 +1103,6 @@ +@@ -1060,7 +1104,6 @@ extern int nvc0_fifo_unload_context(struct drm_device *); /* nv04_graph.c */ @@ -1893,7 +1957,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nv04_graph_init(struct drm_device *); extern void nv04_graph_takedown(struct drm_device *); extern void nv04_graph_fifo_access(struct drm_device *, bool); -@@ -1069,10 +1111,11 @@ +@@ -1069,10 +1112,11 @@ extern void nv04_graph_destroy_context(struct nouveau_channel *); extern int nv04_graph_load_context(struct nouveau_channel *); extern int nv04_graph_unload_context(struct drm_device *); @@ -1907,7 +1971,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nv10_graph_init(struct drm_device *); extern void nv10_graph_takedown(struct drm_device *); extern struct nouveau_channel *nv10_graph_channel(struct drm_device *); -@@ -1080,13 +1123,11 @@ +@@ -1080,13 +1124,11 @@ extern void nv10_graph_destroy_context(struct nouveau_channel *); extern int nv10_graph_load_context(struct nouveau_channel *); extern int nv10_graph_unload_context(struct drm_device *); @@ -1924,7 +1988,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nv20_graph_create_context(struct nouveau_channel *); extern void nv20_graph_destroy_context(struct nouveau_channel *); extern int nv20_graph_load_context(struct nouveau_channel *); -@@ -1094,11 +1135,9 @@ +@@ -1094,11 +1136,9 @@ extern int nv20_graph_init(struct drm_device *); extern void nv20_graph_takedown(struct drm_device *); extern int nv30_graph_init(struct drm_device *); @@ -1937,7 +2001,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nv40_graph_init(struct drm_device *); extern void nv40_graph_takedown(struct drm_device *); extern struct nouveau_channel *nv40_graph_channel(struct drm_device *); -@@ -1107,11 +1146,9 @@ +@@ -1107,11 +1147,9 @@ extern int nv40_graph_load_context(struct nouveau_channel *); extern int nv40_graph_unload_context(struct drm_device *); extern void nv40_grctx_init(struct nouveau_grctx *); @@ -1950,7 +2014,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern int nv50_graph_init(struct drm_device *); extern void nv50_graph_takedown(struct drm_device *); extern void nv50_graph_fifo_access(struct drm_device *, bool); -@@ -1120,8 +1157,9 @@ +@@ -1120,8 +1158,9 @@ extern void nv50_graph_destroy_context(struct nouveau_channel *); extern int nv50_graph_load_context(struct nouveau_channel *); extern int nv50_graph_unload_context(struct drm_device *); @@ -1961,7 +2025,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* nvc0_graph.c */ extern int nvc0_graph_init(struct drm_device *); -@@ -1133,16 +1171,22 @@ +@@ -1133,16 +1172,22 @@ extern int nvc0_graph_load_context(struct nouveau_channel *); extern int nvc0_graph_unload_context(struct drm_device *); @@ -1989,7 +2053,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern void nv04_instmem_flush(struct drm_device *); /* nv50_instmem.c */ -@@ -1150,11 +1194,10 @@ +@@ -1150,11 +1195,10 @@ extern void nv50_instmem_takedown(struct drm_device *); extern int nv50_instmem_suspend(struct drm_device *); extern void nv50_instmem_resume(struct drm_device *); @@ -2005,7 +2069,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern void nv50_instmem_flush(struct drm_device *); extern void nv84_instmem_flush(struct drm_device *); extern void nv50_vm_flush(struct drm_device *, int engine); -@@ -1164,11 +1207,10 @@ +@@ -1164,11 +1208,10 @@ extern void nvc0_instmem_takedown(struct drm_device *); extern int nvc0_instmem_suspend(struct drm_device *); extern void nvc0_instmem_resume(struct drm_device *); @@ -2021,7 +2085,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r extern void nvc0_instmem_flush(struct drm_device *); /* nv04_mc.c */ -@@ -1239,7 +1281,7 @@ +@@ -1239,7 +1282,7 @@ extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val); extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index); extern void nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val); @@ -2030,7 +2094,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* nouveau_fence.c */ struct nouveau_fence; -@@ -1255,12 +1297,35 @@ +@@ -1255,12 +1298,35 @@ void (*work)(void *priv, bool signalled), void *priv); struct nouveau_channel *nouveau_fence_channel(struct nouveau_fence *); @@ -2071,7 +2135,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* nouveau_gem.c */ extern int nouveau_gem_new(struct drm_device *, struct nouveau_channel *, -@@ -1280,15 +1345,28 @@ +@@ -1280,15 +1346,28 @@ extern int nouveau_gem_ioctl_info(struct drm_device *, void *, struct drm_file *); @@ -2101,16 +2165,39 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-r /* nv50_calc. */ int nv50_calc_pll(struct drm_device *, struct pll_lims *, int clk, -@@ -1478,5 +1556,6 @@ +@@ -1468,6 +1547,22 @@ + dev->pdev->subsystem_device == sub_device; + } + ++/* memory type/access flags, do not match hardware values */ ++#define NV_MEM_ACCESS_RO 1 ++#define NV_MEM_ACCESS_WO 2 ++#define NV_MEM_ACCESS_RW (NV_MEM_ACCESS_RO | NV_MEM_ACCESS_WO) ++#define NV_MEM_ACCESS_VM 4 ++ ++#define NV_MEM_TARGET_VRAM 0 ++#define NV_MEM_TARGET_PCI 1 ++#define NV_MEM_TARGET_PCI_NOSNOOP 2 ++#define NV_MEM_TARGET_VM 3 ++#define NV_MEM_TARGET_GART 4 ++ ++#define NV_MEM_TYPE_VM 0x7f ++#define NV_MEM_COMP_VM 0x03 ++ ++/* NV_SW object class */ + #define NV_SW 0x0000506e + #define NV_SW_DMA_SEMAPHORE 0x00000060 + #define NV_SW_SEMAPHORE_OFFSET 0x00000064 +@@ -1478,5 +1573,6 @@ #define NV_SW_VBLSEM_OFFSET 0x00000400 #define NV_SW_VBLSEM_RELEASE_VALUE 0x00000404 #define NV_SW_VBLSEM_RELEASE 0x00000408 +#define NV_SW_PAGE_FLIP 0x00000500 #endif /* __NOUVEAU_DRV_H__ */ -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-11-17 02:20:11.000000000 +0100 @@ -49,6 +49,96 @@ #include "nouveau_fbcon.h" #include "nouveau_dma.h" @@ -2331,9 +2418,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.37 vga_switcheroo_client_fb_set(dev->pdev, info); return 0; -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fbcon.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_fbcon.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-11-17 02:20:11.000000000 +0100 @@ -40,13 +40,13 @@ void nouveau_fbcon_restore(void); @@ -2354,9 +2441,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fbcon.h linux-2.6.37 int nv50_fbcon_accel_init(struct fb_info *info); void nouveau_fbcon_gpu_lockup(struct fb_info *info); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-11-17 02:20:11.000000000 +0100 @@ -64,6 +64,7 @@ struct nouveau_fence *fence = container_of(ref, struct nouveau_fence, refcount); @@ -2533,6 +2620,17 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.37 if (ret) return ret; +@@ -437,8 +459,8 @@ + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + mem->start << PAGE_SHIFT, + mem->size << PAGE_SHIFT, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_VIDMEM, &obj); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VRAM, &obj); + if (ret) + return ret; + @@ -468,6 +490,8 @@ { struct nouveau_fence *tmp, *fence; @@ -2551,9 +2649,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.37 } int -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-11-17 02:20:11.000000000 +0100 @@ -48,9 +48,6 @@ return; nvbo->gem = NULL; @@ -2888,9 +2986,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.37-r } int -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_hw.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_hw.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-11-17 02:20:11.000000000 +0100 @@ -519,11 +519,11 @@ struct pll_lims pll_lim; @@ -2936,9 +3034,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_hw.c linux-2.6.37-rc NVWriteCRTC(dev, head, NV_PCRTC_INTR_0, NV_PCRTC_INTR_0_VBLANK); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_hw.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_hw.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-11-17 02:20:11.000000000 +0100 @@ -416,6 +416,25 @@ } @@ -2965,9 +3063,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_hw.h linux-2.6.37-rc nv_show_cursor(struct drm_device *dev, int head, bool show) { struct drm_nouveau_private *dev_priv = dev->dev_private; -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_i2c.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_i2c.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-11-17 02:20:11.000000000 +0100 @@ -256,7 +256,7 @@ if (index >= DCB_MAX_NUM_I2C_ENTRIES) return NULL; @@ -2977,9 +3075,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_i2c.c linux-2.6.37-r uint32_t reg = 0xe500, val; if (i2c->port_type == 6) { -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_irq.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_irq.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-11-17 02:20:11.000000000 +0100 @@ -36,11 +36,7 @@ #include "nouveau_drv.h" #include "nouveau_reg.h" @@ -4246,9 +4344,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_irq.c linux-2.6.37-r - - return IRQ_HANDLED; } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-11-17 02:20:11.000000000 +0100 @@ -33,92 +33,113 @@ #include "drmP.h" #include "drm.h" @@ -4505,10 +4603,56 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.37-r NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", i, timing->reg_100220, timing->reg_100224, timing->reg_100228, timing->reg_10022c); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-11-12 06:18:06.000000000 +0100 -@@ -185,11 +185,11 @@ +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-11-17 02:20:11.000000000 +0100 +@@ -99,7 +99,6 @@ + int size, uint32_t *b_offset) + { + struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_gpuobj *nobj = NULL; + struct drm_mm_node *mem; + uint32_t offset; +@@ -113,31 +112,15 @@ + return -ENOMEM; + } + +- offset = chan->notifier_bo->bo.mem.start << PAGE_SHIFT; +- if (chan->notifier_bo->bo.mem.mem_type == TTM_PL_VRAM) { +- target = NV_DMA_TARGET_VIDMEM; +- } else +- if (chan->notifier_bo->bo.mem.mem_type == TTM_PL_TT) { +- if (dev_priv->gart_info.type == NOUVEAU_GART_SGDMA && +- dev_priv->card_type < NV_50) { +- ret = nouveau_sgdma_get_page(dev, offset, &offset); +- if (ret) +- return ret; +- target = NV_DMA_TARGET_PCI; +- } else { +- target = NV_DMA_TARGET_AGP; +- if (dev_priv->card_type >= NV_50) +- offset += dev_priv->vm_gart_base; +- } +- } else { +- NV_ERROR(dev, "Bad DMA target, mem_type %d!\n", +- chan->notifier_bo->bo.mem.mem_type); +- return -EINVAL; +- } ++ if (chan->notifier_bo->bo.mem.mem_type == TTM_PL_VRAM) ++ target = NV_MEM_TARGET_VRAM; ++ else ++ target = NV_MEM_TARGET_GART; ++ offset = chan->notifier_bo->bo.mem.start << PAGE_SHIFT; + offset += mem->start; + + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, offset, +- mem->size, NV_DMA_ACCESS_RW, target, ++ mem->size, NV_MEM_ACCESS_RW, target, + &nobj); + if (ret) { + drm_mm_put_block(mem); +@@ -185,11 +168,11 @@ struct nouveau_channel *chan; int ret; @@ -4525,9 +4669,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6 + nouveau_channel_put(&chan); + return ret; } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_object.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2010-11-17 02:20:11.000000000 +0100 @@ -36,6 +36,101 @@ #include "nouveau_drm.h" #include "nouveau_ramht.h" @@ -4666,7 +4810,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 } - } else { - NV_DEBUG(dev, "global heap\n"); -- + - /* allocate backing pages, sets vinst */ - ret = engine->instmem.populate(dev, gpuobj, &size); - if (ret) { @@ -4678,7 +4822,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 - do { - if (drm_mm_pre_get(&dev_priv->ramin_heap)) - return -ENOMEM; - +- - spin_lock(&dev_priv->ramin_lock); - ramin = drm_mm_search_free(&dev_priv->ramin_heap, size, - align, 0); @@ -4719,13 +4863,13 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 return ret; } - } - +- - /* calculate the various different addresses for the object */ - if (chan) { - gpuobj->pinst = chan->ramin->pinst; - if (gpuobj->pinst != ~0) - gpuobj->pinst += gpuobj->im_pramin->start; -- + - if (dev_priv->card_type < NV_50) { - gpuobj->cinst = gpuobj->pinst; - } else { @@ -4841,7 +4985,249 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 gpuobj->vinst = vinst; if (gpuobj->flags & NVOBJ_FLAG_ZERO_ALLOC) { -@@ -495,23 +563,86 @@ +@@ -335,113 +403,157 @@ + The method below creates a DMA object in instance RAM and returns a handle + to it that can be used to set up context objects. + */ +-int +-nouveau_gpuobj_dma_new(struct nouveau_channel *chan, int class, +- uint64_t offset, uint64_t size, int access, +- int target, struct nouveau_gpuobj **gpuobj) +-{ +- struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; +- int ret; + +- NV_DEBUG(dev, "ch%d class=0x%04x offset=0x%llx size=0x%llx\n", +- chan->id, class, offset, size); +- NV_DEBUG(dev, "access=%d target=%d\n", access, target); ++void ++nv50_gpuobj_dma_init(struct nouveau_gpuobj *obj, u32 offset, int class, ++ u64 base, u64 size, int target, int access, ++ u32 type, u32 comp) ++{ ++ struct drm_nouveau_private *dev_priv = obj->dev->dev_private; ++ struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem; ++ u32 flags0; ++ ++ flags0 = (comp << 29) | (type << 22) | class; ++ flags0 |= 0x00100000; ++ ++ switch (access) { ++ case NV_MEM_ACCESS_RO: flags0 |= 0x00040000; break; ++ case NV_MEM_ACCESS_RW: ++ case NV_MEM_ACCESS_WO: flags0 |= 0x00080000; break; ++ default: ++ break; ++ } + + switch (target) { +- case NV_DMA_TARGET_AGP: +- offset += dev_priv->gart_info.aper_base; ++ case NV_MEM_TARGET_VRAM: ++ flags0 |= 0x00010000; ++ break; ++ case NV_MEM_TARGET_PCI: ++ flags0 |= 0x00020000; ++ break; ++ case NV_MEM_TARGET_PCI_NOSNOOP: ++ flags0 |= 0x00030000; + break; ++ case NV_MEM_TARGET_GART: ++ base += dev_priv->vm_gart_base; + default: ++ flags0 &= ~0x00100000; + break; + } + +- ret = nouveau_gpuobj_new(dev, chan, +- nouveau_gpuobj_class_instmem_size(dev, class), +- 16, NVOBJ_FLAG_ZERO_ALLOC | +- NVOBJ_FLAG_ZERO_FREE, gpuobj); +- if (ret) { +- NV_ERROR(dev, "Error creating gpuobj: %d\n", ret); +- return ret; +- } +- +- if (dev_priv->card_type < NV_50) { +- uint32_t frame, adjust, pte_flags = 0; ++ /* convert to base + limit */ ++ size = (base + size) - 1; + +- if (access != NV_DMA_ACCESS_RO) +- pte_flags |= (1<<1); +- adjust = offset & 0x00000fff; +- frame = offset & ~0x00000fff; +- +- nv_wo32(*gpuobj, 0, ((1<<12) | (1<<13) | (adjust << 20) | +- (access << 14) | (target << 16) | +- class)); +- nv_wo32(*gpuobj, 4, size - 1); +- nv_wo32(*gpuobj, 8, frame | pte_flags); +- nv_wo32(*gpuobj, 12, frame | pte_flags); +- } else { +- uint64_t limit = offset + size - 1; +- uint32_t flags0, flags5; ++ nv_wo32(obj, offset + 0x00, flags0); ++ nv_wo32(obj, offset + 0x04, lower_32_bits(size)); ++ nv_wo32(obj, offset + 0x08, lower_32_bits(base)); ++ nv_wo32(obj, offset + 0x0c, upper_32_bits(size) << 24 | ++ upper_32_bits(base)); ++ nv_wo32(obj, offset + 0x10, 0x00000000); ++ nv_wo32(obj, offset + 0x14, 0x00000000); + +- if (target == NV_DMA_TARGET_VIDMEM) { +- flags0 = 0x00190000; +- flags5 = 0x00010000; +- } else { +- flags0 = 0x7fc00000; +- flags5 = 0x00080000; +- } ++ pinstmem->flush(obj->dev); ++} + +- nv_wo32(*gpuobj, 0, flags0 | class); +- nv_wo32(*gpuobj, 4, lower_32_bits(limit)); +- nv_wo32(*gpuobj, 8, lower_32_bits(offset)); +- nv_wo32(*gpuobj, 12, ((upper_32_bits(limit) & 0xff) << 24) | +- (upper_32_bits(offset) & 0xff)); +- nv_wo32(*gpuobj, 20, flags5); +- } ++int ++nv50_gpuobj_dma_new(struct nouveau_channel *chan, int class, u64 base, u64 size, ++ int target, int access, u32 type, u32 comp, ++ struct nouveau_gpuobj **pobj) ++{ ++ struct drm_device *dev = chan->dev; ++ int ret; + +- instmem->flush(dev); ++ ret = nouveau_gpuobj_new(dev, chan, 24, 16, NVOBJ_FLAG_ZERO_ALLOC | ++ NVOBJ_FLAG_ZERO_FREE, pobj); ++ if (ret) ++ return ret; + +- (*gpuobj)->engine = NVOBJ_ENGINE_SW; +- (*gpuobj)->class = class; ++ nv50_gpuobj_dma_init(*pobj, 0, class, base, size, target, ++ access, type, comp); + return 0; + } + + int +-nouveau_gpuobj_gart_dma_new(struct nouveau_channel *chan, +- uint64_t offset, uint64_t size, int access, +- struct nouveau_gpuobj **gpuobj, +- uint32_t *o_ret) ++nouveau_gpuobj_dma_new(struct nouveau_channel *chan, int class, u64 base, ++ u64 size, int access, int target, ++ struct nouveau_gpuobj **pobj) + { ++ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj *obj; ++ u32 page_addr, flags0, flags2; + int ret; + +- if (dev_priv->gart_info.type == NOUVEAU_GART_AGP || +- (dev_priv->card_type >= NV_50 && +- dev_priv->gart_info.type == NOUVEAU_GART_SGDMA)) { +- ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, +- offset + dev_priv->vm_gart_base, +- size, access, NV_DMA_TARGET_AGP, +- gpuobj); +- if (o_ret) +- *o_ret = 0; +- } else +- if (dev_priv->gart_info.type == NOUVEAU_GART_SGDMA) { +- nouveau_gpuobj_ref(dev_priv->gart_info.sg_ctxdma, gpuobj); +- if (offset & ~0xffffffffULL) { +- NV_ERROR(dev, "obj offset exceeds 32-bits\n"); +- return -EINVAL; +- } +- if (o_ret) +- *o_ret = (uint32_t)offset; +- ret = (*gpuobj != NULL) ? 0 : -EINVAL; +- } else { +- NV_ERROR(dev, "Invalid GART type %d\n", dev_priv->gart_info.type); +- return -EINVAL; ++ if (dev_priv->card_type >= NV_50) { ++ u32 comp = (target == NV_MEM_TARGET_VM) ? NV_MEM_COMP_VM : 0; ++ u32 type = (target == NV_MEM_TARGET_VM) ? NV_MEM_TYPE_VM : 0; ++ ++ return nv50_gpuobj_dma_new(chan, class, base, size, ++ target, access, type, comp, pobj); + } + +- return ret; ++ if (target == NV_MEM_TARGET_GART) { ++ if (dev_priv->gart_info.type == NOUVEAU_GART_AGP) { ++ target = NV_MEM_TARGET_PCI_NOSNOOP; ++ base += dev_priv->gart_info.aper_base; ++ } else ++ if (base != 0) { ++ ret = nouveau_sgdma_get_page(dev, base, &page_addr); ++ if (ret) ++ return ret; ++ ++ target = NV_MEM_TARGET_PCI; ++ base = page_addr; ++ } else { ++ nouveau_gpuobj_ref(dev_priv->gart_info.sg_ctxdma, pobj); ++ return 0; ++ } ++ } ++ ++ flags0 = class; ++ flags0 |= 0x00003000; /* PT present, PT linear */ ++ flags2 = 0; ++ ++ switch (target) { ++ case NV_MEM_TARGET_PCI: ++ flags0 |= 0x00020000; ++ break; ++ case NV_MEM_TARGET_PCI_NOSNOOP: ++ flags0 |= 0x00030000; ++ break; ++ default: ++ break; ++ } ++ ++ switch (access) { ++ case NV_MEM_ACCESS_RO: ++ flags0 |= 0x00004000; ++ break; ++ case NV_MEM_ACCESS_WO: ++ flags0 |= 0x00008000; ++ default: ++ flags2 |= 0x00000002; ++ break; ++ } ++ ++ flags0 |= (base & 0x00000fff) << 20; ++ flags2 |= (base & 0xfffff000); ++ ++ ret = nouveau_gpuobj_new(dev, chan, (dev_priv->card_type >= NV_40) ? ++ 32 : 16, 16, NVOBJ_FLAG_ZERO_ALLOC | ++ NVOBJ_FLAG_ZERO_FREE, &obj); ++ if (ret) ++ return ret; ++ ++ nv_wo32(obj, 0x00, flags0); ++ nv_wo32(obj, 0x04, size - 1); ++ nv_wo32(obj, 0x08, flags2); ++ nv_wo32(obj, 0x0c, flags2); ++ ++ obj->engine = NVOBJ_ENGINE_SW; ++ obj->class = class; ++ *pobj = obj; ++ return 0; + } + + /* Context objects in the instance RAM have the following structure. +@@ -495,23 +607,86 @@ entry[5]: set to 0? */ @@ -4930,7 +5316,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 return ret; } -@@ -541,35 +672,8 @@ +@@ -541,35 +716,8 @@ } dev_priv->engine.instmem.flush(dev); @@ -4968,7 +5354,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 return 0; } -@@ -585,7 +689,7 @@ +@@ -585,7 +733,7 @@ NV_DEBUG(dev, "ch%d\n", chan->id); /* Base amount for object storage (4KiB enough?) */ @@ -4977,7 +5363,56 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 base = 0; /* PGRAPH context */ -@@ -791,119 +895,69 @@ +@@ -701,8 +849,8 @@ + if (dev_priv->card_type >= NV_50) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->vm_end, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_AGP, &vram); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VM, &vram); + if (ret) { + NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); + return ret; +@@ -710,8 +858,8 @@ + } else { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->fb_available_size, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_VIDMEM, &vram); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VRAM, &vram); + if (ret) { + NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); + return ret; +@@ -729,20 +877,13 @@ + if (dev_priv->card_type >= NV_50) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->vm_end, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_AGP, &tt); +- if (ret) { +- NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); +- return ret; +- } +- } else +- if (dev_priv->gart_info.type != NOUVEAU_GART_NONE) { +- ret = nouveau_gpuobj_gart_dma_new(chan, 0, +- dev_priv->gart_info.aper_size, +- NV_DMA_ACCESS_RW, &tt, NULL); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VM, &tt); + } else { +- NV_ERROR(dev, "Invalid GART type %d\n", dev_priv->gart_info.type); +- ret = -EINVAL; ++ ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, ++ 0, dev_priv->gart_info.aper_size, ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_GART, &tt); + } + + if (ret) { +@@ -791,119 +932,69 @@ struct nouveau_gpuobj *gpuobj; int i; @@ -5115,7 +5550,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 } ret = nouveau_ramht_insert(chan, init->handle, gr); -@@ -911,27 +965,27 @@ +@@ -911,27 +1002,27 @@ if (ret) { NV_ERROR(dev, "Error referencing object: %d (%d/0x%08x)\n", ret, init->channel, init->handle); @@ -5153,9 +5588,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.3 } u32 -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_pm.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_pm.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-11-17 02:20:11.000000000 +0100 @@ -27,6 +27,10 @@ #include "nouveau_drv.h" #include "nouveau_pm.h" @@ -5253,9 +5688,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_pm.c linux-2.6.37-rc nouveau_hwmon_fini(dev); nouveau_sysfs_fini(dev); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-11-17 02:20:11.000000000 +0100 @@ -114,7 +114,7 @@ (gpuobj->engine << NV40_RAMHT_CONTEXT_ENGINE_SHIFT); } else { @@ -5388,9 +5823,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.37 kref_put(&ramht->refcount, nouveau_ramht_del); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_ramht.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_ramht.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-11-17 02:20:11.000000000 +0100 @@ -48,7 +48,7 @@ extern int nouveau_ramht_insert(struct nouveau_channel *, u32 handle, @@ -5400,9 +5835,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_ramht.h linux-2.6.37 extern struct nouveau_gpuobj * nouveau_ramht_find(struct nouveau_channel *chan, u32 handle); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-11-17 02:20:11.000000000 +0100 @@ -45,6 +45,11 @@ # define NV04_PFB_REF_CMD_REFRESH (1 << 0) #define NV04_PFB_PRE 0x001002d4 @@ -5415,7 +5850,25 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-r #define NV10_PFB_CLOSE_PAGE2 0x0010033c #define NV04_PFB_SCRAMBLE(i) (0x00100400 + 4 * (i)) #define NV40_PFB_TILE(i) (0x00100600 + (i*16)) -@@ -332,6 +337,7 @@ +@@ -74,17 +79,6 @@ + # define NV40_RAMHT_CONTEXT_ENGINE_SHIFT 20 + # define NV40_RAMHT_CONTEXT_INSTANCE_SHIFT 0 + +-/* DMA object defines */ +-#define NV_DMA_ACCESS_RW 0 +-#define NV_DMA_ACCESS_RO 1 +-#define NV_DMA_ACCESS_WO 2 +-#define NV_DMA_TARGET_VIDMEM 0 +-#define NV_DMA_TARGET_PCI 2 +-#define NV_DMA_TARGET_AGP 3 +-/* The following is not a real value used by the card, it's changed by +- * nouveau_object_dma_create */ +-#define NV_DMA_TARGET_PCI_NONLINEAR 8 +- + /* Some object classes we care about in the drm */ + #define NV_CLASS_DMA_FROM_MEMORY 0x00000002 + #define NV_CLASS_DMA_TO_MEMORY 0x00000003 +@@ -332,6 +326,7 @@ #define NV04_PGRAPH_BSWIZZLE5 0x004006A0 #define NV03_PGRAPH_STATUS 0x004006B0 #define NV04_PGRAPH_STATUS 0x00400700 @@ -5423,7 +5876,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-r #define NV04_PGRAPH_TRAPPED_ADDR 0x00400704 #define NV04_PGRAPH_TRAPPED_DATA 0x00400708 #define NV04_PGRAPH_SURFACE 0x0040070C -@@ -378,6 +384,7 @@ +@@ -378,6 +373,7 @@ #define NV20_PGRAPH_TLIMIT(i) (0x00400904 + (i*16)) #define NV20_PGRAPH_TSIZE(i) (0x00400908 + (i*16)) #define NV20_PGRAPH_TSTATUS(i) (0x0040090C + (i*16)) @@ -5431,7 +5884,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-r #define NV10_PGRAPH_TILE(i) (0x00400B00 + (i*16)) #define NV10_PGRAPH_TLIMIT(i) (0x00400B04 + (i*16)) #define NV10_PGRAPH_TSIZE(i) (0x00400B08 + (i*16)) -@@ -714,31 +721,32 @@ +@@ -714,31 +710,32 @@ #define NV50_PDISPLAY_INTR_1_CLK_UNK10 0x00000010 #define NV50_PDISPLAY_INTR_1_CLK_UNK20 0x00000020 #define NV50_PDISPLAY_INTR_1_CLK_UNK40 0x00000040 @@ -5485,7 +5938,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-r #define NV50_PDISPLAY_CURSOR 0x00610270 #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i) ((i) * 0x10 + 0x00610270) -@@ -746,15 +754,11 @@ +@@ -746,15 +743,11 @@ #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS 0x00030000 #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE 0x00010000 @@ -5506,9 +5959,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-r #define NV50_PDISPLAY_CRTC_P(i, r) ((i) * 0x540 + NV50_PDISPLAY_CRTC_##r) #define NV50_PDISPLAY_CRTC_C(i, r) (4 + (i) * 0x540 + NV50_PDISPLAY_CRTC_##r) -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-11-17 02:20:11.000000000 +0100 @@ -120,8 +120,8 @@ dev_priv->engine.instmem.flush(nvbe->dev); @@ -5520,7 +5973,26 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.37 } nvbe->bound = true; -@@ -162,8 +162,8 @@ +@@ -144,26 +144,22 @@ + + pte = nvbe->pte_start; + for (i = 0; i < nvbe->nr_pages; i++) { +- dma_addr_t dma_offset = dev_priv->gart_info.sg_dummy_bus; +- + for (j = 0; j < PAGE_SIZE / NV_CTXDMA_PAGE_SIZE; j++) { + if (dev_priv->card_type < NV_50) { +- nv_wo32(gpuobj, (pte * 4) + 0, dma_offset | 3); ++ nv_wo32(gpuobj, (pte * 4) + 0, 0x00000000); + pte += 1; + } else { + nv_wo32(gpuobj, (pte * 4) + 0, 0x00000000); + nv_wo32(gpuobj, (pte * 4) + 4, 0x00000000); + pte += 2; + } +- +- dma_offset += NV_CTXDMA_PAGE_SIZE; + } + } dev_priv->engine.instmem.flush(nvbe->dev); if (dev_priv->card_type == NV_50) { @@ -5531,7 +6003,13 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.37 } nvbe->bound = false; -@@ -224,7 +224,11 @@ +@@ -218,13 +214,16 @@ + nouveau_sgdma_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct pci_dev *pdev = dev->pdev; + struct nouveau_gpuobj *gpuobj = NULL; + uint32_t aper_size, obj_size; int i, ret; if (dev_priv->card_type < NV_50) { @@ -5544,9 +6022,72 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.37 obj_size = (aper_size >> NV_CTXDMA_PAGE_SHIFT) * 4; obj_size += 8; /* ctxdma header */ } else { -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-12 06:18:06.000000000 +0100 +@@ -241,22 +240,6 @@ + return ret; + } + +- dev_priv->gart_info.sg_dummy_page = +- alloc_page(GFP_KERNEL|__GFP_DMA32|__GFP_ZERO); +- if (!dev_priv->gart_info.sg_dummy_page) { +- nouveau_gpuobj_ref(NULL, &gpuobj); +- return -ENOMEM; +- } +- +- set_bit(PG_locked, &dev_priv->gart_info.sg_dummy_page->flags); +- dev_priv->gart_info.sg_dummy_bus = +- pci_map_page(pdev, dev_priv->gart_info.sg_dummy_page, 0, +- PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); +- if (pci_dma_mapping_error(pdev, dev_priv->gart_info.sg_dummy_bus)) { +- nouveau_gpuobj_ref(NULL, &gpuobj); +- return -EFAULT; +- } +- + if (dev_priv->card_type < NV_50) { + /* special case, allocated from global instmem heap so + * cinst is invalid, we use it on all channels though so +@@ -264,19 +247,14 @@ + */ + gpuobj->cinst = gpuobj->pinst; + +- /* Maybe use NV_DMA_TARGET_AGP for PCIE? NVIDIA do this, and +- * confirmed to work on c51. Perhaps means NV_DMA_TARGET_PCIE +- * on those cards? */ + nv_wo32(gpuobj, 0, NV_CLASS_DMA_IN_MEMORY | + (1 << 12) /* PT present */ | + (0 << 13) /* PT *not* linear */ | +- (NV_DMA_ACCESS_RW << 14) | +- (NV_DMA_TARGET_PCI << 16)); ++ (0 << 14) /* RW */ | ++ (2 << 16) /* PCI */); + nv_wo32(gpuobj, 4, aper_size - 1); +- for (i = 2; i < 2 + (aper_size >> 12); i++) { +- nv_wo32(gpuobj, i * 4, +- dev_priv->gart_info.sg_dummy_bus | 3); +- } ++ for (i = 2; i < 2 + (aper_size >> 12); i++) ++ nv_wo32(gpuobj, i * 4, 0x00000000); + } else { + for (i = 0; i < obj_size; i += 8) { + nv_wo32(gpuobj, i + 0, 0x00000000); +@@ -297,15 +275,6 @@ + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + +- if (dev_priv->gart_info.sg_dummy_page) { +- pci_unmap_page(dev->pdev, dev_priv->gart_info.sg_dummy_bus, +- NV_CTXDMA_PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); +- unlock_page(dev_priv->gart_info.sg_dummy_page); +- __free_page(dev_priv->gart_info.sg_dummy_page); +- dev_priv->gart_info.sg_dummy_page = NULL; +- dev_priv->gart_info.sg_dummy_bus = 0; +- } +- + nouveau_gpuobj_ref(NULL, &dev_priv->gart_info.sg_ctxdma); + } + +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-17 02:20:11.000000000 +0100 @@ -53,10 +53,10 @@ engine->instmem.takedown = nv04_instmem_takedown; engine->instmem.suspend = nv04_instmem_suspend; @@ -5902,7 +6443,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 } engine->pm.voltage_get = nouveau_voltage_gpio_get; engine->pm.voltage_set = nouveau_voltage_gpio_set; -@@ -396,16 +426,33 @@ +@@ -396,16 +426,34 @@ engine->pm.temp_get = nv84_temp_get; else engine->pm.temp_get = nv40_temp_get; @@ -5917,6 +6458,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 + engine->crypt.takedown = nv84_crypt_fini; + engine->crypt.create_context = nv84_crypt_create_context; + engine->crypt.destroy_context = nv84_crypt_destroy_context; ++ engine->crypt.tlb_flush = nv84_crypt_tlb_flush; + break; + default: + engine->crypt.init = nouveau_stub_init; @@ -5940,7 +6482,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 engine->instmem.flush = nvc0_instmem_flush; engine->mc.init = nv50_mc_init; engine->mc.takedown = nv50_mc_takedown; -@@ -414,7 +461,6 @@ +@@ -414,7 +462,6 @@ engine->timer.takedown = nv04_timer_takedown; engine->fb.init = nvc0_fb_init; engine->fb.takedown = nvc0_fb_takedown; @@ -5948,7 +6490,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 engine->graph.init = nvc0_graph_init; engine->graph.takedown = nvc0_graph_takedown; engine->graph.fifo_access = nvc0_graph_fifo_access; -@@ -443,7 +489,11 @@ +@@ -443,7 +490,11 @@ engine->gpio.takedown = nouveau_stub_takedown; engine->gpio.get = nv50_gpio_get; engine->gpio.set = nv50_gpio_set; @@ -5960,7 +6502,30 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 break; default: NV_ERROR(dev, "NV%02x unsupported\n", dev_priv->chipset); -@@ -506,11 +556,11 @@ +@@ -485,7 +536,7 @@ + + ret = nouveau_gpuobj_dma_new(dev_priv->channel, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->vram_size, +- NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM, ++ NV_MEM_ACCESS_RW, NV_MEM_TARGET_VRAM, + &gpuobj); + if (ret) + goto out_err; +@@ -495,9 +546,10 @@ + if (ret) + goto out_err; + +- ret = nouveau_gpuobj_gart_dma_new(dev_priv->channel, 0, +- dev_priv->gart_info.aper_size, +- NV_DMA_ACCESS_RW, &gpuobj, NULL); ++ ret = nouveau_gpuobj_dma_new(dev_priv->channel, NV_CLASS_DMA_IN_MEMORY, ++ 0, dev_priv->gart_info.aper_size, ++ NV_MEM_ACCESS_RW, NV_MEM_TARGET_GART, ++ &gpuobj); + if (ret) + goto out_err; + +@@ -506,11 +558,11 @@ if (ret) goto out_err; @@ -5974,7 +6539,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 return ret; } -@@ -557,6 +607,8 @@ +@@ -557,6 +609,8 @@ if (ret) goto out; engine = &dev_priv->engine; @@ -5983,7 +6548,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 spin_lock_init(&dev_priv->context_switch_lock); /* Make the CRTCs and I2C buses accessible */ -@@ -615,26 +667,28 @@ +@@ -615,26 +669,28 @@ if (ret) goto out_fb; @@ -6020,7 +6585,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 /* what about PVIDEO/PCRTC/PRAMDAC etc? */ -@@ -659,12 +713,16 @@ +@@ -659,12 +715,16 @@ out_fence: nouveau_fence_fini(dev); out_irq: @@ -6039,7 +6604,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 out_graph: if (!nouveau_noaccel) engine->graph.takedown(dev); -@@ -703,12 +761,12 @@ +@@ -703,12 +763,12 @@ if (!engine->graph.accel_blocked) { nouveau_fence_fini(dev); @@ -6054,7 +6619,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 engine->graph.takedown(dev); } engine->fb.takedown(dev); -@@ -727,7 +785,8 @@ +@@ -727,7 +787,8 @@ nouveau_gpuobj_takedown(dev); nouveau_mem_vram_fini(dev); @@ -6064,7 +6629,35 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 nouveau_pm_fini(dev); nouveau_bios_takedown(dev); -@@ -1041,6 +1100,12 @@ +@@ -1014,21 +1075,6 @@ + else + getparam->value = NV_PCI; + break; +- case NOUVEAU_GETPARAM_FB_PHYSICAL: +- getparam->value = dev_priv->fb_phys; +- break; +- case NOUVEAU_GETPARAM_AGP_PHYSICAL: +- getparam->value = dev_priv->gart_info.aper_base; +- break; +- case NOUVEAU_GETPARAM_PCI_PHYSICAL: +- if (dev->sg) { +- getparam->value = (unsigned long)dev->sg->virtual; +- } else { +- NV_ERROR(dev, "Requested PCIGART address, " +- "while no PCIGART was created\n"); +- return -EINVAL; +- } +- break; + case NOUVEAU_GETPARAM_FB_SIZE: + getparam->value = dev_priv->fb_available_size; + break; +@@ -1036,11 +1082,17 @@ + getparam->value = dev_priv->gart_info.aper_size; + break; + case NOUVEAU_GETPARAM_VM_VRAM_BASE: +- getparam->value = dev_priv->vm_vram_base; ++ getparam->value = 0; /* deprecated */ + break; case NOUVEAU_GETPARAM_PTIMER_TIME: getparam->value = dev_priv->engine.timer.read(dev); break; @@ -6077,7 +6670,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 case NOUVEAU_GETPARAM_GRAPH_UNITS: /* NV40 and NV50 versions are quite different, but register * address is the same. User is supposed to know the card -@@ -1051,7 +1116,7 @@ +@@ -1051,7 +1103,7 @@ } /* FALLTHRU */ default: @@ -6086,7 +6679,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 return -EINVAL; } -@@ -1066,7 +1131,7 @@ +@@ -1066,7 +1118,7 @@ switch (setparam->param) { default: @@ -6095,7 +6688,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 return -EINVAL; } -@@ -1092,7 +1157,13 @@ +@@ -1092,7 +1144,13 @@ /* Waits for PGRAPH to go completely idle */ bool nouveau_wait_for_idle(struct drm_device *dev) { @@ -6110,9 +6703,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37 NV_ERROR(dev, "PGRAPH idle timed out with status 0x%08x\n", nv_rd32(dev, NV04_PGRAPH_STATUS)); return false; -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_temp.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_temp.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c 2010-11-17 02:20:11.000000000 +0100 @@ -191,7 +191,7 @@ int offset = sensor->offset_mult / sensor->offset_div; int core_temp; @@ -6122,9 +6715,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6.37- core_temp = nv_rd32(dev, 0x20008); } else { core_temp = nv_rd32(dev, 0x0015b4) & 0x1fff; -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_util.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_util.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c 2010-11-17 02:20:11.000000000 +0100 @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2010 Nouveau Project @@ -6195,9 +6788,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_util.c linux-2.6.37- +{ + return __ratelimit(&nouveau_ratelimit_state); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_util.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_util.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_util.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nouveau_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h 2010-11-17 02:20:11.000000000 +0100 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010 Nouveau Project @@ -6244,9 +6837,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nouveau_util.h linux-2.6.37- +int nouveau_ratelimit(void); + +#endif -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-11-17 02:20:11.000000000 +0100 @@ -158,7 +158,6 @@ { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); @@ -6311,9 +6904,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.37-rc1 .destroy = nv_crtc_destroy, }; -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_dfp.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_dfp.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-11-17 02:20:11.000000000 +0100 @@ -185,14 +185,15 @@ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct nouveau_connector *nv_connector = nouveau_encoder_connector_get(nv_encoder); @@ -6336,9 +6929,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_dfp.c linux-2.6.37-rc1. } return true; -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_display.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_display.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_display.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_display.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_display.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_display.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_display.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_display.c 2010-11-17 02:20:11.000000000 +0100 @@ -32,6 +32,9 @@ #include "nouveau_encoder.h" #include "nouveau_connector.h" @@ -6385,9 +6978,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_display.c linux-2.6.37- + nv_wr32(dev, NV_CRTC1_INTSTAT, NV_CRTC_INTR_VBLANK); + drm_handle_vblank(dev, 1); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_fbcon.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_fbcon.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-11-17 02:20:11.000000000 +0100 @@ -28,52 +28,39 @@ #include "nouveau_ramht.h" #include "nouveau_fbcon.h" @@ -6517,9 +7110,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_fbcon.c linux-2.6.37-rc } static int -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-11-17 02:20:11.000000000 +0100 @@ -28,6 +28,7 @@ #include "drm.h" #include "nouveau_drv.h" @@ -6792,9 +7385,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.37-rc1 + + nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PFIFO_PENDING); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_graph.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_graph.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_graph.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_graph.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c 2010-11-17 02:20:11.000000000 +0100 @@ -26,6 +26,11 @@ #include "drm.h" #include "nouveau_drm.h" @@ -7651,9 +8244,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_graph.c linux-2.6.37-rc + } + } +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_instmem.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_instmem.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-11-17 02:20:11.000000000 +0100 @@ -98,42 +98,66 @@ } @@ -7733,9 +8326,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_instmem.c linux-2.6.37- +nv04_instmem_flush(struct drm_device *dev) +{ +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_pm.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_pm.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_pm.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv04_pm.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c 2010-11-17 02:20:11.000000000 +0100 @@ -76,6 +76,15 @@ reg += 4; @@ -7752,9 +8345,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv04_pm.c linux-2.6.37-rc1.n kfree(state); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_fb.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_fb.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv10_fb.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv10_fb.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c 2010-11-17 02:20:11.000000000 +0100 @@ -3,23 +3,109 @@ #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -7906,9 +8499,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_fb.c linux-2.6.37-rc1.n + if (dev_priv->card_type == NV_20) + drm_mm_takedown(&pfb->tag_heap); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_fifo.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv10_fifo.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-11-17 02:20:11.000000000 +0100 @@ -73,17 +73,6 @@ return 0; } @@ -7944,9 +8537,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_fifo.c linux-2.6.37-rc1 uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_graph.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_graph.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv10_graph.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv10_graph.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c 2010-11-17 02:20:11.000000000 +0100 @@ -26,6 +26,10 @@ #include "drm.h" #include "nouveau_drm.h" @@ -8229,9 +8822,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv10_graph.c linux-2.6.37-rc + } + } +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv20_graph.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv20_graph.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv20_graph.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv20_graph.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c 2010-11-17 02:20:11.000000000 +0100 @@ -32,6 +32,10 @@ #define NV34_GRCTX_SIZE (18140) #define NV35_36_GRCTX_SIZE (22396) @@ -8562,9 +9155,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv20_graph.c linux-2.6.37-rc + } + } +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv30_fb.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv30_fb.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv30_fb.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv30_fb.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c 2010-11-17 02:20:11.000000000 +0100 @@ -29,6 +29,27 @@ #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -8602,9 +9195,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv30_fb.c linux-2.6.37-rc1.n /* Init the memory timing regs at 0x10037c/0x1003ac */ if (dev_priv->chipset == 0x30 || -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_fb.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv40_fb.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c 2010-11-17 02:20:11.000000000 +0100 @@ -4,26 +4,22 @@ #include "nouveau_drm.h" @@ -8649,9 +9242,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6.37-rc1.n return 0; } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_fifo.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv40_fifo.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-11-17 02:20:11.000000000 +0100 @@ -70,17 +70,6 @@ return 0; } @@ -8687,9 +9280,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_fifo.c linux-2.6.37-rc1 uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); } -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_graph.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_graph.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv40_graph.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv40_graph.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c 2010-11-17 02:20:11.000000000 +0100 @@ -29,6 +29,9 @@ #include "nouveau_drv.h" #include "nouveau_grctx.h" @@ -8958,9 +9551,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv40_graph.c linux-2.6.37-rc + } + } +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_calc.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_calc.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_calc.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_calc.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c 2010-11-17 02:20:11.000000000 +0100 @@ -51,24 +51,28 @@ int *N, int *fN, int *M, int *P) { @@ -8996,9 +9589,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_calc.c linux-2.6.37-rc1 fb_div.full = dfixed_div(fb_div, a); /* *N = floor(fb_div); */ -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-11-17 02:20:11.000000000 +0100 @@ -437,6 +437,7 @@ .cursor_move = nv50_crtc_cursor_move, .gamma_set = nv50_crtc_gamma_set, @@ -9041,9 +9634,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.37-rc1 else OUT_RING(evo, format); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_display.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_display.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_display.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_display.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2010-11-17 02:20:11.000000000 +0100 @@ -33,6 +33,8 @@ #include "nouveau_ramht.h" #include "drm_crtc_helper.h" @@ -9624,9 +10217,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.37- } } - -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_display.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_display.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_display.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_display.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_display.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_display.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_display.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_display.h 2010-11-17 02:20:11.000000000 +0100 @@ -35,9 +35,7 @@ #include "nouveau_crtc.h" #include "nv50_evo.h" @@ -9637,9 +10230,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_display.h linux-2.6.37- int nv50_display_early_init(struct drm_device *dev); void nv50_display_late_takedown(struct drm_device *dev); int nv50_display_create(struct drm_device *dev); -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_evo.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_evo.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2010-11-17 02:20:11.000000000 +0100 @@ -0,0 +1,318 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -9959,9 +10552,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.37-rc1. + nv50_evo_channel_del(&dev_priv->evo); + } +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_evo.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_evo.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h 2010-11-17 02:20:11.000000000 +0100 @@ -24,6 +24,15 @@ * */ @@ -9983,10 +10576,108 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.37-rc1. #define NV50_EVO_CRTC_SCALE_RES2 0x000008dc +#endif -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fb.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c 2010-11-12 06:18:06.000000000 +0100 -@@ -42,6 +42,7 @@ +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_fb.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c 2010-11-17 02:20:11.000000000 +0100 +@@ -3,30 +3,75 @@ + #include "nouveau_drv.h" + #include "nouveau_drm.h" + ++struct nv50_fb_priv { ++ struct page *r100c08_page; ++ dma_addr_t r100c08; ++}; ++ ++static int ++nv50_fb_create(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv50_fb_priv *priv; ++ ++ priv = kzalloc(sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ priv->r100c08_page = alloc_page(GFP_KERNEL | __GFP_ZERO); ++ if (!priv->r100c08_page) { ++ kfree(priv); ++ return -ENOMEM; ++ } ++ ++ priv->r100c08 = pci_map_page(dev->pdev, priv->r100c08_page, 0, ++ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); ++ if (pci_dma_mapping_error(dev->pdev, priv->r100c08)) { ++ __free_page(priv->r100c08_page); ++ kfree(priv); ++ return -EFAULT; ++ } ++ ++ dev_priv->engine.fb.priv = priv; ++ return 0; ++} ++ + int + nv50_fb_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv50_fb_priv *priv; ++ int ret; ++ ++ if (!dev_priv->engine.fb.priv) { ++ ret = nv50_fb_create(dev); ++ if (ret) ++ return ret; ++ } ++ priv = dev_priv->engine.fb.priv; + + /* Not a clue what this is exactly. Without pointing it at a + * scratch page, VRAM->GART blits with M2MF (as in DDX DFS) + * cause IOMMU "read from address 0" errors (rh#561267) + */ +- nv_wr32(dev, 0x100c08, dev_priv->gart_info.sg_dummy_bus >> 8); ++ nv_wr32(dev, 0x100c08, priv->r100c08 >> 8); + + /* This is needed to get meaningful information from 100c90 + * on traps. No idea what these values mean exactly. */ + switch (dev_priv->chipset) { + case 0x50: +- nv_wr32(dev, 0x100c90, 0x0707ff); ++ nv_wr32(dev, 0x100c90, 0x000707ff); + break; + case 0xa3: + case 0xa5: + case 0xa8: +- nv_wr32(dev, 0x100c90, 0x0d0fff); ++ nv_wr32(dev, 0x100c90, 0x000d0fff); ++ break; ++ case 0xaf: ++ nv_wr32(dev, 0x100c90, 0x089d1fff); + break; + default: +- nv_wr32(dev, 0x100c90, 0x1d07ff); ++ nv_wr32(dev, 0x100c90, 0x001d07ff); + break; + } + +@@ -36,12 +81,25 @@ + void + nv50_fb_takedown(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv50_fb_priv *priv; ++ ++ priv = dev_priv->engine.fb.priv; ++ if (!priv) ++ return; ++ dev_priv->engine.fb.priv = NULL; ++ ++ pci_unmap_page(dev->pdev, priv->r100c08, PAGE_SIZE, ++ PCI_DMA_BIDIRECTIONAL); ++ __free_page(priv->r100c08_page); ++ kfree(priv); + } + + void nv50_fb_vm_trap(struct drm_device *dev, int display, const char *name) { struct drm_nouveau_private *dev_priv = dev->dev_private; @@ -9994,7 +10685,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.37-rc1.n u32 trap[6], idx, chinst; int i, ch; -@@ -60,8 +61,10 @@ +@@ -60,8 +118,10 @@ return; chinst = (trap[2] << 16) | trap[1]; @@ -10006,7 +10697,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.37-rc1.n if (!chan || !chan->ramin) continue; -@@ -69,6 +72,7 @@ +@@ -69,6 +129,7 @@ if (chinst == chan->ramin->vinst >> 12) break; } @@ -10014,9 +10705,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.37-rc1.n NV_INFO(dev, "%s - VM: Trapped %s at %02x%04x%04x status %08x " "channel %d (0x%08x)\n", -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-11-17 02:20:11.000000000 +0100 @@ -4,26 +4,18 @@ #include "nouveau_ramht.h" #include "nouveau_fbcon.h" @@ -10148,9 +10839,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-2.6.37-rc } int -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-11-17 02:20:11.000000000 +0100 @@ -44,7 +44,8 @@ /* We never schedule channel 0 or 127 */ @@ -10250,9 +10941,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.37-rc1 +{ + nv50_vm_flush(dev, 5); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_gpio.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_gpio.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_gpio.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_gpio.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c 2010-11-17 02:20:11.000000000 +0100 @@ -26,6 +26,28 @@ #include "nouveau_drv.h" #include "nouveau_hw.h" @@ -10489,9 +11180,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_gpio.c linux-2.6.37-rc1 + } + spin_unlock(&priv->lock); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_graph.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_graph.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c 2010-11-17 02:20:11.000000000 +0100 @@ -29,6 +29,11 @@ #include "nouveau_drv.h" #include "nouveau_ramht.h" @@ -11283,9 +11974,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.37-rc + if (nv_rd32(dev, 0x400824) & (1 << 31)) + nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) & ~(1 << 31)); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-11-17 02:20:11.000000000 +0100 @@ -131,10 +131,10 @@ } @@ -11565,9 +12256,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.37- } void -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv84_crypt.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nv84_crypt.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c 2010-11-17 02:20:11.000000000 +0100 @@ -0,0 +1,137 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -11632,7 +12323,7 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.37-rc + struct drm_device *dev = chan->dev; + u32 inst; + -+ if (!chan->ramin) ++ if (!chan->crypt_ctx) + return; + + inst = (chan->ramin->vinst >> 12); @@ -11706,9 +12397,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.37-rc + + nv50_fb_vm_trap(dev, show, "PCRYPT"); +} -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-11-17 02:20:11.000000000 +0100 @@ -26,67 +26,89 @@ #include "nouveau_drv.h" @@ -11881,9 +12572,9 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-2.6.37- } void -diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nvreg.h linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nvreg.h ---- linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nvreg.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/drivers/gpu/drm/nouveau/nvreg.h 2010-11-12 06:18:06.000000000 +0100 +diff -Naur linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nvreg.h linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nvreg.h +--- linux-2.6.37-rc2/drivers/gpu/drm/nouveau/nvreg.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/drivers/gpu/drm/nouveau/nvreg.h 2010-11-17 02:20:11.000000000 +0100 @@ -153,7 +153,8 @@ #define NV_PCRTC_START 0x00600800 #define NV_PCRTC_CONFIG 0x00600804 @@ -11894,10 +12585,19 @@ diff -Naur linux-2.6.37-rc1/drivers/gpu/drm/nouveau/nvreg.h linux-2.6.37-rc1.nou #define NV_PCRTC_CURSOR_CONFIG 0x00600810 # define NV_PCRTC_CURSOR_CONFIG_ENABLE_ENABLE (1 << 0) # define NV_PCRTC_CURSOR_CONFIG_DOUBLE_SCAN_ENABLE (1 << 4) -diff -Naur linux-2.6.37-rc1/include/drm/nouveau_drm.h linux-2.6.37-rc1.nouveau/include/drm/nouveau_drm.h ---- linux-2.6.37-rc1/include/drm/nouveau_drm.h 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1.nouveau/include/drm/nouveau_drm.h 2010-11-12 06:18:06.000000000 +0100 -@@ -80,6 +80,8 @@ +diff -Naur linux-2.6.37-rc2/include/drm/nouveau_drm.h linux-2.6.37-rc2.nouveau/include/drm/nouveau_drm.h +--- linux-2.6.37-rc2/include/drm/nouveau_drm.h 2010-11-16 03:31:02.000000000 +0100 ++++ linux-2.6.37-rc2.nouveau/include/drm/nouveau_drm.h 2010-11-17 02:20:11.000000000 +0100 +@@ -71,15 +71,14 @@ + #define NOUVEAU_GETPARAM_PCI_VENDOR 3 + #define NOUVEAU_GETPARAM_PCI_DEVICE 4 + #define NOUVEAU_GETPARAM_BUS_TYPE 5 +-#define NOUVEAU_GETPARAM_FB_PHYSICAL 6 +-#define NOUVEAU_GETPARAM_AGP_PHYSICAL 7 + #define NOUVEAU_GETPARAM_FB_SIZE 8 + #define NOUVEAU_GETPARAM_AGP_SIZE 9 +-#define NOUVEAU_GETPARAM_PCI_PHYSICAL 10 + #define NOUVEAU_GETPARAM_CHIPSET_ID 11 #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 #define NOUVEAU_GETPARAM_PTIMER_TIME 14 @@ -11906,7 +12606,7 @@ diff -Naur linux-2.6.37-rc1/include/drm/nouveau_drm.h linux-2.6.37-rc1.nouveau/i struct drm_nouveau_getparam { uint64_t param; uint64_t value; -@@ -95,6 +97,12 @@ +@@ -95,6 +94,12 @@ #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) @@ -11919,7 +12619,7 @@ diff -Naur linux-2.6.37-rc1/include/drm/nouveau_drm.h linux-2.6.37-rc1.nouveau/i struct drm_nouveau_gem_info { uint32_t handle; uint32_t domain; -@@ -164,7 +172,6 @@ +@@ -164,7 +169,6 @@ }; #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001