From a0bad11b9f0f12c505e02cefeea4f785f2b67abd Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 12 Mar 2011 22:42:26 +0100 Subject: [PATCH] linux: update nouveau upstream patches Signed-off-by: Stephan Raue --- ...110-drm_nouveau_upstream-20110312.3.patch} | 978 ++++++++++++++---- 1 file changed, 777 insertions(+), 201 deletions(-) rename packages/linux/patches/{linux-2.6.38-rc8-110-drm_nouveau_upstream-20110222.patch => linux-2.6.38-rc8-110-drm_nouveau_upstream-20110312.3.patch} (77%) diff --git a/packages/linux/patches/linux-2.6.38-rc8-110-drm_nouveau_upstream-20110222.patch b/packages/linux/patches/linux-2.6.38-rc8-110-drm_nouveau_upstream-20110312.3.patch similarity index 77% rename from packages/linux/patches/linux-2.6.38-rc8-110-drm_nouveau_upstream-20110222.patch rename to packages/linux/patches/linux-2.6.38-rc8-110-drm_nouveau_upstream-20110312.3.patch index ed88d624a0..4abd334599 100644 --- a/packages/linux/patches/linux-2.6.38-rc8-110-drm_nouveau_upstream-20110222.patch +++ b/packages/linux/patches/linux-2.6.38-rc8-110-drm_nouveau_upstream-20110312.3.patch @@ -1,6 +1,6 @@ -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_bios.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-02-22 14:25:08.609606768 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-03-09 18:30:58.000000000 +0100 @@ -282,7 +282,7 @@ { #if 0 @@ -108,9 +108,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6/dri bios->dev = dev; if (!NVShadowVBIOS(dev, bios->data)) -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bios.h linux-2.6/drivers/gpu/drm/nouveau/nouveau_bios.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bios.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_bios.h 2011-02-22 14:16:21.580230479 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_bios.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_bios.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.h 2011-03-09 18:30:58.000000000 +0100 @@ -251,7 +251,7 @@ uint8_t digital_min_front_porch; bool fp_no_ddc; @@ -120,10 +120,10 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bios.h linux-2.6/dri uint8_t data[NV_PROM_SIZE]; unsigned int length; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_bo.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_bo.c 2011-02-22 14:32:02.564311615 +0100 -@@ -54,8 +54,8 @@ +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_bo.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2011-03-09 18:30:58.000000000 +0100 +@@ -57,8 +57,8 @@ } static void @@ -134,7 +134,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive { struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); -@@ -80,7 +80,7 @@ +@@ -83,7 +83,7 @@ } } else { if (likely(dev_priv->chan_vm)) { @@ -143,7 +143,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive *page_shift = dev_priv->chan_vm->lpg_shift; else *page_shift = dev_priv->chan_vm->spg_shift; -@@ -98,8 +98,7 @@ +@@ -101,8 +101,7 @@ int nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, int size, int align, uint32_t flags, uint32_t tile_mode, @@ -153,7 +153,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive { struct drm_nouveau_private *dev_priv = dev->dev_private; struct nouveau_bo *nvbo; -@@ -110,16 +109,14 @@ +@@ -113,16 +112,14 @@ return -ENOMEM; INIT_LIST_HEAD(&nvbo->head); INIT_LIST_HEAD(&nvbo->entry); @@ -172,7 +172,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive ret = nouveau_vm_get(dev_priv->chan_vm, size, page_shift, NV_MEM_ACCESS_RW, &nvbo->vma); if (ret) { -@@ -140,11 +137,8 @@ +@@ -144,11 +141,8 @@ } nvbo->channel = NULL; @@ -186,7 +186,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive *pnvbo = nvbo; return 0; } -@@ -314,11 +308,8 @@ +@@ -318,11 +312,8 @@ if (ret) return ret; @@ -200,7 +200,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive return 0; } -@@ -381,7 +372,8 @@ +@@ -385,7 +376,8 @@ case NOUVEAU_GART_AGP: return ttm_agp_backend_init(bdev, dev->agp->bridge); #endif @@ -210,7 +210,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive return nouveau_sgdma_init_ttm(dev); default: NV_ERROR(dev, "Unknown GART type %d\n", -@@ -427,7 +419,10 @@ +@@ -431,7 +423,10 @@ man->default_caching = TTM_PL_FLAG_WC; break; case TTM_PL_TT: @@ -222,7 +222,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive switch (dev_priv->gart_info.type) { case NOUVEAU_GART_AGP: man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; -@@ -435,7 +430,8 @@ +@@ -439,7 +434,8 @@ TTM_PL_FLAG_WC; man->default_caching = TTM_PL_FLAG_WC; break; @@ -232,7 +232,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive man->flags = TTM_MEMTYPE_FLAG_MAPPABLE | TTM_MEMTYPE_FLAG_CMA; man->available_caching = TTM_PL_MASK_CACHING; -@@ -497,45 +493,22 @@ +@@ -501,45 +497,22 @@ return ret; } @@ -286,7 +286,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive page_count = new_mem->num_pages; while (page_count) { -@@ -570,33 +543,18 @@ +@@ -574,33 +547,18 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) { @@ -327,7 +327,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive while (length) { u32 amount, stride, height; -@@ -677,6 +635,15 @@ +@@ -681,6 +639,15 @@ return 0; } @@ -343,7 +343,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive static int nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) -@@ -730,15 +697,43 @@ +@@ -734,15 +701,43 @@ { struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); struct nouveau_bo *nvbo = nouveau_bo(bo); @@ -388,7 +388,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive if (dev_priv->card_type < NV_50) ret = nv04_bo_move_m2mf(chan, bo, &bo->mem, new_mem); else -@@ -752,6 +747,7 @@ +@@ -756,6 +751,7 @@ no_wait_gpu, new_mem); } @@ -396,7 +396,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive if (chan == dev_priv->channel) mutex_unlock(&chan->mutex); return ret; -@@ -762,6 +758,7 @@ +@@ -766,6 +762,7 @@ bool no_wait_reserve, bool no_wait_gpu, struct ttm_mem_reg *new_mem) { @@ -404,7 +404,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive u32 placement_memtype = TTM_PL_FLAG_TT | TTM_PL_MASK_CACHING; struct ttm_placement placement; struct ttm_mem_reg tmp_mem; -@@ -781,7 +778,23 @@ +@@ -785,7 +782,23 @@ if (ret) goto out; @@ -428,7 +428,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive if (ret) goto out; -@@ -824,6 +837,36 @@ +@@ -828,6 +841,36 @@ return ret; } @@ -465,7 +465,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive static int nouveau_bo_vm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem, struct nouveau_tile_reg **new_tile) -@@ -831,19 +874,13 @@ +@@ -835,19 +878,13 @@ struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); struct drm_device *dev = dev_priv->dev; struct nouveau_bo *nvbo = nouveau_bo(bo); @@ -489,7 +489,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive *new_tile = nv10_mem_set_tiling(dev, offset, new_mem->size, nvbo->tile_mode, nvbo->tile_flags); -@@ -860,11 +897,8 @@ +@@ -864,11 +901,8 @@ struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); struct drm_device *dev = dev_priv->dev; @@ -503,7 +503,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive } static int -@@ -878,9 +912,11 @@ +@@ -882,9 +916,11 @@ struct nouveau_tile_reg *new_tile = NULL; int ret = 0; @@ -518,7 +518,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive /* Fake bo copy. */ if (old_mem->mem_type == TTM_PL_SYSTEM && !bo->ttm) { -@@ -911,10 +947,12 @@ +@@ -915,10 +951,12 @@ ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); out: @@ -535,7 +535,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive return ret; } -@@ -955,7 +993,7 @@ +@@ -959,7 +997,7 @@ break; case TTM_PL_VRAM: { @@ -544,7 +544,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive u8 page_shift; if (!dev_priv->bar1_vm) { -@@ -966,23 +1004,23 @@ +@@ -970,23 +1008,23 @@ } if (dev_priv->card_type == NV_C0) @@ -573,7 +573,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive if (dev_priv->card_type == NV_50) /*XXX*/ mem->bus.offset -= 0x0020000000ULL; mem->bus.base = pci_resource_start(dev->pdev, 1); -@@ -999,16 +1037,16 @@ +@@ -1003,16 +1041,16 @@ nouveau_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) { struct drm_nouveau_private *dev_priv = nouveau_bdev(bdev); @@ -594,7 +594,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive } static int -@@ -1058,6 +1096,7 @@ +@@ -1062,6 +1100,7 @@ .invalidate_caches = nouveau_bo_invalidate_caches, .init_mem_type = nouveau_bo_init_mem_type, .evict_flags = nouveau_bo_evict_flags, @@ -602,9 +602,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6/drive .move = nouveau_bo_move, .verify_access = nouveau_bo_verify_access, .sync_obj_signaled = __nouveau_fence_signalled, -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_channel.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_channel.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_channel.c 2011-02-22 14:16:21.581230459 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_channel.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2011-03-09 18:30:58.000000000 +0100 @@ -35,7 +35,7 @@ struct drm_nouveau_private *dev_priv = dev->dev_private; struct nouveau_bo *pb = chan->pushbuf_bo; @@ -624,9 +624,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6/ if (ret) { NV_ERROR(dev, "error allocating DMA push buffer: %d\n", ret); return NULL; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_display.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_display.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_display.c 2011-02-22 14:16:21.582230439 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_display.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c 2011-03-09 18:30:58.000000000 +0100 @@ -32,6 +32,7 @@ #include "nouveau_hw.h" #include "nouveau_crtc.h" @@ -758,10 +758,10 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6/ kfree(s); spin_unlock_irqrestore(&dev->event_lock, flags); -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dma.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_dma.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dma.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_dma.c 2011-02-22 14:16:21.582230439 +0100 -@@ -96,13 +96,15 @@ +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_dma.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_dma.c 2011-03-12 22:37:55.420744532 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c 2011-03-09 18:30:58.000000000 +0100 +@@ -97,13 +97,15 @@ OUT_RING(chan, 0); /* Initialise NV_MEMORY_TO_MEMORY_FORMAT */ @@ -781,9 +781,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dma.c linux-2.6/driv /* Sit back and pray the channel works.. */ FIRE_RING(chan); -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dma.h linux-2.6/drivers/gpu/drm/nouveau/nouveau_dma.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dma.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_dma.h 2011-02-22 14:16:21.582230439 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_dma.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_dma.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.h 2011-03-09 18:30:58.000000000 +0100 @@ -61,8 +61,6 @@ NvM2MF = 0x80000001, NvDmaFB = 0x80000002, @@ -810,9 +810,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dma.h linux-2.6/driv }; #define NV_MEMORY_TO_MEMORY_FORMAT 0x00000039 -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_dp.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dp.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_dp.c 2011-02-22 14:16:21.582230439 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_dp.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c 2011-03-09 18:30:58.000000000 +0100 @@ -175,7 +175,6 @@ { struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); @@ -829,9 +829,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6/drive ret = auxch_rd(encoder, DP_ADJUST_REQUEST_LANE0_1, request, 2); if (ret) -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6/drivers/gpu/drm/nouveau/nouveau_drv.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-02-22 14:16:21.583230419 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-03-12 22:37:55.423744472 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-03-09 18:30:58.000000000 +0100 @@ -57,7 +57,7 @@ #include "nouveau_util.h" @@ -953,7 +953,16 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6/driv /* nouveau_notifier.c */ extern int nouveau_notifier_init_channel(struct nouveau_channel *); -@@ -1294,7 +1295,7 @@ +@@ -1076,7 +1077,7 @@ + /* nv50_fb.c */ + extern int nv50_fb_init(struct drm_device *); + extern void nv50_fb_takedown(struct drm_device *); +-extern void nv50_fb_vm_trap(struct drm_device *, int display, const char *); ++extern void nv50_fb_vm_trap(struct drm_device *, int display); + + /* nvc0_fb.c */ + extern int nvc0_fb_init(struct drm_device *); +@@ -1295,7 +1296,7 @@ extern int nouveau_bo_new(struct drm_device *, struct nouveau_channel *, int size, int align, uint32_t flags, uint32_t tile_mode, uint32_t tile_flags, @@ -962,7 +971,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6/driv extern int nouveau_bo_pin(struct nouveau_bo *, uint32_t flags); extern int nouveau_bo_unpin(struct nouveau_bo *); extern int nouveau_bo_map(struct nouveau_bo *); -@@ -1355,9 +1356,9 @@ +@@ -1356,9 +1357,9 @@ /* nouveau_gem.c */ extern int nouveau_gem_new(struct drm_device *, struct nouveau_channel *, @@ -974,9 +983,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6/driv extern int nouveau_gem_object_new(struct drm_gem_object *); extern void nouveau_gem_object_del(struct drm_gem_object *); extern int nouveau_gem_ioctl_new(struct drm_device *, void *, -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_fbcon.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2011-02-22 14:16:21.584230398 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2011-03-09 18:30:58.000000000 +0100 @@ -296,8 +296,8 @@ size = mode_cmd.pitch * mode_cmd.height; size = roundup(size, PAGE_SIZE); @@ -988,9 +997,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6/dr if (ret) { NV_ERROR(dev, "failed to allocate framebuffer\n"); goto out; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fb.h linux-2.6/drivers/gpu/drm/nouveau/nouveau_fb.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fb.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_fb.h 2011-02-22 14:16:21.584230398 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_fb.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_fb.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_fb.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_fb.h 2011-03-09 18:30:58.000000000 +0100 @@ -30,6 +30,9 @@ struct nouveau_framebuffer { struct drm_framebuffer base; @@ -1001,10 +1010,18 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fb.h linux-2.6/drive }; static inline struct nouveau_framebuffer * -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_fence.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-02-22 14:16:21.584230398 +0100 -@@ -32,8 +32,7 @@ +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-03-09 18:30:58.000000000 +0100 +@@ -27,13 +27,15 @@ + #include "drmP.h" + #include "drm.h" + ++#include ++#include ++ + #include "nouveau_drv.h" + #include "nouveau_ramht.h" #include "nouveau_dma.h" #define USE_REFCNT(dev) (nouveau_private(dev)->chipset >= 0x10) @@ -1014,7 +1031,33 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr struct nouveau_fence { struct nouveau_channel *channel; -@@ -259,11 +258,12 @@ +@@ -230,7 +232,8 @@ + __nouveau_fence_wait(void *sync_obj, void *sync_arg, bool lazy, bool intr) + { + unsigned long timeout = jiffies + (3 * DRM_HZ); +- unsigned long sleep_time = jiffies + 1; ++ unsigned long sleep_time = NSEC_PER_MSEC / 1000; ++ ktime_t t; + int ret = 0; + + while (1) { +@@ -244,8 +247,13 @@ + + __set_current_state(intr ? TASK_INTERRUPTIBLE + : TASK_UNINTERRUPTIBLE); +- if (lazy && time_after_eq(jiffies, sleep_time)) +- schedule_timeout(1); ++ if (lazy) { ++ t = ktime_set(0, sleep_time); ++ schedule_hrtimeout(&t, HRTIMER_MODE_REL); ++ sleep_time *= 2; ++ if (sleep_time > NSEC_PER_MSEC) ++ sleep_time = NSEC_PER_MSEC; ++ } + + if (intr && signal_pending(current)) { + ret = -ERESTARTSYS; +@@ -259,11 +267,12 @@ } static struct nouveau_semaphore * @@ -1029,7 +1072,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr if (!USE_SEMA(dev)) return NULL; -@@ -277,9 +277,9 @@ +@@ -277,9 +286,9 @@ goto fail; spin_lock(&dev_priv->fence.lock); @@ -1041,7 +1084,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr spin_unlock(&dev_priv->fence.lock); if (!sema->mem) -@@ -287,7 +287,8 @@ +@@ -287,7 +296,8 @@ kref_init(&sema->ref); sema->dev = dev; @@ -1051,7 +1094,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr return sema; fail: -@@ -296,7 +297,7 @@ +@@ -296,7 +306,7 @@ } static void @@ -1060,7 +1103,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr { struct nouveau_semaphore *sema = container_of(ref, struct nouveau_semaphore, ref); -@@ -318,61 +319,107 @@ +@@ -318,61 +328,107 @@ if (unlikely(!signalled)) nouveau_bo_wr32(dev_priv->fence.bo, sema->mem->start / 4, 1); @@ -1213,7 +1256,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr } /* Delay semaphore destruction until its work is done */ -@@ -383,7 +430,6 @@ +@@ -383,7 +439,6 @@ kref_get(&sema->ref); nouveau_fence_work(fence, semaphore_work, sema); nouveau_fence_unref(&fence); @@ -1221,7 +1264,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr return 0; } -@@ -400,7 +446,7 @@ +@@ -400,7 +455,7 @@ nouveau_fence_signalled(fence))) goto out; @@ -1230,7 +1273,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr if (!sema) { /* Early card or broken userspace, fall back to * software sync. */ -@@ -418,17 +464,17 @@ +@@ -418,17 +473,17 @@ } /* Make wchan wait until it gets signalled */ @@ -1251,7 +1294,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr out: if (chan) nouveau_channel_put_unlocked(&chan); -@@ -449,22 +495,23 @@ +@@ -449,22 +504,23 @@ struct nouveau_gpuobj *obj = NULL; int ret; @@ -1283,7 +1326,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr struct ttm_mem_reg *mem = &dev_priv->fence.bo->bo.mem; ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, -@@ -484,14 +531,20 @@ +@@ -484,14 +540,20 @@ return ret; BEGIN_RING(chan, NvSubSw, NV_SW_DMA_SEMAPHORE, 1); OUT_RING(chan, NvSema); @@ -1305,7 +1348,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr return 0; } -@@ -519,12 +572,13 @@ +@@ -519,12 +581,13 @@ nouveau_fence_init(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; @@ -1321,9 +1364,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6/dr if (ret) return ret; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_gem.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-02-22 14:16:21.585230377 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-03-09 18:30:58.000000000 +0100 @@ -61,19 +61,36 @@ int @@ -1417,9 +1460,36 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6/driv (write_domains ? write_domains : read_domains); uint32_t pref_flags = 0, valid_flags = 0; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_mem.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_mem.c 2011-02-22 14:16:21.587230337 +0100 +@@ -592,7 +600,7 @@ + if (push[i].bo_index >= req->nr_buffers) { + NV_ERROR(dev, "push %d buffer not in list\n", i); + ret = -EINVAL; +- goto out; ++ goto out_prevalid; + } + + bo[push[i].bo_index].read_domains |= (1 << 31); +@@ -604,7 +612,7 @@ + if (ret) { + if (ret != -ERESTARTSYS) + NV_ERROR(dev, "validate: %d\n", ret); +- goto out; ++ goto out_prevalid; + } + + /* Apply any relocations that are required */ +@@ -697,6 +705,8 @@ + out: + validate_fini(&op, fence); + nouveau_fence_unref(&fence); ++ ++out_prevalid: + kfree(bo); + kfree(push); + +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_mem.c 2011-03-12 22:37:55.425744434 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2011-03-09 18:30:58.000000000 +0100 @@ -152,7 +152,6 @@ { struct drm_nouveau_private *dev_priv = dev->dev_private; @@ -1451,7 +1521,48 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6/driv ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits)); if (ret) -@@ -455,13 +460,17 @@ +@@ -419,14 +424,32 @@ + } + + /* reserve space at end of VRAM for PRAMIN */ +- if (dev_priv->chipset == 0x40 || dev_priv->chipset == 0x47 || +- dev_priv->chipset == 0x49 || dev_priv->chipset == 0x4b) +- dev_priv->ramin_rsvd_vram = (2 * 1024 * 1024); +- else +- if (dev_priv->card_type >= NV_40) +- dev_priv->ramin_rsvd_vram = (1 * 1024 * 1024); +- else +- dev_priv->ramin_rsvd_vram = (512 * 1024); ++ if (dev_priv->card_type >= NV_50) { ++ dev_priv->ramin_rsvd_vram = 1 * 1024 * 1024; ++ } else ++ if (dev_priv->card_type >= NV_40) { ++ u32 vs = hweight8((nv_rd32(dev, 0x001540) & 0x0000ff00) >> 8); ++ u32 rsvd; ++ ++ /* estimate grctx size, the magics come from nv40_grctx.c */ ++ if (dev_priv->chipset == 0x40) rsvd = 0x6aa0 * vs; ++ else if (dev_priv->chipset < 0x43) rsvd = 0x4f00 * vs; ++ else if (nv44_graph_class(dev)) rsvd = 0x4980 * vs; ++ else rsvd = 0x4a40 * vs; ++ rsvd += 16 * 1024; ++ rsvd *= dev_priv->engine.fifo.channels; ++ ++ /* pciegart table */ ++ if (drm_device_is_pcie(dev)) ++ rsvd += 512 * 1024; ++ ++ /* object storage */ ++ rsvd += 512 * 1024; ++ ++ dev_priv->ramin_rsvd_vram = round_up(rsvd, 4096); ++ } else { ++ dev_priv->ramin_rsvd_vram = 512 * 1024; ++ } + + ret = dev_priv->engine.vram.init(dev); + if (ret) +@@ -455,13 +478,17 @@ return ret; } @@ -1476,7 +1587,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6/driv } dev_priv->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 1), -@@ -666,13 +675,14 @@ +@@ -666,13 +693,14 @@ { struct drm_nouveau_private *dev_priv = nouveau_bdev(man->bdev); struct nouveau_mm *mm; @@ -1495,7 +1606,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6/driv if (ret) return ret; -@@ -700,9 +710,15 @@ +@@ -700,9 +728,15 @@ { struct drm_nouveau_private *dev_priv = nouveau_bdev(man->bdev); struct nouveau_vram_engine *vram = &dev_priv->engine.vram; @@ -1512,7 +1623,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6/driv } static int -@@ -715,7 +731,7 @@ +@@ -715,7 +749,7 @@ struct nouveau_vram_engine *vram = &dev_priv->engine.vram; struct drm_device *dev = dev_priv->dev; struct nouveau_bo *nvbo = nouveau_bo(bo); @@ -1521,7 +1632,16 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6/driv u32 size_nc = 0; int ret; -@@ -769,3 +785,84 @@ +@@ -724,7 +758,7 @@ + + ret = vram->get(dev, mem->num_pages << PAGE_SHIFT, + mem->page_alignment << PAGE_SHIFT, size_nc, +- (nvbo->tile_flags >> 8) & 0xff, &node); ++ (nvbo->tile_flags >> 8) & 0x3ff, &node); + if (ret) { + mem->mm_node = NULL; + return (ret == -ENOSPC) ? 0 : ret; +@@ -771,3 +805,84 @@ nouveau_vram_manager_del, nouveau_vram_manager_debug }; @@ -1606,9 +1726,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6/driv + nouveau_gart_manager_del, + nouveau_gart_manager_debug +}; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mm.h linux-2.6/drivers/gpu/drm/nouveau/nouveau_mm.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mm.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_mm.h 2011-02-22 14:16:21.587230337 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_mm.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_mm.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_mm.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_mm.h 2011-03-09 18:30:58.000000000 +0100 @@ -53,13 +53,13 @@ int nv50_vram_init(struct drm_device *); @@ -1626,9 +1746,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_mm.h linux-2.6/drive bool nvc0_vram_flags_valid(struct drm_device *, u32 tile_flags); #endif -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_notifier.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_notifier.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_notifier.c 2011-02-22 14:16:21.587230337 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_notifier.c 2011-03-12 22:37:55.427744395 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2011-03-09 18:30:58.000000000 +0100 @@ -39,12 +39,11 @@ int ret; @@ -1645,15 +1765,15 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6 if (ret) return ret; -@@ -99,6 +98,7 @@ - int size, uint32_t *b_offset) +@@ -100,6 +99,7 @@ + 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; -@@ -112,11 +112,16 @@ +@@ -114,11 +114,16 @@ return -ENOMEM; } @@ -1675,9 +1795,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6 offset += mem->start; ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, offset, -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_object.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_object.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_object.c 2011-02-22 14:16:21.588230317 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_object.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2011-03-09 18:30:58.000000000 +0100 @@ -36,6 +36,7 @@ #include "nouveau_drm.h" #include "nouveau_ramht.h" @@ -1752,9 +1872,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6/d } /* VRAM ctxdma */ -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_ramht.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_ramht.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_ramht.c 2011-02-22 14:16:21.589230297 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_ramht.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c 2011-03-09 18:30:58.000000000 +0100 @@ -114,7 +114,9 @@ (gpuobj->engine << NV40_RAMHT_CONTEXT_ENGINE_SHIFT); } else { @@ -1766,9 +1886,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6/dr } else { ctx = (gpuobj->cinst >> 4) | ((gpuobj->engine << -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_sgdma.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2011-02-22 14:16:21.589230297 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2011-03-09 18:30:58.000000000 +0100 @@ -74,8 +74,24 @@ } } @@ -2080,7 +2200,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6/dr return &nvbe->backend; } -@@ -210,21 +409,65 @@ +@@ -210,21 +409,64 @@ { struct drm_nouveau_private *dev_priv = dev->dev_private; struct nouveau_gpuobj *gpuobj = NULL; @@ -2101,8 +2221,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6/dr - ret = nouveau_gpuobj_new(dev, NULL, obj_size, 16, - NVOBJ_FLAG_ZERO_ALLOC | - NVOBJ_FLAG_ZERO_FREE, &gpuobj); -+ if (dev_priv->card_type >= NV_50 || -+ dev_priv->ramin_rsvd_vram >= 2 * 1024 * 1024) ++ if (dev_priv->card_type >= NV_50 || drm_device_is_pcie(dev)) + aper_size = 512 * 1024 * 1024; + else + aper_size = 64 * 1024 * 1024; @@ -2160,7 +2279,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6/dr if (ret) { NV_ERROR(dev, "Error creating sgdma object: %d\n", ret); return ret; -@@ -236,25 +479,14 @@ +@@ -236,25 +478,14 @@ (0 << 14) /* RW */ | (2 << 16) /* PCI */); nv_wo32(gpuobj, 4, aper_size - 1); @@ -2188,7 +2307,7 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6/dr return 0; } -@@ -264,7 +496,13 @@ +@@ -264,7 +495,13 @@ struct drm_nouveau_private *dev_priv = dev->dev_private; nouveau_gpuobj_ref(NULL, &dev_priv->gart_info.sg_ctxdma); @@ -2203,9 +2322,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6/dr } uint32_t -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_state.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_state.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_state.c 2011-02-22 14:16:21.590230277 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_state.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2011-03-09 18:30:58.000000000 +0100 @@ -544,7 +544,6 @@ nouveau_card_init_channel(struct drm_device *dev) { @@ -2296,9 +2415,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6/dr break; case NOUVEAU_GETPARAM_GRAPH_UNITS: /* NV40 and NV50 versions are quite different, but register -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_temp.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_temp.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_temp.c 2011-02-22 14:16:21.590230277 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_temp.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c 2011-03-09 18:30:58.000000000 +0100 @@ -239,11 +239,9 @@ probe_monitoring_device(struct nouveau_i2c_chan *i2c, struct i2c_board_info *info) @@ -2312,9 +2431,65 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6/dri client = i2c_new_device(&i2c->adapter, info); if (!client) -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_vm.c linux-2.6/drivers/gpu/drm/nouveau/nouveau_vm.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_vm.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_vm.c 2011-02-22 14:16:21.591230257 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_util.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_util.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c 2011-03-09 18:30:58.000000000 +0100 +@@ -47,18 +47,27 @@ + printk(" (unknown bits 0x%08x)", value); + } + +-void +-nouveau_enum_print(const struct nouveau_enum *en, u32 value) ++const struct nouveau_enum * ++nouveau_enum_find(const struct nouveau_enum *en, u32 value) + { + while (en->name) { +- if (value == en->value) { +- printk("%s", en->name); +- return; +- } +- ++ if (en->value == value) ++ return en; + en++; + } + ++ return NULL; ++} ++ ++void ++nouveau_enum_print(const struct nouveau_enum *en, u32 value) ++{ ++ en = nouveau_enum_find(en, value); ++ if (en) { ++ printk("%s", en->name); ++ return; ++ } ++ + printk("(unknown enum 0x%08x)", value); + } + +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_util.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_util.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h 2011-03-09 18:30:58.000000000 +0100 +@@ -36,10 +36,14 @@ + struct nouveau_enum { + u32 value; + const char *name; ++ void *data; + }; + + void nouveau_bitfield_print(const struct nouveau_bitfield *, u32 value); + void nouveau_enum_print(const struct nouveau_enum *, u32 value); ++const struct nouveau_enum * ++nouveau_enum_find(const struct nouveau_enum *, u32 value); ++ + int nouveau_ratelimit(void); + + #endif +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_vm.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_vm.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.c 2011-03-09 18:30:58.000000000 +0100 @@ -28,7 +28,7 @@ #include "nouveau_vm.h" @@ -2379,9 +2554,29 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_vm.c linux-2.6/drive num -= len; pte += len; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_vm.h linux-2.6/drivers/gpu/drm/nouveau/nouveau_vm.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_vm.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nouveau_vm.h 2011-02-22 14:16:21.591230257 +0100 +@@ -311,18 +314,7 @@ + vm->spg_shift = 12; + vm->lpg_shift = 17; + pgt_bits = 27; +- +- /* Should be 4096 everywhere, this is a hack that's +- * currently necessary to avoid an elusive bug that +- * causes corruption when mixing small/large pages +- */ +- if (length < (1ULL << 40)) +- block = 4096; +- else { +- block = (1 << pgt_bits); +- if (length < block) +- block = length; +- } ++ block = 4096; + } else { + kfree(vm); + return -ENOSYS; +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_vm.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nouveau_vm.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nouveau_vm.h 2011-03-09 18:30:58.000000000 +0100 @@ -67,9 +67,10 @@ void (*map_pgt)(struct nouveau_gpuobj *pgd, u32 pde, struct nouveau_gpuobj *pgt[2]); @@ -2433,9 +2628,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nouveau_vm.h linux-2.6/drive void nvc0_vm_unmap(struct nouveau_gpuobj *, u32 pte, u32 cnt); void nvc0_vm_flush(struct nouveau_vm *); -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6/drivers/gpu/drm/nouveau/nv04_crtc.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv04_crtc.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv04_crtc.c 2011-02-22 14:16:21.592230236 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv04_crtc.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2011-03-09 18:30:58.000000000 +0100 @@ -1031,7 +1031,7 @@ drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); @@ -2445,9 +2640,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6/driver if (!ret) { ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); if (!ret) -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6/drivers/gpu/drm/nouveau/nv04_fifo.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv04_fifo.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv04_fifo.c 2011-02-22 14:16:21.593230215 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv04_fifo.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c 2011-03-09 18:30:58.000000000 +0100 @@ -379,6 +379,15 @@ return handled; } @@ -2488,9 +2683,18 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6/driver if (dma_get != dma_put) nv_wr32(dev, 0x003244, dma_put); -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6/drivers/gpu/drm/nouveau/nv40_fb.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv40_fb.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv40_fb.c 2011-02-22 14:16:21.596230155 +0100 +@@ -505,7 +516,7 @@ + + if (dev_priv->card_type == NV_50) { + if (status & 0x00000010) { +- nv50_fb_vm_trap(dev, 1, "PFIFO_BAR_FAULT"); ++ nv50_fb_vm_trap(dev, nouveau_ratelimit()); + status &= ~0x00000010; + nv_wr32(dev, 0x002100, 0x00000010); + } +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv40_fb.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c 2011-03-09 18:30:58.000000000 +0100 @@ -24,6 +24,53 @@ } } @@ -2564,9 +2768,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6/drivers/ switch (dev_priv->chipset) { case 0x40: -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6/drivers/gpu/drm/nouveau/nv50_crtc.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_crtc.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_crtc.c 2011-02-22 14:16:21.598230115 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_crtc.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2011-03-09 18:30:58.000000000 +0100 @@ -65,7 +65,7 @@ { struct drm_device *dev = nv_crtc->base.dev; @@ -2865,9 +3069,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6/driver if (!ret) { ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); if (!ret) -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_cursor.c linux-2.6/drivers/gpu/drm/nouveau/nv50_cursor.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_cursor.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_cursor.c 2011-02-22 14:16:21.598230115 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_cursor.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_cursor.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_cursor.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_cursor.c 2011-03-09 18:30:58.000000000 +0100 @@ -36,9 +36,9 @@ static void nv50_cursor_show(struct nouveau_crtc *nv_crtc, bool update) @@ -2892,9 +3096,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_cursor.c linux-2.6/driv int ret; NV_DEBUG_KMS(dev, "\n"); -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_dac.c linux-2.6/drivers/gpu/drm/nouveau/nv50_dac.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_dac.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_dac.c 2011-02-22 14:16:21.599230095 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_dac.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_dac.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_dac.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_dac.c 2011-03-09 18:30:58.000000000 +0100 @@ -41,8 +41,7 @@ { struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); @@ -2915,9 +3119,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_dac.c linux-2.6/drivers struct nouveau_crtc *crtc = nouveau_crtc(encoder->crtc); uint32_t mode_ctl = 0, mode_ctl2 = 0; int ret; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6/drivers/gpu/drm/nouveau/nv50_display.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_display.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_display.c 2011-02-22 14:16:21.599230095 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_display.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_display.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2011-03-09 18:30:58.000000000 +0100 @@ -24,6 +24,7 @@ * */ @@ -3260,9 +3464,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6/dri delayed |= clock; intr1 &= ~clock; } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_display.h linux-2.6/drivers/gpu/drm/nouveau/nv50_display.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_display.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_display.h 2011-02-22 14:16:21.599230095 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_display.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_display.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_display.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_display.h 2011-03-09 18:30:58.000000000 +0100 @@ -35,7 +35,36 @@ #include "nouveau_crtc.h" #include "nv50_evo.h" @@ -3317,9 +3521,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_display.h linux-2.6/dri + u64 base, u64 size, struct nouveau_gpuobj **); + #endif /* __NV50_DISPLAY_H__ */ -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6/drivers/gpu/drm/nouveau/nv50_evo.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_evo.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_evo.c 2011-02-22 14:16:21.599230095 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_evo.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2011-03-09 18:30:58.000000000 +0100 @@ -27,20 +27,17 @@ #include "nouveau_drv.h" #include "nouveau_dma.h" @@ -3736,9 +3940,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6/drivers + + nv50_evo_destroy(dev); } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6/drivers/gpu/drm/nouveau/nv50_evo.h ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_evo.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_evo.h 2011-02-22 14:16:21.600230075 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_evo.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h 2011-03-09 18:30:58.000000000 +0100 @@ -27,12 +27,6 @@ #ifndef __NV50_EVO_H__ #define __NV50_EVO_H__ @@ -3760,9 +3964,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6/drivers +#define NV50_EVO_CRTC_UNK904 0x00000904 #endif -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6/drivers/gpu/drm/nouveau/nv50_fb.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_fb.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_fb.c 2011-02-22 14:16:21.600230075 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_fb.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c 2011-03-09 18:30:58.000000000 +0100 @@ -8,31 +8,61 @@ dma_addr_t r100c08; }; @@ -3829,29 +4033,198 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6/drivers/ return 0; } -@@ -81,18 +111,7 @@ +@@ -81,26 +111,112 @@ void nv50_fb_takedown(struct drm_device *dev) { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nv50_fb_priv *priv; -- ++ nv50_fb_destroy(dev); ++} + - priv = dev_priv->engine.fb.priv; - if (!priv) - return; - dev_priv->engine.fb.priv = NULL; -- ++static struct nouveau_enum vm_dispatch_subclients[] = { ++ { 0x00000000, "GRCTX", NULL }, ++ { 0x00000001, "NOTIFY", NULL }, ++ { 0x00000002, "QUERY", NULL }, ++ { 0x00000003, "COND", NULL }, ++ { 0x00000004, "M2M_IN", NULL }, ++ { 0x00000005, "M2M_OUT", NULL }, ++ { 0x00000006, "M2M_NOTIFY", NULL }, ++ {} ++}; + - pci_unmap_page(dev->pdev, priv->r100c08, PAGE_SIZE, - PCI_DMA_BIDIRECTIONAL); - __free_page(priv->r100c08_page); - kfree(priv); -+ nv50_fb_destroy(dev); - } +-} ++static struct nouveau_enum vm_ccache_subclients[] = { ++ { 0x00000000, "CB", NULL }, ++ { 0x00000001, "TIC", NULL }, ++ { 0x00000002, "TSC", NULL }, ++ {} ++}; ++ ++static struct nouveau_enum vm_prop_subclients[] = { ++ { 0x00000000, "RT0", NULL }, ++ { 0x00000001, "RT1", NULL }, ++ { 0x00000002, "RT2", NULL }, ++ { 0x00000003, "RT3", NULL }, ++ { 0x00000004, "RT4", NULL }, ++ { 0x00000005, "RT5", NULL }, ++ { 0x00000006, "RT6", NULL }, ++ { 0x00000007, "RT7", NULL }, ++ { 0x00000008, "ZETA", NULL }, ++ { 0x00000009, "LOCAL", NULL }, ++ { 0x0000000a, "GLOBAL", NULL }, ++ { 0x0000000b, "STACK", NULL }, ++ { 0x0000000c, "DST2D", NULL }, ++ {} ++}; ++ ++static struct nouveau_enum vm_pfifo_subclients[] = { ++ { 0x00000000, "PUSHBUF", NULL }, ++ { 0x00000001, "SEMAPHORE", NULL }, ++ {} ++}; ++ ++static struct nouveau_enum vm_bar_subclients[] = { ++ { 0x00000000, "FB", NULL }, ++ { 0x00000001, "IN", NULL }, ++ {} ++}; ++ ++static struct nouveau_enum vm_client[] = { ++ { 0x00000000, "STRMOUT", NULL }, ++ { 0x00000003, "DISPATCH", vm_dispatch_subclients }, ++ { 0x00000004, "PFIFO_WRITE", NULL }, ++ { 0x00000005, "CCACHE", vm_ccache_subclients }, ++ { 0x00000006, "PPPP", NULL }, ++ { 0x00000007, "CLIPID", NULL }, ++ { 0x00000008, "PFIFO_READ", NULL }, ++ { 0x00000009, "VFETCH", NULL }, ++ { 0x0000000a, "TEXTURE", NULL }, ++ { 0x0000000b, "PROP", vm_prop_subclients }, ++ { 0x0000000c, "PVP", NULL }, ++ { 0x0000000d, "PBSP", NULL }, ++ { 0x0000000e, "PCRYPT", NULL }, ++ { 0x0000000f, "PCOUNTER", NULL }, ++ { 0x00000011, "PDAEMON", NULL }, ++ {} ++}; ++ ++static struct nouveau_enum vm_engine[] = { ++ { 0x00000000, "PGRAPH", NULL }, ++ { 0x00000001, "PVP", NULL }, ++ { 0x00000004, "PEEPHOLE", NULL }, ++ { 0x00000005, "PFIFO", vm_pfifo_subclients }, ++ { 0x00000006, "BAR", vm_bar_subclients }, ++ { 0x00000008, "PPPP", NULL }, ++ { 0x00000009, "PBSP", NULL }, ++ { 0x0000000a, "PCRYPT", NULL }, ++ { 0x0000000b, "PCOUNTER", NULL }, ++ { 0x0000000c, "SEMAPHORE_BG", NULL }, ++ { 0x0000000d, "PCOPY", NULL }, ++ { 0x0000000e, "PDAEMON", NULL }, ++ {} ++}; ++ ++static struct nouveau_enum vm_fault[] = { ++ { 0x00000000, "PT_NOT_PRESENT", NULL }, ++ { 0x00000001, "PT_TOO_SHORT", NULL }, ++ { 0x00000002, "PAGE_NOT_PRESENT", NULL }, ++ { 0x00000003, "PAGE_SYSTEM_ONLY", NULL }, ++ { 0x00000004, "PAGE_READ_ONLY", NULL }, ++ { 0x00000006, "NULL_DMAOBJ", NULL }, ++ { 0x00000007, "WRONG_MEMTYPE", NULL }, ++ { 0x0000000b, "VRAM_LIMIT", NULL }, ++ { 0x0000000f, "DMAOBJ_LIMIT", NULL }, ++ {} ++}; void -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6/drivers/gpu/drm/nouveau/nv50_fifo.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_fifo.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_fifo.c 2011-02-22 14:16:21.600230075 +0100 +-nv50_fb_vm_trap(struct drm_device *dev, int display, const char *name) ++nv50_fb_vm_trap(struct drm_device *dev, int display) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ const struct nouveau_enum *en, *cl; + unsigned long flags; + u32 trap[6], idx, chinst; ++ u8 st0, st1, st2, st3; + int i, ch; + + idx = nv_rd32(dev, 0x100c90); +@@ -117,8 +233,8 @@ + if (!display) + return; + ++ /* lookup channel id */ + chinst = (trap[2] << 16) | trap[1]; +- + spin_lock_irqsave(&dev_priv->channels.lock, flags); + for (ch = 0; ch < dev_priv->engine.fifo.channels; ch++) { + struct nouveau_channel *chan = dev_priv->channels.ptr[ch]; +@@ -131,9 +247,48 @@ + } + spin_unlock_irqrestore(&dev_priv->channels.lock, flags); + +- NV_INFO(dev, "%s - VM: Trapped %s at %02x%04x%04x status %08x " +- "channel %d (0x%08x)\n", +- name, (trap[5] & 0x100 ? "read" : "write"), +- trap[5] & 0xff, trap[4] & 0xffff, trap[3] & 0xffff, +- trap[0], ch, chinst); ++ /* decode status bits into something more useful */ ++ if (dev_priv->chipset < 0xa3 || ++ dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) { ++ st0 = (trap[0] & 0x0000000f) >> 0; ++ st1 = (trap[0] & 0x000000f0) >> 4; ++ st2 = (trap[0] & 0x00000f00) >> 8; ++ st3 = (trap[0] & 0x0000f000) >> 12; ++ } else { ++ st0 = (trap[0] & 0x000000ff) >> 0; ++ st1 = (trap[0] & 0x0000ff00) >> 8; ++ st2 = (trap[0] & 0x00ff0000) >> 16; ++ st3 = (trap[0] & 0xff000000) >> 24; ++ } ++ ++ NV_INFO(dev, "VM: trapped %s at 0x%02x%04x%04x on ch %d [0x%08x] ", ++ (trap[5] & 0x00000100) ? "read" : "write", ++ trap[5] & 0xff, trap[4] & 0xffff, trap[3] & 0xffff, ch, chinst); ++ ++ en = nouveau_enum_find(vm_engine, st0); ++ if (en) ++ printk("%s/", en->name); ++ else ++ printk("%02x/", st0); ++ ++ cl = nouveau_enum_find(vm_client, st2); ++ if (cl) ++ printk("%s/", cl->name); ++ else ++ printk("%02x/", st2); ++ ++ if (cl && cl->data) cl = nouveau_enum_find(cl->data, st3); ++ else if (en && en->data) cl = nouveau_enum_find(en->data, st3); ++ else cl = NULL; ++ if (cl) ++ printk("%s", cl->name); ++ else ++ printk("%02x", st3); ++ ++ printk(" reason: "); ++ en = nouveau_enum_find(vm_fault, st1); ++ if (en) ++ printk("%s\n", en->name); ++ else ++ printk("0x%08x\n", st1); + } +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_fifo.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c 2011-03-09 18:30:58.000000000 +0100 @@ -149,6 +149,7 @@ nv_wr32(dev, 0x3204, 0); nv_wr32(dev, 0x3210, 0); @@ -3869,9 +4242,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6/driver nv_wo32(ramfc, 0x60, 0x7fffffff); nv_wo32(ramfc, 0x40, 0x00000000); nv_wo32(ramfc, 0x7c, 0x30000001); -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_gpio.c linux-2.6/drivers/gpu/drm/nouveau/nv50_gpio.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_gpio.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_gpio.c 2011-02-22 14:16:21.600230075 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_gpio.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_gpio.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c 2011-03-09 18:30:58.000000000 +0100 @@ -137,6 +137,7 @@ struct nv50_gpio_priv *priv = pgpio->priv; struct nv50_gpio_handler *gpioh, *tmp; @@ -3922,10 +4295,73 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_gpio.c linux-2.6/driver } spin_unlock(&priv->lock); } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6/drivers/gpu/drm/nouveau/nv50_graph.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_graph.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_graph.c 2011-02-22 14:16:21.601230054 +0100 -@@ -409,12 +409,7 @@ +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_graph.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c 2011-03-09 18:30:58.000000000 +0100 +@@ -95,13 +95,41 @@ + } + + static void +-nv50_graph_init_regs(struct drm_device *dev) ++nv50_graph_init_zcull(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int i; ++ + NV_DEBUG(dev, "\n"); + +- nv_wr32(dev, NV04_PGRAPH_DEBUG_3, +- (1 << 2) /* HW_CONTEXT_SWITCH_ENABLED */); +- nv_wr32(dev, 0x402ca8, 0x800); ++ switch (dev_priv->chipset & 0xf0) { ++ case 0x50: ++ case 0x80: ++ case 0x90: ++ nv_wr32(dev, 0x402ca8, 0x00000800); ++ break; ++ case 0xa0: ++ default: ++ nv_wr32(dev, 0x402cc0, 0x00000000); ++ if (dev_priv->chipset == 0xa0 || ++ dev_priv->chipset == 0xaa || ++ dev_priv->chipset == 0xac) { ++ nv_wr32(dev, 0x402ca8, 0x00000802); ++ } else { ++ nv_wr32(dev, 0x402cc0, 0x00000000); ++ nv_wr32(dev, 0x402ca8, 0x00000002); ++ } ++ ++ break; ++ } ++ ++ /* zero out zcull regions */ ++ for (i = 0; i < 8; i++) { ++ nv_wr32(dev, 0x402c20 + (i * 8), 0x00000000); ++ nv_wr32(dev, 0x402c24 + (i * 8), 0x00000000); ++ nv_wr32(dev, 0x402c28 + (i * 8), 0x00000000); ++ nv_wr32(dev, 0x402c2c + (i * 8), 0x00000000); ++ } + } + + static int +@@ -136,6 +164,7 @@ + } + kfree(cp); + ++ nv_wr32(dev, 0x40008c, 0x00000004); /* HW_CTX_SWITCH_ENABLED */ + nv_wr32(dev, 0x400320, 4); + nv_wr32(dev, NV40_PGRAPH_CTXCTL_CUR, 0); + nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_POINTER, 0); +@@ -151,7 +180,7 @@ + + nv50_graph_init_reset(dev); + nv50_graph_init_regs__nv(dev); +- nv50_graph_init_regs(dev); ++ nv50_graph_init_zcull(dev); + + ret = nv50_graph_init_ctxctl(dev); + if (ret) +@@ -409,12 +438,7 @@ nv50_graph_nvsw_mthd_page_flip(struct nouveau_channel *chan, u32 class, u32 mthd, u32 data) { @@ -3939,7 +4375,129 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6/drive return 0; } -@@ -912,10 +907,10 @@ +@@ -526,11 +550,11 @@ + + static struct nouveau_enum nv50_mp_exec_error_names[] = + { +- { 3, "STACK_UNDERFLOW" }, +- { 4, "QUADON_ACTIVE" }, +- { 8, "TIMEOUT" }, +- { 0x10, "INVALID_OPCODE" }, +- { 0x40, "BREAKPOINT" }, ++ { 3, "STACK_UNDERFLOW", NULL }, ++ { 4, "QUADON_ACTIVE", NULL }, ++ { 8, "TIMEOUT", NULL }, ++ { 0x10, "INVALID_OPCODE", NULL }, ++ { 0x40, "BREAKPOINT", NULL }, + {} + }; + +@@ -558,47 +582,47 @@ + + /* There must be a *lot* of these. Will take some time to gather them up. */ + struct nouveau_enum nv50_data_error_names[] = { +- { 0x00000003, "INVALID_QUERY_OR_TEXTURE" }, +- { 0x00000004, "INVALID_VALUE" }, +- { 0x00000005, "INVALID_ENUM" }, +- { 0x00000008, "INVALID_OBJECT" }, +- { 0x00000009, "READ_ONLY_OBJECT" }, +- { 0x0000000a, "SUPERVISOR_OBJECT" }, +- { 0x0000000b, "INVALID_ADDRESS_ALIGNMENT" }, +- { 0x0000000c, "INVALID_BITFIELD" }, +- { 0x0000000d, "BEGIN_END_ACTIVE" }, +- { 0x0000000e, "SEMANTIC_COLOR_BACK_OVER_LIMIT" }, +- { 0x0000000f, "VIEWPORT_ID_NEEDS_GP" }, +- { 0x00000010, "RT_DOUBLE_BIND" }, +- { 0x00000011, "RT_TYPES_MISMATCH" }, +- { 0x00000012, "RT_LINEAR_WITH_ZETA" }, +- { 0x00000015, "FP_TOO_FEW_REGS" }, +- { 0x00000016, "ZETA_FORMAT_CSAA_MISMATCH" }, +- { 0x00000017, "RT_LINEAR_WITH_MSAA" }, +- { 0x00000018, "FP_INTERPOLANT_START_OVER_LIMIT" }, +- { 0x00000019, "SEMANTIC_LAYER_OVER_LIMIT" }, +- { 0x0000001a, "RT_INVALID_ALIGNMENT" }, +- { 0x0000001b, "SAMPLER_OVER_LIMIT" }, +- { 0x0000001c, "TEXTURE_OVER_LIMIT" }, +- { 0x0000001e, "GP_TOO_MANY_OUTPUTS" }, +- { 0x0000001f, "RT_BPP128_WITH_MS8" }, +- { 0x00000021, "Z_OUT_OF_BOUNDS" }, +- { 0x00000023, "XY_OUT_OF_BOUNDS" }, +- { 0x00000027, "CP_MORE_PARAMS_THAN_SHARED" }, +- { 0x00000028, "CP_NO_REG_SPACE_STRIPED" }, +- { 0x00000029, "CP_NO_REG_SPACE_PACKED" }, +- { 0x0000002a, "CP_NOT_ENOUGH_WARPS" }, +- { 0x0000002b, "CP_BLOCK_SIZE_MISMATCH" }, +- { 0x0000002c, "CP_NOT_ENOUGH_LOCAL_WARPS" }, +- { 0x0000002d, "CP_NOT_ENOUGH_STACK_WARPS" }, +- { 0x0000002e, "CP_NO_BLOCKDIM_LATCH" }, +- { 0x00000031, "ENG2D_FORMAT_MISMATCH" }, +- { 0x0000003f, "PRIMITIVE_ID_NEEDS_GP" }, +- { 0x00000044, "SEMANTIC_VIEWPORT_OVER_LIMIT" }, +- { 0x00000045, "SEMANTIC_COLOR_FRONT_OVER_LIMIT" }, +- { 0x00000046, "LAYER_ID_NEEDS_GP" }, +- { 0x00000047, "SEMANTIC_CLIP_OVER_LIMIT" }, +- { 0x00000048, "SEMANTIC_PTSZ_OVER_LIMIT" }, ++ { 0x00000003, "INVALID_QUERY_OR_TEXTURE", NULL }, ++ { 0x00000004, "INVALID_VALUE", NULL }, ++ { 0x00000005, "INVALID_ENUM", NULL }, ++ { 0x00000008, "INVALID_OBJECT", NULL }, ++ { 0x00000009, "READ_ONLY_OBJECT", NULL }, ++ { 0x0000000a, "SUPERVISOR_OBJECT", NULL }, ++ { 0x0000000b, "INVALID_ADDRESS_ALIGNMENT", NULL }, ++ { 0x0000000c, "INVALID_BITFIELD", NULL }, ++ { 0x0000000d, "BEGIN_END_ACTIVE", NULL }, ++ { 0x0000000e, "SEMANTIC_COLOR_BACK_OVER_LIMIT", NULL }, ++ { 0x0000000f, "VIEWPORT_ID_NEEDS_GP", NULL }, ++ { 0x00000010, "RT_DOUBLE_BIND", NULL }, ++ { 0x00000011, "RT_TYPES_MISMATCH", NULL }, ++ { 0x00000012, "RT_LINEAR_WITH_ZETA", NULL }, ++ { 0x00000015, "FP_TOO_FEW_REGS", NULL }, ++ { 0x00000016, "ZETA_FORMAT_CSAA_MISMATCH", NULL }, ++ { 0x00000017, "RT_LINEAR_WITH_MSAA", NULL }, ++ { 0x00000018, "FP_INTERPOLANT_START_OVER_LIMIT", NULL }, ++ { 0x00000019, "SEMANTIC_LAYER_OVER_LIMIT", NULL }, ++ { 0x0000001a, "RT_INVALID_ALIGNMENT", NULL }, ++ { 0x0000001b, "SAMPLER_OVER_LIMIT", NULL }, ++ { 0x0000001c, "TEXTURE_OVER_LIMIT", NULL }, ++ { 0x0000001e, "GP_TOO_MANY_OUTPUTS", NULL }, ++ { 0x0000001f, "RT_BPP128_WITH_MS8", NULL }, ++ { 0x00000021, "Z_OUT_OF_BOUNDS", NULL }, ++ { 0x00000023, "XY_OUT_OF_BOUNDS", NULL }, ++ { 0x00000027, "CP_MORE_PARAMS_THAN_SHARED", NULL }, ++ { 0x00000028, "CP_NO_REG_SPACE_STRIPED", NULL }, ++ { 0x00000029, "CP_NO_REG_SPACE_PACKED", NULL }, ++ { 0x0000002a, "CP_NOT_ENOUGH_WARPS", NULL }, ++ { 0x0000002b, "CP_BLOCK_SIZE_MISMATCH", NULL }, ++ { 0x0000002c, "CP_NOT_ENOUGH_LOCAL_WARPS", NULL }, ++ { 0x0000002d, "CP_NOT_ENOUGH_STACK_WARPS", NULL }, ++ { 0x0000002e, "CP_NO_BLOCKDIM_LATCH", NULL }, ++ { 0x00000031, "ENG2D_FORMAT_MISMATCH", NULL }, ++ { 0x0000003f, "PRIMITIVE_ID_NEEDS_GP", NULL }, ++ { 0x00000044, "SEMANTIC_VIEWPORT_OVER_LIMIT", NULL }, ++ { 0x00000045, "SEMANTIC_COLOR_FRONT_OVER_LIMIT", NULL }, ++ { 0x00000046, "LAYER_ID_NEEDS_GP", NULL }, ++ { 0x00000047, "SEMANTIC_CLIP_OVER_LIMIT", NULL }, ++ { 0x00000048, "SEMANTIC_PTSZ_OVER_LIMIT", NULL }, + {} + }; + +@@ -678,7 +702,6 @@ + tps++; + switch (type) { + case 6: /* texture error... unknown for now */ +- nv50_fb_vm_trap(dev, display, name); + if (display) { + NV_ERROR(dev, "magic set %d:\n", i); + for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4) +@@ -701,7 +724,6 @@ + uint32_t e1c = nv_rd32(dev, ustatus_addr + 0x14); + uint32_t e20 = nv_rd32(dev, ustatus_addr + 0x18); + uint32_t e24 = nv_rd32(dev, ustatus_addr + 0x1c); +- nv50_fb_vm_trap(dev, display, name); + /* 2d engine destination */ + if (ustatus & 0x00000010) { + if (display) { +@@ -912,10 +934,10 @@ printk("\n"); NV_INFO(dev, "PGRAPH - TRAP_CCACHE %08x %08x %08x %08x" " %08x %08x %08x\n", @@ -3954,9 +4512,17 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6/drive } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6/drivers/gpu/drm/nouveau/nv50_instmem.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_instmem.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_instmem.c 2011-02-22 14:16:21.602230033 +0100 +@@ -1044,6 +1066,7 @@ + NV_INFO(dev, "PGRAPH - ch %d (0x%010llx) subc %d " + "class 0x%04x mthd 0x%04x data 0x%08x\n", + chid, inst, subc, class, mthd, data); ++ nv50_fb_vm_trap(dev, 1); + } + } + +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_instmem.c 2011-03-12 22:37:55.428744375 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2011-03-09 18:30:58.000000000 +0100 @@ -300,7 +300,7 @@ } @@ -3966,9 +4532,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6/dri struct nouveau_vma chan_vma; u32 align; }; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_sor.c linux-2.6/drivers/gpu/drm/nouveau/nv50_sor.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_sor.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_sor.c 2011-02-22 14:16:21.603230013 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_sor.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_sor.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_sor.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_sor.c 2011-03-09 18:30:58.000000000 +0100 @@ -41,8 +41,7 @@ { struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); @@ -3989,9 +4555,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_sor.c linux-2.6/drivers struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct drm_device *dev = encoder->dev; struct nouveau_crtc *crtc = nouveau_crtc(encoder->crtc); -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_vm.c linux-2.6/drivers/gpu/drm/nouveau/nv50_vm.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_vm.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_vm.c 2011-02-22 14:16:21.603230013 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_vm.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_vm.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_vm.c 2011-03-12 22:37:55.430744335 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_vm.c 2011-03-09 18:30:58.000000000 +0100 @@ -31,7 +31,6 @@ nv50_vm_map_pgt(struct nouveau_gpuobj *pgd, u32 pde, struct nouveau_gpuobj *pgt[2]) @@ -4055,9 +4621,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_vm.c linux-2.6/drivers/ nv_wo32(pgt, pte + 0, lower_32_bits(phys)); nv_wo32(pgt, pte + 4, upper_32_bits(phys)); pte += 8; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_vram.c linux-2.6/drivers/gpu/drm/nouveau/nv50_vram.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_vram.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nv50_vram.c 2011-02-22 14:16:21.603230013 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_vram.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_vram.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv50_vram.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv50_vram.c 2011-03-09 18:30:58.000000000 +0100 @@ -48,42 +48,49 @@ } @@ -4177,9 +4743,19 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nv50_vram.c linux-2.6/driver return 0; } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_fifo.c linux-2.6/drivers/gpu/drm/nouveau/nvc0_fifo.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_fifo.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nvc0_fifo.c 2011-02-22 14:16:21.604229993 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nv84_crypt.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c 2011-03-09 18:30:58.000000000 +0100 +@@ -136,5 +136,5 @@ + nv_wr32(dev, 0x102130, stat); + nv_wr32(dev, 0x10200c, 0x10); + +- nv50_fb_vm_trap(dev, show, "PCRYPT"); ++ nv50_fb_vm_trap(dev, show); + } +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_fifo.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_fifo.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c 2011-03-09 18:30:58.000000000 +0100 @@ -116,7 +116,7 @@ /* allocate vram for control regs, map into polling area */ @@ -4220,9 +4796,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_fifo.c linux-2.6/driver - - nv_wr32(dev, 0x2140, 0); } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_graph.c linux-2.6/drivers/gpu/drm/nouveau/nvc0_graph.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_graph.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nvc0_graph.c 2011-02-22 14:16:21.604229993 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_graph.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_graph.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_graph.c 2011-03-09 18:30:58.000000000 +0100 @@ -299,6 +299,14 @@ } @@ -4278,9 +4854,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_graph.c linux-2.6/drive nv_wr32(dev, 0x400100, 0x00000010); stat &= ~0x00000010; } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_vm.c linux-2.6/drivers/gpu/drm/nouveau/nvc0_vm.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_vm.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nvc0_vm.c 2011-02-22 14:16:21.606229953 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_vm.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_vm.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_vm.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_vm.c 2011-03-09 18:30:58.000000000 +0100 @@ -59,7 +59,7 @@ void @@ -4304,9 +4880,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_vm.c linux-2.6/drivers/ nv_wo32(pgt, pte + 0, lower_32_bits(phys)); nv_wo32(pgt, pte + 4, upper_32_bits(phys)); pte += 8; -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_vram.c linux-2.6/drivers/gpu/drm/nouveau/nvc0_vram.c ---- linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_vram.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/nouveau/nvc0_vram.c 2011-02-22 14:16:21.606229953 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_vram.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_vram.c +--- linux-2.6.38-rc7/drivers/gpu/drm/nouveau/nvc0_vram.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/nouveau/nvc0_vram.c 2011-03-09 18:30:58.000000000 +0100 @@ -26,64 +26,78 @@ #include "nouveau_drv.h" #include "nouveau_mm.h" @@ -4410,9 +4986,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/nouveau/nvc0_vram.c linux-2.6/driver return 0; } -diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6/drivers/gpu/drm/ttm/ttm_bo.c ---- linux-2.6.38-rc5/drivers/gpu/drm/ttm/ttm_bo.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/drivers/gpu/drm/ttm/ttm_bo.c 2011-02-22 14:16:21.822225582 +0100 +diff -Naur linux-2.6.38-rc7/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.38-rc7.nouveau/drivers/gpu/drm/ttm/ttm_bo.c +--- linux-2.6.38-rc7/drivers/gpu/drm/ttm/ttm_bo.c 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/drivers/gpu/drm/ttm/ttm_bo.c 2011-03-09 18:30:58.000000000 +0100 @@ -406,11 +406,12 @@ } @@ -4427,9 +5003,9 @@ diff -Naur linux-2.6.38-rc5/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6/drivers/gpu/d } if (bdev->driver->move_notify) -diff -Naur linux-2.6.38-rc5/include/drm/nouveau_drm.h linux-2.6/include/drm/nouveau_drm.h ---- linux-2.6.38-rc5/include/drm/nouveau_drm.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6/include/drm/nouveau_drm.h 2011-02-22 14:16:28.891082551 +0100 +diff -Naur linux-2.6.38-rc7/include/drm/nouveau_drm.h linux-2.6.38-rc7.nouveau/include/drm/nouveau_drm.h +--- linux-2.6.38-rc7/include/drm/nouveau_drm.h 2011-03-01 22:55:12.000000000 +0100 ++++ linux-2.6.38-rc7.nouveau/include/drm/nouveau_drm.h 2011-03-09 18:30:58.000000000 +0100 @@ -94,6 +94,7 @@ #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)