diff --git a/packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101023.diff b/packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101024.diff similarity index 98% rename from packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101023.diff rename to packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101024.diff index 3c783b7b4f..88eef980aa 100644 --- a/packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101023.diff +++ b/packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101024.diff @@ -1,6 +1,6 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/Kconfig linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Kconfig --- linux-2.6.36/drivers/gpu/drm/nouveau/Kconfig 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Kconfig 2010-10-24 22:05:10.712404390 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Kconfig 2010-10-25 03:27:16.000000000 +0200 @@ -10,6 +10,7 @@ select FB select FRAMEBUFFER_CONSOLE if !EMBEDDED @@ -11,7 +11,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/Kconfig linux-2.6.36.nouveau/dri diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/Makefile linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Makefile --- linux-2.6.36/drivers/gpu/drm/nouveau/Makefile 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Makefile 2010-10-24 22:05:10.712404390 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Makefile 2010-10-25 03:27:16.000000000 +0200 @@ -9,7 +9,8 @@ nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o \ nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \ @@ -42,7 +42,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/Makefile linux-2.6.36.nouveau/dr nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_acpi.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_acpi.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_acpi.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_acpi.c 2010-10-24 22:05:10.719404464 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_acpi.c 2010-10-25 03:27:16.000000000 +0200 @@ -292,6 +292,6 @@ if (ret < 0) return ret; @@ -53,7 +53,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_acpi.c linux-2.6.36.nouv } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-10-24 22:05:10.723404508 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-10-25 03:27:16.000000000 +0200 @@ -43,9 +43,6 @@ #define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, ##arg) #define LOG_OLD_VALUE(x) @@ -603,7 +603,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.36.nouv if (ret) diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.h 2010-10-24 22:05:10.726404540 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.h 2010-10-25 03:27:16.000000000 +0200 @@ -34,6 +34,20 @@ #define DCB_LOC_ON_CHIP 0 @@ -674,7 +674,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.h linux-2.6.36.nouv diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-10-24 22:05:10.727404551 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-10-25 03:27:16.000000000 +0200 @@ -36,21 +36,6 @@ #include #include @@ -1208,7 +1208,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.36.nouvea .io_mem_free = &nouveau_ttm_io_mem_free, diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_calc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_calc.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_calc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_calc.c 2010-10-24 22:05:10.729404571 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_calc.c 2010-10-25 03:27:16.000000000 +0200 @@ -198,8 +198,8 @@ struct drm_nouveau_private *dev_priv = dev->dev_private; struct nv_fifo_info fifo_data; @@ -1248,7 +1248,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_calc.c linux-2.6.36.nouv static int diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-10-24 22:05:10.729404572 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-10-25 03:27:16.000000000 +0200 @@ -48,14 +48,14 @@ dev_priv->gart_info.aper_size, NV_DMA_ACCESS_RO, &pushbuf, @@ -1754,7 +1754,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6.36.n int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls); diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-10-24 22:05:19.498498260 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-10-25 03:27:16.000000000 +0200 @@ -76,6 +76,22 @@ return NULL; } @@ -1990,7 +1990,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.c linux-2.6.36 return dcb->drm; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-10-24 22:05:10.732404603 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-10-25 03:27:16.000000000 +0200 @@ -52,7 +52,7 @@ struct drm_connector * nouveau_connector_create(struct drm_device *, int index); @@ -2003,7 +2003,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.h linux-2.6.36 #endif /* __NOUVEAU_CONNECTOR_H__ */ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_debugfs.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_debugfs.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_debugfs.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_debugfs.c 2010-10-24 22:05:10.732404603 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_debugfs.c 2010-10-25 03:27:16.000000000 +0200 @@ -157,7 +157,23 @@ return 0; } @@ -2030,7 +2030,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_debugfs.c linux-2.6.36.n { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL }, diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_display.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c 2010-10-24 22:05:10.733404613 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c 2010-10-25 03:27:16.000000000 +0200 @@ -29,6 +29,9 @@ #include "nouveau_drv.h" #include "nouveau_fb.h" @@ -2251,7 +2251,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6.36.n +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c 2010-10-24 22:05:10.734404624 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c 2010-10-25 03:27:16.000000000 +0200 @@ -28,6 +28,7 @@ #include "drm.h" #include "nouveau_drv.h" @@ -2328,7 +2328,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.c linux-2.6.36.nouve return 0; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.h 2010-10-24 22:05:10.734404624 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.h 2010-10-25 03:27:16.000000000 +0200 @@ -72,6 +72,7 @@ NvGdiRect = 0x8000000c, NvImageBlit = 0x8000000d, @@ -2339,7 +2339,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.h linux-2.6.36.nouve NvEvoVRAM = 0x01000000, diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-10-24 22:05:10.735404635 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-10-25 03:27:16.000000000 +0200 @@ -317,7 +317,8 @@ return false; @@ -2376,7 +2376,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.36.nouvea ret = -EBUSY; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-10-24 22:05:10.736404646 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-10-25 03:27:16.000000000 +0200 @@ -31,13 +31,14 @@ #include "nouveau_hw.h" #include "nouveau_fb.h" @@ -2504,7 +2504,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.c linux-2.6.36.nouve } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-10-24 22:05:10.738404668 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-10-25 03:27:16.000000000 +0200 @@ -96,10 +96,12 @@ struct nouveau_tile_reg *tile; @@ -2672,10 +2672,12 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve bool (*cache_pull)(struct drm_device *dev, bool enable); int (*channel_id)(struct drm_device *); -@@ -316,25 +329,13 @@ +@@ -314,27 +327,16 @@ + void (*destroy_context)(struct nouveau_channel *); + int (*load_context)(struct nouveau_channel *); int (*unload_context)(struct drm_device *); - }; - +-}; +- -struct nouveau_pgraph_object_method { - int id; - int (*exec)(struct nouveau_channel *chan, int grclass, int mthd, @@ -2686,8 +2688,9 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve - int id; - bool software; - struct nouveau_pgraph_object_method *methods; --}; -- ++ void (*tlb_flush)(struct drm_device *dev); + }; + struct nouveau_pgraph_engine { - struct nouveau_pgraph_object_class *grclass; bool accel_blocked; @@ -2700,7 +2703,15 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve int (*init)(struct drm_device *); void (*takedown)(struct drm_device *); -@@ -369,6 +370,101 @@ +@@ -346,6 +348,7 @@ + void (*destroy_context)(struct nouveau_channel *); + int (*load_context)(struct nouveau_channel *); + int (*unload_context)(struct drm_device *); ++ void (*tlb_flush)(struct drm_device *dev); + + void (*set_region_tiling)(struct drm_device *dev, int i, uint32_t addr, + uint32_t size, uint32_t pitch); +@@ -369,6 +372,102 @@ void (*irq_enable)(struct drm_device *, enum dcb_gpio_tag, bool on); }; @@ -2797,12 +2808,13 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve + void (*takedown)(struct drm_device *); + int (*create_context)(struct nouveau_channel *); + void (*destroy_context)(struct nouveau_channel *); ++ void (*tlb_flush)(struct drm_device *dev); +}; + struct nouveau_engine { struct nouveau_instmem_engine instmem; struct nouveau_mc_engine mc; -@@ -378,6 +474,8 @@ +@@ -378,6 +477,8 @@ struct nouveau_fifo_engine fifo; struct nouveau_display_engine display; struct nouveau_gpio_engine gpio; @@ -2811,7 +2823,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve }; struct nouveau_pll_vals { -@@ -409,13 +507,13 @@ +@@ -409,13 +510,13 @@ }; struct nv04_crtc_reg { @@ -2827,7 +2839,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve /* PCRTC regs */ uint32_t fb_start; -@@ -463,43 +561,9 @@ +@@ -463,43 +564,9 @@ }; struct nv04_mode_state { @@ -2872,7 +2884,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve }; enum nouveau_card_type { -@@ -522,11 +586,20 @@ +@@ -522,11 +589,20 @@ int flags; void __iomem *mmio; @@ -2894,7 +2906,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve struct workqueue_struct *wq; struct work_struct irq_work; struct work_struct hpd_work; -@@ -540,8 +613,16 @@ +@@ -540,8 +616,16 @@ atomic_t validate_sequence; } ttm; @@ -2913,7 +2925,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve struct nouveau_engine engine; struct nouveau_channel *channel; -@@ -550,15 +631,11 @@ +@@ -550,15 +634,11 @@ spinlock_t context_switch_lock; /* RAMIN configuration, RAMFC, RAMHT and RAMRO offsets */ @@ -2933,7 +2945,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve struct { enum { -@@ -576,14 +653,12 @@ +@@ -576,14 +656,12 @@ } gart_info; /* nv10-nv40 tiling regions */ @@ -2950,7 +2962,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve uint64_t fb_phys; uint64_t fb_available_size; -@@ -600,10 +675,6 @@ +@@ -600,10 +678,6 @@ struct nouveau_gpuobj *vm_vram_pt[NV50_VM_VRAM_NR]; int vm_vram_pt_nr; @@ -2961,7 +2973,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve struct nvbios vbios; struct nv04_mode_state mode_reg; -@@ -619,6 +690,7 @@ +@@ -619,6 +693,7 @@ struct backlight_device *backlight; struct nouveau_channel *evo; @@ -2969,7 +2981,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve struct { struct dcb_entry *dcb; u16 script; -@@ -634,6 +706,12 @@ +@@ -634,6 +709,12 @@ }; static inline struct drm_nouveau_private * @@ -2982,7 +2994,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve nouveau_bdev(struct ttm_bo_device *bd) { return container_of(bd, struct drm_nouveau_private, ttm.bdev); -@@ -658,18 +736,8 @@ +@@ -658,18 +739,8 @@ return 0; } @@ -3002,7 +3014,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern int nouveau_duallink; extern int nouveau_uscript_lvds; extern int nouveau_uscript_tmds; -@@ -683,7 +751,11 @@ +@@ -683,7 +754,11 @@ extern int nouveau_ignorelid; extern int nouveau_nofbaccel; extern int nouveau_noaccel; @@ -3014,7 +3026,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); extern int nouveau_pci_resume(struct pci_dev *pdev); -@@ -704,8 +776,10 @@ +@@ -704,8 +779,10 @@ extern int nouveau_card_init(struct drm_device *); /* nouveau_mem.c */ @@ -3027,7 +3039,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve 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 *); -@@ -737,46 +811,54 @@ +@@ -737,46 +814,54 @@ extern struct drm_ioctl_desc nouveau_ioctls[]; extern int nouveau_max_ioctl; extern void nouveau_channel_cleanup(struct drm_device *, struct drm_file *); @@ -3104,7 +3116,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern int nouveau_gpuobj_dma_new(struct nouveau_channel *, int class, uint64_t offset, uint64_t size, int access, int target, struct nouveau_gpuobj **); -@@ -786,14 +868,14 @@ +@@ -786,14 +871,14 @@ uint32_t *o_ret); extern int nouveau_gpuobj_gr_new(struct nouveau_channel *, int class, struct nouveau_gpuobj **); @@ -3121,7 +3133,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern irqreturn_t nouveau_irq_handler(DRM_IRQ_ARGS); extern void nouveau_irq_preinstall(struct drm_device *); extern int nouveau_irq_postinstall(struct drm_device *); -@@ -879,6 +961,7 @@ +@@ -879,6 +964,7 @@ enum dcb_gpio_tag); extern struct dcb_connector_table_entry * nouveau_bios_connector_entry(struct drm_device *, int index); @@ -3129,7 +3141,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern int get_pll_limits(struct drm_device *, uint32_t limit_match, struct pll_lims *); extern int nouveau_bios_run_display_table(struct drm_device *, -@@ -925,6 +1008,10 @@ +@@ -925,6 +1011,10 @@ extern void nv40_fb_takedown(struct drm_device *); extern void nv40_fb_set_region_tiling(struct drm_device *, int, uint32_t, uint32_t, uint32_t); @@ -3140,7 +3152,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve /* nv50_fb.c */ extern int nv50_fb_init(struct drm_device *); -@@ -939,7 +1026,6 @@ +@@ -939,7 +1029,6 @@ 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); @@ -3148,7 +3160,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern bool nv04_fifo_cache_pull(struct drm_device *, bool); extern int nv04_fifo_channel_id(struct drm_device *); extern int nv04_fifo_create_context(struct nouveau_channel *); -@@ -951,14 +1037,12 @@ +@@ -951,14 +1040,12 @@ extern int nv10_fifo_init(struct drm_device *); extern int nv10_fifo_channel_id(struct drm_device *); extern int nv10_fifo_create_context(struct nouveau_channel *); @@ -3163,7 +3175,15 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern int nv40_fifo_load_context(struct nouveau_channel *); extern int nv40_fifo_unload_context(struct drm_device *); -@@ -977,7 +1061,6 @@ +@@ -970,6 +1057,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 *); ++extern void nv50_fifo_tlb_flush(struct drm_device *dev); + + /* nvc0_fifo.c */ + extern int nvc0_fifo_init(struct drm_device *); +@@ -977,7 +1065,6 @@ extern void nvc0_fifo_disable(struct drm_device *); extern void nvc0_fifo_enable(struct drm_device *); extern bool nvc0_fifo_reassign(struct drm_device *, bool); @@ -3171,7 +3191,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern bool nvc0_fifo_cache_pull(struct drm_device *, bool); extern int nvc0_fifo_channel_id(struct drm_device *); extern int nvc0_fifo_create_context(struct nouveau_channel *); -@@ -986,7 +1069,6 @@ +@@ -986,7 +1073,6 @@ extern int nvc0_fifo_unload_context(struct drm_device *); /* nv04_graph.c */ @@ -3179,7 +3199,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve 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); -@@ -996,9 +1078,10 @@ +@@ -996,9 +1082,10 @@ extern int nv04_graph_load_context(struct nouveau_channel *); extern int nv04_graph_unload_context(struct drm_device *); extern void nv04_graph_context_switch(struct drm_device *); @@ -3191,7 +3211,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve 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 *); -@@ -1011,8 +1094,6 @@ +@@ -1011,8 +1098,6 @@ uint32_t, uint32_t); /* nv20_graph.c */ @@ -3200,7 +3220,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve 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 *); -@@ -1024,7 +1105,6 @@ +@@ -1024,7 +1109,6 @@ uint32_t, uint32_t); /* nv40_graph.c */ @@ -3208,7 +3228,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve 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 *); -@@ -1037,7 +1117,6 @@ +@@ -1037,7 +1121,6 @@ uint32_t, uint32_t); /* nv50_graph.c */ @@ -3216,7 +3236,16 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve 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); -@@ -1059,13 +1138,19 @@ +@@ -1048,6 +1131,8 @@ + extern int nv50_graph_unload_context(struct drm_device *); + extern void nv50_graph_context_switch(struct drm_device *); + extern int nv50_grctx_init(struct nouveau_grctx *); ++extern void nv50_graph_tlb_flush(struct drm_device *dev); ++extern void nv86_graph_tlb_flush(struct drm_device *dev); + + /* nvc0_graph.c */ + extern int nvc0_graph_init(struct drm_device *); +@@ -1059,13 +1144,20 @@ extern int nvc0_graph_load_context(struct nouveau_channel *); extern int nvc0_graph_unload_context(struct drm_device *); @@ -3225,6 +3254,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve +extern void nv84_crypt_fini(struct drm_device *dev); +extern int nv84_crypt_create_context(struct nouveau_channel *); +extern void nv84_crypt_destroy_context(struct nouveau_channel *); ++extern void nv84_crypt_tlb_flush(struct drm_device *dev); + /* nv04_instmem.c */ extern int nv04_instmem_init(struct drm_device *); @@ -3237,7 +3267,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern void nv04_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); extern int nv04_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); extern int nv04_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); -@@ -1077,7 +1162,7 @@ +@@ -1077,7 +1169,7 @@ extern int nv50_instmem_suspend(struct drm_device *); extern void nv50_instmem_resume(struct drm_device *); extern int nv50_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, @@ -3246,7 +3276,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern void nv50_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); extern int nv50_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); extern int nv50_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); -@@ -1091,7 +1176,7 @@ +@@ -1091,7 +1183,7 @@ extern int nvc0_instmem_suspend(struct drm_device *); extern void nvc0_instmem_resume(struct drm_device *); extern int nvc0_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, @@ -3255,7 +3285,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve extern void nvc0_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); extern int nvc0_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); extern int nvc0_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); -@@ -1165,22 +1250,51 @@ +@@ -1165,22 +1257,51 @@ 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); @@ -3315,7 +3345,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve /* nouveau_gem.c */ extern int nouveau_gem_new(struct drm_device *, struct nouveau_channel *, -@@ -1200,6 +1314,14 @@ +@@ -1200,6 +1321,14 @@ extern int nouveau_gem_ioctl_info(struct drm_device *, void *, struct drm_file *); @@ -3330,7 +3360,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve /* nv10_gpio.c */ int nv10_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); int nv10_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state); -@@ -1255,12 +1377,11 @@ +@@ -1255,12 +1384,11 @@ iowrite32_native(val, dev_priv->mmio + reg); } @@ -3346,7 +3376,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve } static inline u8 nv_rd08(struct drm_device *dev, unsigned reg) -@@ -1275,7 +1396,7 @@ +@@ -1275,7 +1403,7 @@ iowrite8(val, dev_priv->mmio + reg); } @@ -3355,7 +3385,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve nouveau_wait_until(dev, 2000000000ULL, (reg), (mask), (val)) /* PRAMIN access */ -@@ -1292,17 +1413,8 @@ +@@ -1292,17 +1420,8 @@ } /* object access */ @@ -3375,7 +3405,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve /* * Logging -@@ -1403,9 +1515,11 @@ +@@ -1403,9 +1522,11 @@ #define NV_SW_SEMAPHORE_OFFSET 0x00000064 #define NV_SW_SEMAPHORE_ACQUIRE 0x00000068 #define NV_SW_SEMAPHORE_RELEASE 0x0000006c @@ -3389,7 +3419,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouve #endif /* __NOUVEAU_DRV_H__ */ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_encoder.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_encoder.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_encoder.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_encoder.h 2010-10-24 22:05:10.739404678 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_encoder.h 2010-10-25 03:27:16.000000000 +0200 @@ -55,6 +55,7 @@ int dpcd_version; int link_nr; @@ -3400,7 +3430,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_encoder.h linux-2.6.36.n }; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-10-24 22:05:10.741404698 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-10-25 03:27:16.000000000 +0200 @@ -49,6 +49,96 @@ #include "nouveau_fbcon.h" #include "nouveau_dma.h" @@ -3620,7 +3650,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.36.nou diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-10-24 22:05:10.741404698 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-10-25 03:27:16.000000000 +0200 @@ -40,13 +40,13 @@ void nouveau_fbcon_restore(void); @@ -3643,7 +3673,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.h linux-2.6.36.nou void nouveau_fbcon_gpu_lockup(struct fb_info *info); diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-10-24 22:05:10.743404720 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-10-25 03:27:16.000000000 +0200 @@ -28,9 +28,11 @@ #include "drm.h" @@ -4141,7 +4171,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.36.nou +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-10-24 22:05:10.744404731 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-10-25 03:27:16.000000000 +0200 @@ -48,9 +48,6 @@ return; nvbo->gem = NULL; @@ -4492,7 +4522,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.36.nouve int diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_grctx.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_grctx.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_grctx.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_grctx.h 2010-10-24 22:05:10.745404742 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_grctx.h 2010-10-25 03:27:16.000000000 +0200 @@ -126,7 +126,7 @@ reg = (reg - 0x00400000) / 4; reg = (reg - ctx->ctxprog_reg) + ctx->ctxvals_base; @@ -4504,7 +4534,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_grctx.h linux-2.6.36.nou diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-10-24 22:05:10.748404775 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-10-25 03:27:16.000000000 +0200 @@ -305,7 +305,7 @@ bool mpll = Preg == 0x4020; uint32_t oldPval = nvReadMC(dev, Preg); @@ -4656,7 +4686,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.c linux-2.6.36.nouvea diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-10-24 22:05:10.749404785 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-10-25 03:27:16.000000000 +0200 @@ -416,6 +416,25 @@ } @@ -4685,7 +4715,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.h linux-2.6.36.nouvea struct drm_nouveau_private *dev_priv = dev->dev_private; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-10-24 22:05:10.750404795 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-10-25 03:27:16.000000000 +0200 @@ -299,7 +299,10 @@ int @@ -4710,7 +4740,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.c linux-2.6.36.nouve } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.h 2010-10-24 22:05:10.751404805 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.h 2010-10-25 03:27:16.000000000 +0200 @@ -44,7 +44,10 @@ struct nouveau_i2c_chan *nouveau_i2c_find(struct drm_device *, int index); bool nouveau_probe_i2c_addr(struct nouveau_i2c_chan *i2c, int addr); @@ -4725,7 +4755,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.h linux-2.6.36.nouve diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_irq.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-10-24 22:05:10.753404826 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-10-25 03:27:16.000000000 +0200 @@ -35,12 +35,20 @@ #include "nouveau_drm.h" #include "nouveau_drv.h" @@ -5267,7 +5297,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_irq.c linux-2.6.36.nouve +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-10-24 22:05:10.755404848 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-10-25 03:27:16.000000000 +0200 @@ -33,7 +33,9 @@ #include "drmP.h" #include "drm.h" @@ -5346,7 +5376,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve return found; } -@@ -169,8 +169,9 @@ +@@ -169,16 +169,17 @@ virt += (end - pte); while (pte < end) { @@ -5358,7 +5388,18 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve } } } -@@ -203,8 +204,10 @@ + dev_priv->engine.instmem.flush(dev); + +- nv50_vm_flush(dev, 5); +- nv50_vm_flush(dev, 0); +- nv50_vm_flush(dev, 4); ++ dev_priv->engine.instmem.flush(dev); ++ dev_priv->engine.fifo.tlb_flush(dev); ++ dev_priv->engine.graph.tlb_flush(dev); + nv50_vm_flush(dev, 6); + return 0; + } +@@ -203,14 +204,15 @@ pages -= (end - pte); virt += (end - pte) << 15; @@ -5369,9 +5410,18 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve + pte++; + } } - dev_priv->engine.instmem.flush(dev); +- dev_priv->engine.instmem.flush(dev); -@@ -218,7 +221,7 @@ +- nv50_vm_flush(dev, 5); +- nv50_vm_flush(dev, 0); +- nv50_vm_flush(dev, 4); ++ dev_priv->engine.instmem.flush(dev); ++ dev_priv->engine.fifo.tlb_flush(dev); ++ dev_priv->engine.graph.tlb_flush(dev); + nv50_vm_flush(dev, 6); + } + +@@ -218,7 +220,7 @@ * Cleanup everything */ void @@ -5380,7 +5430,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve { struct drm_nouveau_private *dev_priv = dev->dev_private; -@@ -229,6 +232,19 @@ +@@ -229,6 +231,19 @@ nouveau_ttm_global_release(dev_priv); @@ -5400,7 +5450,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve if (drm_core_has_AGP(dev) && dev->agp) { struct drm_agp_mem *entry, *tempe; -@@ -248,13 +264,6 @@ +@@ -248,13 +263,6 @@ dev->agp->acquired = 0; dev->agp->enabled = 0; } @@ -5414,7 +5464,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve } static uint32_t -@@ -305,8 +314,62 @@ +@@ -305,8 +313,62 @@ return 0; } @@ -5479,7 +5529,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve nouveau_mem_detect(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; -@@ -325,9 +388,18 @@ +@@ -325,9 +387,18 @@ dev_priv->vram_size = nv_rd32(dev, NV04_PFB_FIFO_DATA); dev_priv->vram_size |= (dev_priv->vram_size & 0xff) << 32; dev_priv->vram_size &= 0xffffffff00ll; @@ -5499,7 +5549,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve } } else { dev_priv->vram_size = nv_rd32(dev, 0x10f20c) << 20; -@@ -345,6 +417,33 @@ +@@ -345,6 +416,33 @@ return -ENOMEM; } @@ -5533,7 +5583,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve int nouveau_mem_reset_agp(struct drm_device *dev) { -@@ -355,7 +454,8 @@ +@@ -355,7 +453,8 @@ /* First of all, disable fast writes, otherwise if it's * already enabled in the AGP bridge and we disable the card's * AGP controller we might be locking ourselves out of it. */ @@ -5543,7 +5593,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve struct drm_agp_info info; struct drm_agp_mode mode; -@@ -363,7 +463,7 @@ +@@ -363,7 +462,7 @@ if (ret) return ret; @@ -5552,7 +5602,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve ret = drm_agp_enable(dev, mode); if (ret) return ret; -@@ -418,7 +518,7 @@ +@@ -418,7 +517,7 @@ } /* see agp.h for the AGPSTAT_* modes available */ @@ -5561,7 +5611,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve ret = drm_agp_enable(dev, mode); if (ret) { NV_ERROR(dev, "Unable to enable AGP: %d\n", ret); -@@ -433,24 +533,27 @@ +@@ -433,24 +532,27 @@ } int @@ -5586,18 +5636,18 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve - if (ret) { - NV_ERROR(dev, "Error setting DMA mask: %d\n", ret); + if (ret) -+ return ret; + return ret; +- } + + ret = nouveau_mem_detect(dev); + if (ret) - return ret; -- } ++ return ret; + + dev_priv->fb_phys = pci_resource_start(dev->pdev, 1); ret = nouveau_ttm_global_init(dev_priv); if (ret) -@@ -465,8 +568,6 @@ +@@ -465,8 +567,6 @@ return ret; } @@ -5606,7 +5656,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve dev_priv->fb_available_size = dev_priv->vram_size; dev_priv->fb_mappable_pages = dev_priv->fb_available_size; if (dev_priv->fb_mappable_pages > pci_resource_len(dev->pdev, 1)) -@@ -474,7 +575,16 @@ +@@ -474,7 +574,16 @@ pci_resource_len(dev->pdev, 1); dev_priv->fb_mappable_pages >>= PAGE_SHIFT; @@ -5624,7 +5674,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve dev_priv->fb_available_size -= dev_priv->ramin_rsvd_vram; dev_priv->fb_aper_free = dev_priv->fb_available_size; -@@ -495,9 +605,23 @@ +@@ -495,9 +604,23 @@ nouveau_bo_ref(NULL, &dev_priv->vga_ram); } @@ -5650,7 +5700,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve ret = nouveau_mem_init_agp(dev); if (ret) NV_ERROR(dev, "Error initialising AGP: %d\n", ret); -@@ -523,11 +647,150 @@ +@@ -523,11 +646,150 @@ return ret; } @@ -5695,12 +5745,12 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve + NV_DEBUG(dev, "BMP version too old for memory\n"); + return; + } -+ + + if (!mem) { + NV_DEBUG(dev, "memory timing table pointer invalid\n"); + return; + } - ++ + if (mem[0] != 0x10) { + NV_WARN(dev, "memory timing table 0x%02x unknown\n", mem[0]); + return; @@ -5807,7 +5857,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouve +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-10-24 22:05:10.756404859 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-10-25 03:27:16.000000000 +0200 @@ -28,6 +28,7 @@ #include "drmP.h" #include "drm.h" @@ -5859,7 +5909,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6.36. } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_object.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2010-10-24 22:05:10.759404891 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2010-10-25 03:27:16.000000000 +0200 @@ -34,6 +34,84 @@ #include "drm.h" #include "nouveau_drv.h" @@ -7203,7 +7253,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.36.no } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_perf.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_perf.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_perf.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_perf.c 2010-10-24 22:05:10.760404901 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_perf.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,205 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -7412,7 +7462,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_perf.c linux-2.6.36.nouv +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-10-24 22:05:10.761404911 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,548 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -7964,7 +8014,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.c linux-2.6.36.nouvea +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.h 2010-10-24 22:05:10.761404911 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.h 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,74 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -8042,7 +8092,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.h linux-2.6.36.nouvea +#endif diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-10-24 22:05:10.762404922 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,307 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -8353,7 +8403,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.36.nou +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-10-24 22:05:10.763404933 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,55 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -8412,7 +8462,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.h linux-2.6.36.nou +#endif diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-10-24 22:05:10.764404944 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-10-25 03:27:16.000000000 +0200 @@ -332,6 +332,7 @@ #define NV04_PGRAPH_BSWIZZLE5 0x004006A0 #define NV03_PGRAPH_STATUS 0x004006B0 @@ -8525,7 +8575,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.36.nouve #define NV50_PDISPLAY_CRTC_CLK_CTRL1(i) ((i) * 0x800 + 0x614100) diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-10-24 22:05:10.766404966 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-10-25 03:27:16.000000000 +0200 @@ -95,9 +95,9 @@ struct nouveau_gpuobj *gpuobj = dev_priv->gart_info.sg_ctxdma; unsigned i, j, pte; @@ -8557,6 +8607,17 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.36.nou } dma_offset += NV_CTXDMA_PAGE_SIZE; +@@ -118,8 +120,8 @@ + dev_priv->engine.instmem.flush(nvbe->dev); + + if (dev_priv->card_type == NV_50) { +- nv50_vm_flush(dev, 5); /* PGRAPH */ +- nv50_vm_flush(dev, 0); /* PFIFO */ ++ dev_priv->engine.fifo.tlb_flush(dev); ++ dev_priv->engine.graph.tlb_flush(dev); + } + + nvbe->bound = true; @@ -145,11 +147,13 @@ dma_addr_t dma_offset = dev_priv->gart_info.sg_dummy_bus; @@ -8576,6 +8637,17 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.36.nou } dma_offset += NV_CTXDMA_PAGE_SIZE; +@@ -158,8 +162,8 @@ + dev_priv->engine.instmem.flush(nvbe->dev); + + if (dev_priv->card_type == NV_50) { +- nv50_vm_flush(dev, 5); +- nv50_vm_flush(dev, 0); ++ dev_priv->engine.fifo.tlb_flush(dev); ++ dev_priv->engine.graph.tlb_flush(dev); + } + + nvbe->bound = false; @@ -220,7 +224,11 @@ int i, ret; @@ -8679,7 +8751,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.36.nou diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2010-10-24 22:05:10.767404977 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2010-10-25 03:27:16.000000000 +0200 @@ -35,6 +35,8 @@ #include "nouveau_drv.h" #include "nouveau_drm.h" @@ -8862,7 +8934,31 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou engine->graph.init = nv50_graph_init; engine->graph.takedown = nv50_graph_takedown; engine->graph.fifo_access = nv50_graph_fifo_access; -@@ -358,6 +379,50 @@ +@@ -337,6 +358,15 @@ + engine->graph.destroy_context = nv50_graph_destroy_context; + engine->graph.load_context = nv50_graph_load_context; + engine->graph.unload_context = nv50_graph_unload_context; ++ if (dev_priv->chipset != 0x86) ++ engine->graph.tlb_flush = nv50_graph_tlb_flush; ++ else { ++ /* from what i can see nvidia do this on every ++ * pre-NVA3 board except NVAC, but, we've only ++ * ever seen problems on NV86 ++ */ ++ engine->graph.tlb_flush = nv86_graph_tlb_flush; ++ } + engine->fifo.channels = 128; + engine->fifo.init = nv50_fifo_init; + engine->fifo.takedown = nv50_fifo_takedown; +@@ -348,6 +378,7 @@ + engine->fifo.destroy_context = nv50_fifo_destroy_context; + engine->fifo.load_context = nv50_fifo_load_context; + engine->fifo.unload_context = nv50_fifo_unload_context; ++ engine->fifo.tlb_flush = nv50_fifo_tlb_flush; + engine->display.early_init = nv50_display_early_init; + engine->display.late_takedown = nv50_display_late_takedown; + engine->display.create = nv50_display_create; +@@ -358,6 +389,50 @@ engine->gpio.get = nv50_gpio_get; engine->gpio.set = nv50_gpio_set; engine->gpio.irq_enable = nv50_gpio_irq_enable; @@ -8913,7 +9009,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou break; case 0xC0: engine->instmem.init = nvc0_instmem_init; -@@ -376,7 +441,6 @@ +@@ -376,7 +451,6 @@ engine->timer.takedown = nv04_timer_takedown; engine->fb.init = nvc0_fb_init; engine->fb.takedown = nvc0_fb_takedown; @@ -8921,7 +9017,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou engine->graph.init = nvc0_graph_init; engine->graph.takedown = nvc0_graph_takedown; engine->graph.fifo_access = nvc0_graph_fifo_access; -@@ -406,6 +470,8 @@ +@@ -406,6 +480,8 @@ engine->gpio.get = nv50_gpio_get; engine->gpio.set = nv50_gpio_set; engine->gpio.irq_enable = nv50_gpio_irq_enable; @@ -8930,7 +9026,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou break; default: NV_ERROR(dev, "NV%02x unsupported\n", dev_priv->chipset); -@@ -437,16 +503,14 @@ +@@ -437,16 +513,14 @@ nouveau_card_init_channel(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; @@ -8949,7 +9045,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou 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, -@@ -454,28 +518,27 @@ +@@ -454,28 +528,27 @@ if (ret) goto out_err; @@ -8985,7 +9081,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou return ret; } -@@ -522,6 +585,7 @@ +@@ -522,6 +595,7 @@ if (ret) goto out; engine = &dev_priv->engine; @@ -8993,7 +9089,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou spin_lock_init(&dev_priv->context_switch_lock); /* Make the CRTCs and I2C buses accessible */ -@@ -534,35 +598,28 @@ +@@ -534,35 +608,28 @@ if (ret) goto out_display_early; @@ -9037,7 +9133,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou /* PGPIO */ ret = engine->gpio.init(dev); -@@ -587,33 +644,39 @@ +@@ -587,33 +654,39 @@ if (ret) goto out_fb; @@ -9086,7 +9182,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou } ret = nouveau_backlight_init(dev); -@@ -624,13 +687,19 @@ +@@ -624,13 +697,19 @@ drm_kms_helper_poll_init(dev); return 0; @@ -9108,7 +9204,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou out_graph: if (!nouveau_noaccel) engine->graph.takedown(dev); -@@ -642,16 +711,16 @@ +@@ -642,16 +721,16 @@ engine->gpio.takedown(dev); out_mc: engine->mc.takedown(dev); @@ -9132,7 +9228,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou nouveau_bios_takedown(dev); out_display_early: engine->display.late_takedown(dev); -@@ -667,13 +736,14 @@ +@@ -667,13 +746,14 @@ nouveau_backlight_exit(dev); @@ -9150,7 +9246,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou engine->graph.takedown(dev); } engine->fb.takedown(dev); -@@ -686,15 +756,16 @@ +@@ -686,15 +766,16 @@ ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_TT); mutex_unlock(&dev->struct_mutex); @@ -9172,7 +9268,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou nouveau_bios_takedown(dev); vga_client_register(dev->pdev, NULL, NULL, NULL); -@@ -1006,6 +1077,12 @@ +@@ -1006,6 +1087,12 @@ case NOUVEAU_GETPARAM_PTIMER_TIME: getparam->value = dev_priv->engine.timer.read(dev); break; @@ -9185,7 +9281,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou 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 -@@ -1016,7 +1093,7 @@ +@@ -1016,7 +1103,7 @@ } /* FALLTHRU */ default: @@ -9194,7 +9290,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou return -EINVAL; } -@@ -1031,7 +1108,7 @@ +@@ -1031,7 +1118,7 @@ switch (setparam->param) { default: @@ -9203,7 +9299,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou return -EINVAL; } -@@ -1057,7 +1134,13 @@ +@@ -1057,7 +1144,13 @@ /* Waits for PGRAPH to go completely idle */ bool nouveau_wait_for_idle(struct drm_device *dev) { @@ -9220,7 +9316,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nou return false; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_temp.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c 2010-10-24 22:05:10.769404997 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,309 @@ +/* + * Copyright 2010 PathScale inc. @@ -9533,7 +9629,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6.36.nouv +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_volt.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_volt.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_volt.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_volt.c 2010-10-24 22:05:10.769404998 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_volt.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,212 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -9749,7 +9845,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_volt.c linux-2.6.36.nouv +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-10-24 22:05:10.770405008 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-10-25 03:27:16.000000000 +0200 @@ -109,7 +109,7 @@ struct nouveau_pll_vals *pv = ®p->pllvals; struct pll_lims pll_lim; @@ -9826,7 +9922,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.36.nouveau diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dac.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dac.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dac.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dac.c 2010-10-24 22:05:10.772405028 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dac.c 2010-10-25 03:27:16.000000000 +0200 @@ -291,6 +291,8 @@ msleep(5); @@ -9861,7 +9957,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dac.c linux-2.6.36.nouveau/ struct drm_display_mode *adjusted_mode) diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dfp.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-10-24 22:05:10.773405039 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-10-25 03:27:16.000000000 +0200 @@ -104,6 +104,8 @@ } /* don't inadvertently turn it on when state written later */ @@ -9945,7 +10041,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dfp.c linux-2.6.36.nouveau/ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fbcon.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-10-24 22:05:10.773405039 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-10-25 03:27:16.000000000 +0200 @@ -25,54 +25,42 @@ #include "drmP.h" #include "nouveau_drv.h" @@ -10095,7 +10191,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fbcon.c linux-2.6.36.nouvea int diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-10-24 22:05:10.774405050 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-10-25 03:27:16.000000000 +0200 @@ -27,8 +27,9 @@ #include "drmP.h" #include "drm.h" @@ -10263,7 +10359,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.36.nouveau } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c 2010-10-24 22:05:10.776405072 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c 2010-10-25 03:27:16.000000000 +0200 @@ -26,6 +26,9 @@ #include "drm.h" #include "nouveau_drm.h" @@ -11027,7 +11123,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_graph.c linux-2.6.36.nouvea - diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_instmem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-10-24 22:05:10.777405083 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-10-25 03:27:16.000000000 +0200 @@ -1,6 +1,7 @@ #include "drmP.h" #include "drm.h" @@ -11226,7 +11322,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_instmem.c linux-2.6.36.nouv diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c 2010-10-24 22:05:10.778405094 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,81 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -11311,7 +11407,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_pm.c linux-2.6.36.nouveau/d + diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_tv.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_tv.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_tv.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_tv.c 2010-10-24 22:05:10.778405094 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_tv.c 2010-10-25 03:27:16.000000000 +0200 @@ -49,8 +49,8 @@ int nv04_tv_identify(struct drm_device *dev, int i2c_index) @@ -11340,7 +11436,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_tv.c linux-2.6.36.nouveau/d state->CRTC[NV_CIO_CRE_LCD__INDEX]); diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv10_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-10-24 22:05:10.779405104 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-10-25 03:27:16.000000000 +0200 @@ -27,8 +27,9 @@ #include "drmP.h" #include "drm.h" @@ -11419,7 +11515,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv10_fifo.c linux-2.6.36.nouveau } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv10_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv10_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c 2010-10-24 22:05:10.781405124 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c 2010-10-25 03:27:16.000000000 +0200 @@ -27,6 +27,8 @@ #include "nouveau_drm.h" #include "nouveau_drv.h" @@ -11602,7 +11698,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv10_graph.c linux-2.6.36.nouvea +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.c 2010-10-24 22:05:10.782405135 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.c 2010-10-25 03:27:16.000000000 +0200 @@ -193,55 +193,56 @@ } } @@ -11765,7 +11861,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.c linux-2.6.36.nouveau/d dacclk = (NVReadRAMDAC(dev, 0, dacclk_off) & ~0x30) | 0x1; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.h 2010-10-24 22:05:10.783405146 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.h 2010-10-25 03:27:16.000000000 +0200 @@ -127,7 +127,8 @@ /* TV hardware access functions */ @@ -11803,7 +11899,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.h linux-2.6.36.nouveau/d #endif diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv_modes.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv_modes.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv_modes.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv_modes.c 2010-10-24 22:05:10.784405157 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv_modes.c 2010-10-25 03:27:16.000000000 +0200 @@ -336,12 +336,17 @@ struct filter_params *p = &fparams[k][j]; @@ -11897,7 +11993,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv_modes.c linux-2.6.36.nou regs->fp_horiz_regs[FP_VALID_END] = output_mode->hdisplay - hmargin - 1; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv20_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv20_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c 2010-10-24 22:05:10.787405190 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c 2010-10-25 03:27:16.000000000 +0200 @@ -32,54 +32,57 @@ #define NV34_GRCTX_SIZE (18140) #define NV35_36_GRCTX_SIZE (22396) @@ -12746,7 +12842,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv20_graph.c linux-2.6.36.nouvea +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-10-24 22:05:10.790405221 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-10-25 03:27:16.000000000 +0200 @@ -27,8 +27,9 @@ #include "drmP.h" #include "nouveau_drv.h" @@ -12837,7 +12933,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_fifo.c linux-2.6.36.nouveau } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv40_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c 2010-10-24 22:05:10.791405231 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c 2010-10-25 03:27:16.000000000 +0200 @@ -29,6 +29,8 @@ #include "nouveau_drv.h" #include "nouveau_grctx.h" @@ -13003,7 +13099,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_graph.c linux-2.6.36.nouvea +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_grctx.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_grctx.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv40_grctx.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_grctx.c 2010-10-24 22:05:10.793405252 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_grctx.c 2010-10-25 03:27:16.000000000 +0200 @@ -596,13 +596,13 @@ offset += 0x0280/4; @@ -13023,7 +13119,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_grctx.c linux-2.6.36.nouvea diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_calc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_calc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c 2010-10-24 22:05:10.794405263 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c 2010-10-25 03:27:16.000000000 +0200 @@ -51,24 +51,28 @@ int *N, int *fN, int *M, int *P) { @@ -13061,7 +13157,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_calc.c linux-2.6.36.nouveau /* *N = floor(fb_div); */ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-10-24 22:05:10.797405296 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-10-25 03:27:16.000000000 +0200 @@ -104,8 +104,7 @@ OUT_RING(evo, nv_crtc->lut.depth == 8 ? NV50_EVO_CRTC_CLUT_MODE_OFF : @@ -13173,7 +13269,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.36.nouveau diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_cursor.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_cursor.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_cursor.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_cursor.c 2010-10-24 22:05:10.797405296 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_cursor.c 2010-10-25 03:27:16.000000000 +0200 @@ -147,7 +147,7 @@ NV_DEBUG_KMS(dev, "\n"); @@ -13185,7 +13281,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_cursor.c linux-2.6.36.nouve NV_ERROR(dev, "CURSOR_CTRL2 = 0x%08x\n", diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_dac.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_dac.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_dac.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_dac.c 2010-10-24 22:05:10.798405307 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_dac.c 2010-10-25 03:27:16.000000000 +0200 @@ -79,7 +79,7 @@ nv_wr32(dev, NV50_PDISPLAY_DAC_DPMS_CTRL(or), @@ -13206,7 +13302,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_dac.c linux-2.6.36.nouveau/ NV_ERROR(dev, "DAC_DPMS_CTRL(%d) = 0x%08x\n", or, diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_display.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_display.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2010-10-24 22:05:10.799405317 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2010-10-25 03:27:16.000000000 +0200 @@ -30,154 +30,20 @@ #include "nouveau_connector.h" #include "nouveau_fb.h" @@ -13747,7 +13843,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.36.nouv if (intr1 & NV50_PDISPLAY_INTR_1_VBLANK_CRTC) { diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2010-10-24 22:05:10.801405337 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,318 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -14069,7 +14165,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.36.nouveau/ +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h 2010-10-24 22:05:10.801405337 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h 2010-10-25 03:27:16.000000000 +0200 @@ -24,6 +24,15 @@ * */ @@ -14093,7 +14189,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.36.nouveau/ +#endif diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fb.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c 2010-10-24 22:05:10.802405348 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c 2010-10-25 03:27:16.000000000 +0200 @@ -20,6 +20,7 @@ case 0x50: nv_wr32(dev, 0x100c90, 0x0707ff); @@ -14151,7 +14247,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.36.nouveau/d +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-10-24 22:05:10.803405359 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-10-25 03:27:16.000000000 +0200 @@ -1,28 +1,21 @@ #include "drmP.h" #include "nouveau_drv.h" @@ -14298,7 +14394,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-2.6.36.nouvea diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-10-24 22:05:10.804405370 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-10-25 03:27:16.000000000 +0200 @@ -27,13 +27,14 @@ #include "drmP.h" #include "drm.h" @@ -14756,9 +14852,18 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.36.nouveau } dev_priv->engine.instmem.flush(dev); +@@ -464,3 +482,8 @@ + return 0; + } + ++void ++nv50_fifo_tlb_flush(struct drm_device *dev) ++{ ++ nv50_vm_flush(dev, 5); ++} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c 2010-10-24 22:05:10.805405381 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c 2010-10-25 03:27:16.000000000 +0200 @@ -27,8 +27,12 @@ #include "drmP.h" #include "drm.h" @@ -14959,7 +15064,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.36.nouvea { struct drm_device *dev = chan->dev; struct drm_nouveau_private *dev_priv = dev->dev_private; -@@ -369,37 +386,69 @@ +@@ -369,37 +386,121 @@ if (!chan->nvsw.vblsem || chan->nvsw.vblsem_offset == ~0 || data > 1) return -EINVAL; @@ -15058,9 +15163,61 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.36.nouvea + dev_priv->engine.graph.registered = true; + return 0; +} ++ ++void ++nv50_graph_tlb_flush(struct drm_device *dev) ++{ ++ nv50_vm_flush(dev, 0); ++} ++ ++void ++nv86_graph_tlb_flush(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; ++ bool idle, timeout = false; ++ unsigned long flags; ++ u64 start; ++ u32 tmp; ++ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ nv_mask(dev, 0x400500, 0x00000001, 0x00000000); ++ ++ start = ptimer->read(dev); ++ do { ++ idle = true; ++ ++ for (tmp = nv_rd32(dev, 0x400380); tmp && idle; tmp >>= 3) { ++ if ((tmp & 7) == 1) ++ idle = false; ++ } ++ ++ for (tmp = nv_rd32(dev, 0x400384); tmp && idle; tmp >>= 3) { ++ if ((tmp & 7) == 1) ++ idle = false; ++ } ++ ++ for (tmp = nv_rd32(dev, 0x400388); tmp && idle; tmp >>= 3) { ++ if ((tmp & 7) == 1) ++ idle = false; ++ } ++ } while (!idle && !(timeout = ptimer->read(dev) - start > 2000000000)); ++ ++ if (timeout) { ++ NV_ERROR(dev, "PGRAPH TLB flush idle timeout fail: " ++ "0x%08x 0x%08x 0x%08x 0x%08x\n", ++ nv_rd32(dev, 0x400700), nv_rd32(dev, 0x400380), ++ nv_rd32(dev, 0x400384), nv_rd32(dev, 0x400388)); ++ } ++ ++ nv50_vm_flush(dev, 0); ++ ++ nv_mask(dev, 0x400500, 0x00000001, 0x00000001); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_grctx.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_grctx.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_grctx.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_grctx.c 2010-10-24 22:05:10.817405509 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_grctx.c 2010-10-25 03:27:16.000000000 +0200 @@ -103,6 +103,9 @@ #include "nouveau_drv.h" #include "nouveau_grctx.h" @@ -18872,7 +19029,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_grctx.c linux-2.6.36.nouvea } diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-10-24 22:05:10.821405549 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-10-25 03:27:16.000000000 +0200 @@ -32,39 +32,87 @@ struct nv50_instmem_priv { uint32_t save1700[5]; /* 0x1700->0x1710 */ @@ -19433,7 +19590,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouv vram |= 1; if (dev_priv->vram_sys_base) { -@@ -449,9 +395,10 @@ +@@ -449,13 +395,13 @@ } while (pte < pte_end) { @@ -19447,7 +19604,11 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouv } dev_priv->engine.instmem.flush(dev); -@@ -472,12 +419,17 @@ +- nv50_vm_flush(dev, 4); + nv50_vm_flush(dev, 6); + + gpuobj->im_bound = 1; +@@ -472,12 +418,17 @@ if (gpuobj->im_bound == 0) return -EINVAL; @@ -19467,7 +19628,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouv } dev_priv->engine.instmem.flush(dev); -@@ -489,7 +441,7 @@ +@@ -489,7 +440,7 @@ nv50_instmem_flush(struct drm_device *dev) { nv_wr32(dev, 0x00330c, 0x00000001); @@ -19476,7 +19637,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouv NV_ERROR(dev, "PRAMIN flush timeout\n"); } -@@ -497,7 +449,7 @@ +@@ -497,7 +448,7 @@ nv84_instmem_flush(struct drm_device *dev) { nv_wr32(dev, 0x070000, 0x00000001); @@ -19485,7 +19646,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouv NV_ERROR(dev, "PRAMIN flush timeout\n"); } -@@ -505,7 +457,7 @@ +@@ -505,7 +456,7 @@ nv50_vm_flush(struct drm_device *dev, int engine) { nv_wr32(dev, 0x100c80, (engine << 16) | 1); @@ -19496,7 +19657,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouv diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_pm.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_pm.c 2010-10-24 22:05:10.822405560 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_pm.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,131 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -19631,7 +19792,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_pm.c linux-2.6.36.nouveau/d + diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_sor.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_sor.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_sor.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_sor.c 2010-10-24 22:05:10.823405571 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_sor.c 2010-10-25 03:27:16.000000000 +0200 @@ -92,7 +92,7 @@ } @@ -19652,8 +19813,8 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_sor.c linux-2.6.36.nouveau/ NV_ERROR(dev, "SOR_DPMS_STATE(%d) = 0x%08x\n", or, diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nv84_crypt.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c 2010-10-24 22:05:10.825405593 +0200 -@@ -0,0 +1,104 @@ ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c 2010-10-25 03:27:16.000000000 +0200 +@@ -0,0 +1,110 @@ +/* + * Copyright 2010 Red Hat Inc. + * @@ -19734,6 +19895,12 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.36.nouvea + nouveau_gpuobj_ref(NULL, &chan->crypt_ctx); +} + ++void ++nv84_crypt_tlb_flush(struct drm_device *dev) ++{ ++ nv50_vm_flush(dev, 0x0a); ++} ++ +int +nv84_crypt_init(struct drm_device *dev) +{ @@ -19760,7 +19927,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.36.nouvea +} diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nva3_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nva3_pm.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nva3_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nva3_pm.c 2010-10-24 22:05:10.826405604 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nva3_pm.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,95 @@ +/* + * Copyright 2010 Red Hat Inc. @@ -19859,7 +20026,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nva3_pm.c linux-2.6.36.nouveau/d + diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c 2010-10-24 22:05:10.826405604 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c 2010-10-25 03:27:16.000000000 +0200 @@ -43,12 +43,6 @@ } @@ -19875,7 +20042,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_fifo.c linux-2.6.36.nouveau return false; diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c --- linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-10-24 22:05:10.827405615 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-10-25 03:27:16.000000000 +0200 @@ -28,7 +28,7 @@ int @@ -19942,7 +20109,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-2.6.36.nouv diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvreg.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvreg.h --- linux-2.6.36/drivers/gpu/drm/nouveau/nvreg.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvreg.h 2010-10-24 22:05:10.828405626 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvreg.h 2010-10-25 03:27:16.000000000 +0200 @@ -153,7 +153,8 @@ #define NV_PCRTC_START 0x00600800 #define NV_PCRTC_CONFIG 0x00600804 @@ -19963,7 +20130,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvreg.h linux-2.6.36.nouveau/dri # define NV_CIO_CRE_ILACE__INDEX 0x39 /* interlace */ diff -Naur linux-2.6.36/drivers/gpu/drm/radeon/radeon_object.c linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_object.c --- linux-2.6.36/drivers/gpu/drm/radeon/radeon_object.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_object.c 2010-10-24 22:05:10.829405637 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_object.c 2010-10-25 03:27:16.000000000 +0200 @@ -435,7 +435,7 @@ out: @@ -19993,7 +20160,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/radeon/radeon_object.c linux-2.6.36.nouv return -EINVAL; diff -Naur linux-2.6.36/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_ttm.c --- linux-2.6.36/drivers/gpu/drm/radeon/radeon_ttm.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_ttm.c 2010-10-24 22:05:10.830405648 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_ttm.c 2010-10-25 03:27:16.000000000 +0200 @@ -152,6 +152,7 @@ man->default_caching = TTM_PL_FLAG_CACHED; break; @@ -20093,7 +20260,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.36.nouveau /* Add ttm page pool to debugfs */ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/Makefile linux-2.6.36.nouveau/drivers/gpu/drm/ttm/Makefile --- linux-2.6.36/drivers/gpu/drm/ttm/Makefile 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/Makefile 2010-10-24 22:05:10.831405658 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/Makefile 2010-10-25 03:27:16.000000000 +0200 @@ -4,6 +4,7 @@ ccflags-y := -Iinclude/drm ttm-y := ttm_agp_backend.o ttm_memory.o ttm_tt.o ttm_bo.o \ @@ -20105,7 +20272,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/Makefile linux-2.6.36.nouveau/driver obj-$(CONFIG_DRM_TTM) += ttm.o diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_agp_backend.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_agp_backend.c --- linux-2.6.36/drivers/gpu/drm/ttm/ttm_agp_backend.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_agp_backend.c 2010-10-24 22:05:10.832405668 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_agp_backend.c 2010-10-25 03:27:16.000000000 +0200 @@ -74,6 +74,7 @@ { struct ttm_agp_backend *agp_be = @@ -20125,7 +20292,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_agp_backend.c linux-2.6.36.nouve diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo.c --- linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-24 22:05:10.833405678 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-25 03:27:16.000000000 +0200 @@ -84,11 +84,8 @@ man->available_caching); printk(KERN_ERR TTM_PFX " default_caching: 0x%08X\n", @@ -20149,7 +20316,15 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver bdev->man[bo->mem.mem_type].gpu_offset; bo->cur_placement = bo->mem.placement; spin_unlock(&bo->lock); -@@ -467,11 +464,7 @@ +@@ -452,6 +449,7 @@ + static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo) + { + struct ttm_bo_global *glob = bo->glob; ++ struct ttm_mem_reg tmp_mem; + + if (bo->ttm) { + +@@ -467,14 +465,14 @@ spin_lock(&glob->lru_lock); } @@ -20157,12 +20332,18 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver - drm_mm_put_block(bo->mem.mm_node); - bo->mem.mm_node = NULL; - } -- -+ ttm_bo_mem_put(bo, &bo->mem); ++ tmp_mem = bo->mem; ++ bo->mem.mm_node = NULL; + atomic_set(&bo->reserved, 0); wake_up_all(&bo->event_queue); spin_unlock(&glob->lru_lock); -@@ -680,7 +673,6 @@ ++ ++ ttm_bo_mem_put(bo, &tmp_mem); + } + + +@@ -680,7 +678,6 @@ bool no_wait_reserve, bool no_wait_gpu) { struct ttm_bo_device *bdev = bo->bdev; @@ -20170,7 +20351,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver struct ttm_mem_reg evict_mem; struct ttm_placement placement; int ret = 0; -@@ -726,12 +718,7 @@ +@@ -726,12 +723,7 @@ if (ret) { if (ret != -ERESTARTSYS) printk(KERN_ERR TTM_PFX "Buffer eviction failed\n"); @@ -20184,7 +20365,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver goto out; } bo->evicted = true; -@@ -792,41 +779,14 @@ +@@ -792,41 +784,14 @@ return ret; } @@ -20198,8 +20379,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver - struct ttm_bo_global *glob = bo->glob; - unsigned long lpfn; - int ret; -+ struct ttm_mem_type_manager *man = &bo->bdev->man[mem->mem_type]; - +- - lpfn = placement->lpfn; - if (!lpfn) - lpfn = man->size; @@ -20208,7 +20388,8 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver - ret = drm_mm_pre_get(&man->manager); - if (unlikely(ret)) - return ret; -- ++ struct ttm_mem_type_manager *man = &bo->bdev->man[mem->mem_type]; + - spin_lock(&glob->lru_lock); - *node = drm_mm_search_free_in_range(&man->manager, - mem->num_pages, mem->page_alignment, @@ -20231,7 +20412,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver /** * Repeatedly evict memory from the LRU for @mem_type until we create enough -@@ -843,14 +803,13 @@ +@@ -843,14 +808,13 @@ struct ttm_bo_device *bdev = bo->bdev; struct ttm_bo_global *glob = bdev->glob; struct ttm_mem_type_manager *man = &bdev->man[mem_type]; @@ -20248,7 +20429,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver break; spin_lock(&glob->lru_lock); if (list_empty(&man->lru)) { -@@ -863,9 +822,8 @@ +@@ -863,9 +827,8 @@ if (unlikely(ret != 0)) return ret; } while (1); @@ -20259,7 +20440,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver mem->mem_type = mem_type; return 0; } -@@ -939,7 +897,6 @@ +@@ -939,7 +902,6 @@ bool type_found = false; bool type_ok = false; bool has_erestartsys = false; @@ -20267,7 +20448,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver int i, ret; mem->mm_node = NULL; -@@ -973,17 +930,15 @@ +@@ -973,17 +935,15 @@ if (man->has_type && man->use_type) { type_found = true; @@ -20288,7 +20469,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver mem->mem_type = mem_type; mem->placement = cur_flags; return 0; -@@ -1053,7 +1008,6 @@ +@@ -1053,7 +1013,6 @@ bool interruptible, bool no_wait_reserve, bool no_wait_gpu) { @@ -20296,7 +20477,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver int ret = 0; struct ttm_mem_reg mem; -@@ -1081,11 +1035,8 @@ +@@ -1081,11 +1040,8 @@ goto out_unlock; ret = ttm_bo_handle_move_mem(bo, &mem, false, interruptible, no_wait_reserve, no_wait_gpu); out_unlock: @@ -20310,7 +20491,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver return ret; } -@@ -1093,11 +1044,10 @@ +@@ -1093,11 +1049,10 @@ struct ttm_mem_reg *mem) { int i; @@ -20325,7 +20506,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver return -1; for (i = 0; i < placement->num_placement; i++) { -@@ -1341,7 +1291,6 @@ +@@ -1341,7 +1296,6 @@ int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type) { @@ -20333,7 +20514,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver struct ttm_mem_type_manager *man; int ret = -EINVAL; -@@ -1364,13 +1313,7 @@ +@@ -1364,13 +1318,7 @@ if (mem_type > 0) { ttm_bo_force_list_clean(bdev, mem_type, false); @@ -20348,7 +20529,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver } return ret; -@@ -1421,6 +1364,7 @@ +@@ -1421,6 +1369,7 @@ ret = bdev->driver->init_mem_type(bdev, type, man); if (ret) return ret; @@ -20356,7 +20537,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver ret = 0; if (type != TTM_PL_SYSTEM) { -@@ -1430,7 +1374,8 @@ +@@ -1430,7 +1379,8 @@ type); return ret; } @@ -20368,7 +20549,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/driver } diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_manager.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_manager.c --- linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_manager.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_manager.c 2010-10-24 22:05:10.835405698 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_manager.c 2010-10-25 03:27:16.000000000 +0200 @@ -0,0 +1,148 @@ +/************************************************************************** + * @@ -20520,7 +20701,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_manager.c linux-2.6.36.nouvea +EXPORT_SYMBOL(ttm_bo_manager_func); diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_util.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_util.c --- linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_util.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_util.c 2010-10-24 22:05:10.835405698 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_util.c 2010-10-25 03:27:16.000000000 +0200 @@ -39,14 +39,7 @@ void ttm_bo_free_old_node(struct ttm_buffer_object *bo) @@ -20549,7 +20730,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_util.c linux-2.6.36.nouveau/d } diff -Naur linux-2.6.36/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c linux-2.6.36.nouveau/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c --- linux-2.6.36/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 2010-10-24 22:05:10.836405709 +0200 ++++ linux-2.6.36.nouveau/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 2010-10-25 03:27:16.000000000 +0200 @@ -147,6 +147,7 @@ break; case TTM_PL_VRAM: @@ -20569,7 +20750,7 @@ diff -Naur linux-2.6.36/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c linux-2.6.36.nouv break; diff -Naur linux-2.6.36/include/drm/nouveau_drm.h linux-2.6.36.nouveau/include/drm/nouveau_drm.h --- linux-2.6.36/include/drm/nouveau_drm.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/include/drm/nouveau_drm.h 2010-10-24 22:05:10.838405731 +0200 ++++ linux-2.6.36.nouveau/include/drm/nouveau_drm.h 2010-10-25 03:27:16.000000000 +0200 @@ -80,6 +80,8 @@ #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 @@ -20602,7 +20783,7 @@ diff -Naur linux-2.6.36/include/drm/nouveau_drm.h linux-2.6.36.nouveau/include/d uint32_t handle; diff -Naur linux-2.6.36/include/drm/ttm/ttm_bo_api.h linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_api.h --- linux-2.6.36/include/drm/ttm/ttm_bo_api.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_api.h 2010-10-24 22:05:10.839405742 +0200 ++++ linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_api.h 2010-10-25 03:27:16.000000000 +0200 @@ -102,7 +102,8 @@ */ @@ -20615,7 +20796,7 @@ diff -Naur linux-2.6.36/include/drm/ttm/ttm_bo_api.h linux-2.6.36.nouveau/includ uint32_t page_alignment; diff -Naur linux-2.6.36/include/drm/ttm/ttm_bo_driver.h linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_driver.h --- linux-2.6.36/include/drm/ttm/ttm_bo_driver.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_driver.h 2010-10-24 22:05:10.841405764 +0200 ++++ linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_driver.h 2010-10-25 03:27:16.000000000 +0200 @@ -203,7 +203,22 @@ * It's set up by the ttm_bo_driver::init_mem_type method. */