summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)Author
2011-02-25drm/nv50-nvc0: delay GART binding until move_notify timeBen Skeggs
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>
2011-02-25drm/nouveau: rename nouveau_vram to nouveau_memBen Skeggs
This structure will also be used for GART in the near future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nvc0: allow creation of buffers with any non-compressed memtypeBen Skeggs
This adds a table of known nvc0 memtypes, and modifies the validity check to allow any non-compressed type. Support for Z compression will come at a later point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: unmap buffers from the vm when they're evictedBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: move vm bind/unbind to move_notify hookBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: restrict memtype to those specified at creation timeBen Skeggs
Upcoming patches are going to enable full support for buffers that keep a constant GPU virtual address whenever they're validated for use by the GPU. In order for this to work properly while keeping support for large pages, we need to know if it's ever going to be possible for a buffer to end up in GART, and if so, disable large pages for the buffer's VMA. This is a new restriction that's not present in earlier kernel's, but should not break userspace as the current code never attempts to validate buffers into a memtype other than it was created with. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: pass domain rather than ttm flags to gem_new()Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: simplify bo moves now that they're all through the vmBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: remove no_vm/mappable flags from nouveau_boBen Skeggs
'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>
2011-02-25drm/nouveau: Fix pageflip eventBenjamin Franzke
Assign correct event when initializing nouveau_page_flip_state. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau/vbios: parse more gpio tag bits from connector tableBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: decode PFIFO DMA_PUSHER error codesMarcin Slusarz
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: fix typos in CCACHE error reportingMarcin Slusarz
The code was supposed to print registers around 0x405018 (which is read earlier), not 0x405818. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nvc0: support for sw methods + enable page flippingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: enable page flippingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: activate/update ds channel's framebuffer on modesetsBen Skeggs
The hw doesn't really appear to be designed to be used the way we have to use it due to DRI2's design. This leads us to having to keep the flipped fb support active at all times. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: initialise display sync channelsBen Skeggs
Also imports a couple of helper functions that'll be used to implement page flipping in the following commits.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: precalculate some fb state when creating themBen Skeggs
Just a cleanup, to avoid duplicating parts of nv50_crtc.c's code in the page flipping routines. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: tidy evo object creation some moreBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: request and wait on notification of modeset completionBen Skeggs
This should prevent a number of races from occuring, the most obvious of which will be exposed when we start making use of the "display sync" evo channel for page flipping. The DS channel will reject any command stream that doesn't completely agree with the current "master" state. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: switch to tasklet for display isr bhBen Skeggs
We need to be able to have the bh run while possibly spinning waiting for the EVO notifier to signal. This apparently happens in some circumstances with preempt disabled, so our workqueue was never being run. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: make vbios parser runnable from an atomic contextBen Skeggs
The nv50 display isr bh needs to be converted to a tasklet, which means we can't sleep anymore. The places we execute vbios init tables are rare, and not in any way performance critical, so this isn't a huge problem. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: include nv50_display in evo debuggingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: tidy evo init failure pathsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: fix ramht entries for multiple evo channelsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: disp channels have fixed purposes, don't "allocate" themBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: rename disp->evo to disp->masterBen Skeggs
More appropriate, and we're about to be using more than just the master EVO channel. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: move non-sharable display state into private structureBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: use system_wq instead of dev_priv->wqTejun Heo
With cmwq, there's no reason for nouveau to use a dedicated workqueue. Drop dev_priv->wq and use system_wq instead. Each work item is sync flushed when the containing structure is unregistered/destroyed. Note that this change also makes sure that nv50_gpio_handler is not freed while the contained work item is still running. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: use I2C_MODULE_PREFIX kernel defineLucas Stach
Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: drop explicit yields in favour of smaller PFIFO timesliceBen Skeggs
This gives a small, but noticeable performance gain at lower performance levels, and unchanged at the higher ones. With this commit, we're now using the same timeslice size as the NVIDIA binary driver currently does, and dropping an unknown bit that NVIDIA no longer appear to set. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv84: use vm offsets for semaphoresBen Skeggs
We may well be making more use of semaphores in the future, having the entire VM available makes requiring DMA objects for each and every semaphore block unnecessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: 0x50 needs semaphore yields tooBen Skeggs
Evil, evil chipset. Worst of both worlds. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: silence some compiler warningsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nvc0: implement semaphores for inter-channel syncBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nvc0/pfifo: semi-handle a couple more irqsBen Skeggs
And also, don't disable PFIFO IRQs completely whenever we recieve one, just when we don't know about it already. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv84: switch to new-style semaphoresBen Skeggs
These are the same semaphores nvc0 will use, and they potentially allow us to do much cooler things than our current inter-channel sync impl. Lets switch to them where possible now for some testing. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv40: support for 39-bit dma addresses on native PCIE chipsetsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv40: implement support for on-chip PCIEGARTBen Skeggs
v2. moved nv44 pciegart table back to instmem, where it's not accessible by userspace clients. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: introduce new gart type, and name _SGDMA more appropriatelyBen Skeggs
In preparation for the addition of a new nv40 backend, we'll need to be able to distinguish between a paged dma object and the on-chip GART. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: move + rename some stuff in nouveau_sgdma.cBen Skeggs
In preparation for the addition of a new nv40 pcie backend. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25Merge remote-tracking branch 'airlied/drm-core-next' into drm-nouveau-nextBen Skeggs
2011-02-23Revert "ttm: Include the 'struct dev' when using the DMA API."Dave Airlie
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>
2011-02-23Merge branch 'drm-mm-cleanup' into drm-nextDave Airlie
* drm-mm-cleanup: radeon: move blit functions to radeon_asic.h radeon: kill decls for inline functions radeon: consolidate asic-specific function decls for r600 & later drm/radeon: kill radeon_bo->gobj pointer drm/radeon: introduce gem_to_radeon_bo helper drm/radeon: embed struct drm_gem_object drm: mm: add helper to unwind scan state drm: mm: add api for embedding struct drm_mm_node drm: mm: extract node insert helper functions drm: mm: track free areas implicitly drm/nouveau: don't munge in drm_mm internals
2011-02-23Merge branch 'stable/ttm.pci-api.v5' of ↵Dave Airlie
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.
2011-02-23drm: Remove unused members from struct drm_open_hashChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-23drm: Trim the GEM mmap offset hashtabChris Wilson
Using an order 19 drm_ht for the mmap offsets is a little obscene. That means that will a fully populated GTT with every single object mmaped at least once in its lifetime, there will be exactly one object in each bucket. Typically systems only have at most a few thousand objects, though you may see a KDE desktop hit 50000. And most of those should never be mapped... On my systems, just using an order 10 ht would still have an average occupancy less than 1, so apply a small safety factor and use an order 12 ht, like the other mmap offset ht. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-23drm: Mark constant arrays of drm_display_mode constChris Wilson
... and fixup some methods to accept the constant argument. Now that constant module arrays are loaded into read-only memory, using const appropriately has some benefits beyond warning the programmer about likely mistakes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-23drm/radeon: overhaul texture checking. (v3)Dave Airlie
the texture checking code didn't work for block formats like s3tc, this overhauls it to work for all types. v2: add texture array support. v3: add subsampled formats Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-23drm/ttm: call driver move_notify() when doing system->tt bo movesBen Skeggs
Nouveau doesn't have enough information at ttm_backend_func.bind() time to implement things like tiled GART, or to keep a buffer at a constant address in the GPU virtual address space no matter where in physical memory it's placed. To resolve this, nouveau will handle binding of all buffers to the GPU itself from the move_notify() hook. This commit ensures it's called for all buffer moves. Talked to Dave about the impact on radeon, which uses move_notify, it doesn't look like anything should break there. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Thomas Hellstrom <thomas@shipmail.org> Signed-off-by: Dave Airlie <airlied@redhat.com>