summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_mem.c
AgeCommit message (Collapse)Author
2010-08-06drm/nvc0: implement memory detectionBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-08-06drm/nouveau: Fix AGP reset when AGP FW is already enabled on init.Francisco Jerez
Previously nouveau_mem_reset_agp() was only disabling AGP fast writes when coming back from suspend. However, the "locked out of the card because of FW" problem can also be reproduced on init if you unload/reload nouveau.ko several times. This patch makes the AGP code reset FW on init. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-08-06drm/nouveau: remove unused ttm bo listBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-26drm/nouveau: Reset AGP before running the init scripts.Francisco Jerez
BIOS scripts usually make an attempt to reset the AGP controller, however on some nv4x cards doing it properly involves switching FW off and on: if we do that without updating the AGP bridge settings accordingly (e.g. with the corresponding calls to agp_enable()) we will be locking ourselves out of the card MMIO space. Do it from nouveau_mem_reset_agp() before the init scripts are executed. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-26drm/nouveau: Add some PFB register defines.Francisco Jerez
Also collect all the PFB registers in a single place and remove some duplicated definitions. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nouveau: fix mtrr cleanup pathBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nv50: move tlb flushing to a helper functionBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nouveau: add instmem flush() hookBen Skeggs
This removes the previous prepare_access() and finish_access() hooks, and replaces it with a much simpler flush() hook. All the chipset-specific code before nv50 has its use removed completely, as it's not required there at all. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nouveau: Fix a couple of sparse warnings.Francisco Jerez
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nv50: fix memory detection for cards with >=4GiB VRAMBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nouveau: missed some bracesBen Skeggs
Luckily this had absolutely no effect whatsoever :) Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nouveau: remove left-over !DRIVER_MODESET pathsBen Skeggs
It's far preferable to have the driver do nothing at all for "nomodeset". Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-13drm/nouveau: use drm_mm in preference to custom code doing the same thingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-07-07Merge branch 'drm-platform' into drm-testingDave Airlie
* drm-platform: drm: Make sure the DRM offset matches the CPU drm: Add __arm defines to DRM drm: Add support for platform devices to register as DRM devices drm: Remove drm_resource wrappers
2010-06-01drm: Remove drm_resource wrappersJordan Crouse
Remove the drm_resource wrappers and directly use the actual PCI and/or platform functions in their place. [airlied: fixup nouveau properly to build] Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-06-01drm/nv50: cast IGP memory location to u64 before shiftingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-04-09drm/nouveau: detect vram amount once, and save the valueBen Skeggs
As opposed to repeatedly reading the amount back from the GPU every time we need to know the VRAM size. We should now fail to load gracefully on detecting no VRAM, rather than something potentially messy happening. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-04-09drm/nv50: add more 0x100c80 flushy magicBen Skeggs
Fixes the !vbo_fifo path in the 3D driver on certain chipsets. Still not really any good idea of what exactly the magic achieves, but it makes things work. While we're at it, in the PCIEGART path, flush on unbinding also. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-23drm/nv50: fix vram ptes on IGPs to point at stolen system memoryBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-23drm/nv50: improve vram page table constructionBen Skeggs
This commit changes nouveau to construct PTEs which look very much like the ones the binary driver creates. I presume that filling multiple PTEs identically with length flags and the physical address of the start of a block of VRAM is a hint to the memory controller that it need not perform additional page table lookups for that range of addresses. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-23drm/nv50: more efficient clearing of gpu page table entriesBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-23drm/nv50: make nv50_mem_vm_{bind,unbind} operate only on vramBen Skeggs
GART is handled elsewhere, no reason to have the code for it here too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-18drm/nouveau: Evict buffers in VRAM before freeing sgdmaLuca Barbieri
Currently, we take down the sgdma engine without evicting all buffers from VRAM. The TTM device release will try to evict anything in VRAM to GART memory, but this will fail since sgdma has already been taken down. This causes an infinite loop in kernel mode on module unload. It usually doesn't happen because there aren't any buffer on close. However, if the GPU is locked up, this condition is easily triggered. This patch fixes it in the simplest way possible by cleaning VRAM right before cleaning SGDMA memory. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-15drm/nouveau: reserve VGA area for the momentBen Skeggs
This is to prevent things such as GART tables and other important GPU structures being allocated there before we take over fbcon ourselves. This is more of a workaround for the moment, a better solution will require some more invasive changes, but it'll be done at some point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-14drm/nouveau: remove PRIV0 check in nouveau_mem_close()Ben Skeggs
We don't setup PRIV0 anymore, so this is unnecessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11drm/nouveau: Make the MM aware of pre-G80 tiling.Francisco Jerez
This commit has also the following 3 bugfix commits squashed into it from the nouveau git tree: drm/nouveau: Fix up the tiling alignment restrictions for nv1x. drm/nouveau: Fix up the nv2x tiling alignment restrictions. drm/nv50: fix align typo for g9x Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-15drm/nouveau: fix build with CONFIG_AGP=nBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-12-11drm/nouveau: Add DRM driver for NVIDIA GPUsBen Skeggs
This adds a drm/kms staging non-API stable driver for GPUs from NVIDIA. This driver is a KMS-based driver and requires a compatible nouveau userspace libdrm and nouveau X.org driver. This driver requires firmware files not available in this kernel tree, interested parties can find them via the nouveau project git archive. This driver is reverse engineered, and is in no way supported by nVidia. Support for nearly the complete range of nvidia hw from nv04->g80 (nv50) is available, and the kms driver should support driving nearly all output types (displayport is under development still) along with supporting suspend/resume. This work is all from the upstream nouveau project found at nouveau.freedesktop.org. The original authors list from nouveau git tree is: Anssi Hannula <anssi.hannula@iki.fi> Ben Skeggs <bskeggs@redhat.com> Francisco Jerez <currojerez@riseup.net> Maarten Maathuis <madman2003@gmail.com> Marcin Koƛcielnicki <koriakin@0x04.net> Matthew Garrett <mjg@redhat.com> Matt Parnell <mparnell@gmail.com> Patrice Mandin <patmandin@gmail.com> Pekka Paalanen <pq@iki.fi> Xavier Chantry <shiningxc@gmail.com> along with project founder Stephane Marchesin <marchesin@icps.u-strasbg.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>