aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_mem.c
Commit message (Collapse)AuthorAgeFilesLines
* merge more graphics stuff from 3.2.72Wolfgang Wiedmeyer2015-10-231-228/+175
|
* remove firmware files, merge more uncritical stuff from 3.0.101Wolfgang Wiedmeyer2015-10-231-637/+319
|
* samsung update 1codeworkx2012-06-021-319/+637
|
* drm/nv40: fall back to paged dma object for the momentBen Skeggs2011-06-071-1/+1
| | | | | | | PCI(E)GART isn't quite stable it seems, fall back to old method until I get the time to sort it out properly. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix leak of gart mm nodeBen Skeggs2011-06-071-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Associate memtimings with performance levels on cards <= nv98Martin Peres2011-05-161-1/+2
| | | | | | | v2 (Ben Skeggs): fix ramcfg strap, and remove bogus handling of perf 0x40 Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix a crash at card takedown for NV40 and older cardsJimmy Rentz2011-05-161-2/+0
| | | | | | | | | | | | NV40 and older cards (pre NV50) reserve a vram bo for the vga memory at card init. This bo is then freed at card shutdown. The problem is that the ttm bo vram manager was already freed. So a crash occurs when the vga bo is freed. The fix is to free the vga bo prior to freeing the ttm bo vram manager. There might be other solutions but this seemed the simplest to me. Signed-off-by: Jimmy Rentz <jb17bsome@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: move set_tile_region to nouveau_exec_engineBen Skeggs2011-05-161-3/+5
| | | | | | | In the very least VPE (PMPEG and friends) also has this style of tile region regs, lets make them just work if/when they get added. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: improve memtiming table parsingRoy Spliet2011-05-161-14/+31
| | | | | | | | | | Improves the parsing of the memory timing table on NV50-NV98revA1 chipsets. Added stepping to drm_nouveau_private to make sure newer NV98 (105M) is zero rather than incorrect. Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix missing whitespace checkpatch.pl errors.Emil Velikov2011-05-161-2/+2
| | | | | | | | | This patch fixes messages such as ERROR: space required after that ',' ERROR: spaces required around that '=' Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Fix indentation-related checkpatch.pl error messages.Emil Velikov2011-05-161-7/+7
| | | | | | | | Fix 'ERROR: code indent should use tabs where possible' Fix 'ERROR: space required before the open parenthesis (' Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: fix nv30 pcie boardsBen Skeggs2011-04-201-1/+1
| | | | | | | | Wasn't aware they even existed, apparently they do! They're actually AGP chips with a bridge as far as I can tell, which puts them in the same boat as nv40/nv45. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: correct memtiming table parsing for nv4xRoy Spliet2011-04-051-27/+49
| | | | | | | In line with envytools, verified on 4 or 5 BIOS'es. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
* Merge commit '5359533801e3dd3abca5b7d3d985b0b33fd9fe8b' into drm-core-nextDave Airlie2011-03-161-2/+4
|\ | | | | | | | | | | | | | | | | | | This commit changed an internal radeon structure, that meant a new driver in -next had to be fixed up, merge in the commit and fix up the driver. Also fixes a trivial nouveau merge. Conflicts: drivers/gpu/drm/nouveau/nouveau_mem.c
| * drm/nouveau: fix regression causing ttm to not be able to evict vramBen Skeggs2011-03-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | TTM assumes an error condition from man->func->get_node() means that something went horribly wrong, and causes it to bail. The driver is supposed to return 0, and leave mm_node == NULL to signal that it couldn't allocate any memory. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nv40: attempt to reserve just enough vram for all 32 channelsBen Skeggs2011-03-141-8/+26
| | | | | | | | | | | | | | | | This also makes the fact we're giving 512MiB of GART space to all PCIE boards explicit, although the vast majority (if not all) of them will now have a ramin_rsvd_vram larger than 2MiB anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: support for compressionBen Skeggs2011-02-251-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50-nvc0: delay GART binding until move_notify timeBen Skeggs2011-02-251-0/+81
| | | | | | | | | | | | | | | | The immediate benefit of doing this is that on NV50 and up, the GPU virtual address of any buffer is now constant, regardless of what memtype they're placed in. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: rename nouveau_vram to nouveau_memBen Skeggs2011-02-251-3/+3
| | | | | | | | | | | | This structure will also be used for GART in the near future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50-nvc0: unmap buffers from the vm when they're evictedBen Skeggs2011-02-251-0/+6
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: remove no_vm/mappable flags from nouveau_boBen Skeggs2011-02-251-12/+16
| | | | | | | | | | | | | | | | | | | | 'mappable' isn't really used at all, nor is it necessary anymore as the bo code is capable of moving buffers to mappable vram as required. 'no_vm' isn't necessary anymore either, any places that don't want to be mapped into a GPU address space should allocate the VRAM directly instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv40: support for 39-bit dma addresses on native PCIE chipsetsBen Skeggs2011-02-251-5/+11
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Revert "ttm: Include the 'struct dev' when using the DMA API."Dave Airlie2011-02-231-1/+0
| | | | | | | | | | | | | | | | | | This reverts commit 5a893fc28f0393adb7c885a871b8c59e623fd528. This causes a use after free in the ttm free alloc pages path, when it tries to get the be after the be has been destroyed. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge branch 'stable/ttm.pci-api.v5' of ↵Dave Airlie2011-02-231-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into drm-next * 'stable/ttm.pci-api.v5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: ttm: Include the 'struct dev' when using the DMA API. nouveau/ttm/PCIe: Use dma_addr if TTM has set it. radeon/ttm/PCIe: Use dma_addr if TTM has set it. ttm: Expand (*populate) to support an array of DMA addresses. ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set. ttm: Introduce a placeholder for DMA (bus) addresses.
| * | ttm: Include the 'struct dev' when using the DMA API.Konrad Rzeszutek Wilk2011-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the accounting when using 'debug_dma_dump_mappings()' and CONFIG_DMA_API_DEBUG=y be assigned to the correct device instead of 'fallback'. No functional change - just cosmetic. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* | | drm: rework PCI/platform driver interface.Dave Airlie2011-02-071-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | This abstracts the pci/platform interface out a step further, we can go further but this is far enough for now to allow USB to be plugged in. The drivers now just call the init code directly for their device type. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nouveau: greatly simplify mm, killing some bugs in the processBen Skeggs2011-01-171-16/+10
| | | | | | | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvc0: initial vm implementation, use for bar1/bar3 managementBen Skeggs2010-12-211-3/+0
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvc0: import initial vm backendBen Skeggs2010-12-211-0/+4
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: kick vram functions out into an "engine"Ben Skeggs2010-12-081-21/+26
| | | | | | | | | | | | | | | | | | NVC0 will be able to share some of nv50's paths this way. This also makes it the card-specific vram code responsible for deciding if a given set of tile_flags is valid, rather than duplicating the allowed types in nv50_vram.c and nouveau_gem.c Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: enable non-contig vram allocations where requestedBen Skeggs2010-12-081-1/+5
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: enable 4KiB pages for small vram allocationsBen Skeggs2010-12-081-1/+2
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: implement global channel address space on new VM codeBen Skeggs2010-12-081-94/+0
| | | | | | | | | | | | | | As of this commit, it's guaranteed that if an object is in VRAM that its GPU virtual address will be constant. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: import new vm codeBen Skeggs2010-12-081-2/+3
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: implement custom vram mmBen Skeggs2010-12-081-82/+119
| | | | | | | | | | | | | | | | | | | | | | This is required on nv50 as we need to be able to have more precise control over physical VRAM allocations to avoid buffer corruption when using buffers of mixed memory types. This removes some nasty overallocation/alignment that we were previously using to "control" this problem. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: Rework tile region handling.Francisco Jerez2010-12-031-45/+66
| | | | | | | | | | | | | | | | | | The point is to share more code between the PFB/PGRAPH tile region hooks, and give the hardware specific functions a chance to allocate per-region resources. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: fix annoying nouveau_fence type issueMarcin Slusarz2010-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nouveau_fence_* functions are not type safe, which could lead to bugs. Additionally every use of nouveau_fence_unref had to cast struct nouveau_fence to void **. Fix it by renaming old functions and creating static inline functions with new prototypes. We still need old functions, because we pass function pointers to ttm. As we are wrapping functions, drop unused "void *arg" parameter where possible. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/pm: improve memtiming mappingsRoy Spliet2010-11-181-12/+19
| | | | | | | | | | | | | | | | | | | | | | Improvements: - Fix bug in switch statement - Add parts of 0x10022c, 0x10023c - Clean up 0x100234 - Comment out assumption in 0x100228 until verified Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: implement possible workaround for NV86 PGRAPH TLB flush hangBen Skeggs2010-11-181-8/+6
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: Some random cleanups.Francisco Jerez2010-11-181-3/+3
|/ | | | | | | Remove some unused/duplicated definitions and make sparse happy again. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix thinkos in mem timing table recordlen checkRoy Spliet2010-10-051-5/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Import initial memory timing workRoy Spliet2010-10-051-0/+144
| | | | | | | | | | | | | | This isn't correct everywhere yet, but since we don't use the data yet it's perfectly safe to push in, and the information we gain from logs will help to fix the remaining issues. v2 (Ben Skeggs <bskeggs@redhat.com>): - fixed up formatting - free parsed timing info on takedown - switched timing table printout to debug loglevel Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Simplify tile region handling.Francisco Jerez2010-09-241-17/+13
| | | | | | | | | Instead of emptying the caches to avoid a race with the PFIFO puller, go straight ahead and try to recover from it when it happens. Also, kill pfifo->cache_flush and tile->lock, we don't need them anymore. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add module parameter to override the default AGP rate.Francisco Jerez2010-09-241-1/+11
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Don't enable AGP FW on nv18.Francisco Jerez2010-09-241-2/+19
| | | | | | | | FW seems to be broken on nv18, it causes random lockups and breaks suspend/resume even with the blob. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: rework init ordering so nv50_instmem.c can be less badBen Skeggs2010-09-241-24/+51
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: calculate vram reordering block sizeBen Skeggs2010-09-241-2/+65
| | | | | | | | | | | Will be used at a later point when we plug in an alternative VRAM memory manager for GeForce 8+ boards. Based on pscnv code to do the same. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: modify object accessors, offset in bytes rather than dwordsBen Skeggs2010-09-241-4/+7
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix suspend on some nv4x AGP cards.Francisco Jerez2010-09-241-1/+2
| | | | | | | | | | | On some nv4x cards (specifically, the ones that use an internal PCIE->AGP bridge) the AGP controller state isn't preserved after a suspend/resume cycle, and the AGP control registers have moved from 0x18xx to 0x100xx, so the FW check in nouveau_mem_reset_agp() doesn't quite work. Check "dev->agp->mode" instead. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: implement memory detectionBen Skeggs2010-08-061-1/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>