aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2010-02-25drm/nv50: enable hpd on any connector we know the gpio line forBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: use dcb connector table for creating drm connectorsBen Skeggs
This makes this code common to both the nv04 and nv50 paths. For the moment, we keep the previous behaviour with HDMI/eDP connectors and report them as DVI-D/DP instead. This will be fixed once the rest of the code has been fixed to deal with those types. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: construct a connector table for cards that lack a real oneBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: check for known dcb connector typesBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: parse dcb gpio/connector tables after encodersBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: reorganise bios header, add dcb connector type enumsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: merge nvbios and nouveau_bios_infoBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: merge parsed_dcb and bios_parsed_dcb into dcb_tableBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: rename parsed_dcb_gpio to dcb_gpio_tableBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: allow retrieval of vbios image from debugfsBen Skeggs
It's very useful to be able to access this without additional tools for debugging purposes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: fix missing spin_unlock in failure pathLuca Barbieri
Found by sparse. 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-02-25drm/nouveau: fix i2ctable bounds checkingMarcin Slusarz
i2c_entries seems to be the number of i2c entries, so with index equal to this number, we could read invalid data from i2ctable. Fix it. 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>
2010-02-25drm/nouveau: fix nouveau_i2c_find bounds checkingMarcin Slusarz
Reported-by: Dan Carpenter <error27@gmail.com> 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>
2010-02-25drm/nouveau: fix pramdac_table range checkingMarcin Slusarz
get_tmds_index_reg reads some value from stack when mlv happens to be equal to size of pramdac_table array. Fix it. Reported-by: Dan Carpenter <error27@gmail.com> 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>
2010-02-25drm/nouveau: new gem pushbuf interface, bump to 0.0.16Ben Skeggs
This commit breaks the userspace interface, and requires a new libdrm for nouveau to operate again. The multiple GEM_PUSHBUF ioctls that were present in 0.0.15 for compatibility purposes are now gone, and replaced with the new ioctl which allows for multiple push buffers to be submitted (necessary for hw index buffers in the nv50 3d driver) and relocations to be applied on any buffer. A number of other ioctls (CARD_INIT, GEM_PIN, GEM_UNPIN) that were needed for userspace modesetting have also been removed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-25drm/nv50: make pushbuf dma object cover entire vmBen Skeggs
This allows us to submit push buffers from any memtype to the hardware. We'll need this ability for VRAM index buffers at some point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: remove PUSHBUF_CAL macroBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nv50: switch to indirect push buffer controlsBen Skeggs
PFIFO on G80 and up has a new mode where the main ring buffer is simply a ring of pointers to indirect buffers containing the actual command/data packets. In order to be able to implement index buffers in the 3D driver we need to be able to submit data-only push buffers right after the cmd packet header, which is only possible using the new command submission method. This commit doesn't make it possible to implement index buffers yet, some userspace interface changes will be required, but it does allow for testing/debugging of the hardware-side support in the meantime. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25drm/nouveau: protect channel create/destroy and irq handler with a spinlockMaarten Maathuis
The nv50 pgraph handler (for example) could reenable pgraph fifo access and that would be bad when pgraph context is being unloaded (we need the guarantee a ctxprog isn't running). Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-25Merge remote branch 'anholt/drm-intel-next' into drm-next-stageDave Airlie
* anholt/drm-intel-next: drm/i915: Record batch buffer following GPU error drm/i915: give up on 8xx lid status drm/i915: reduce some of the duplication of tiling checking drm/i915: blow away userspace mappings before fence change drm/i915: move a gtt flush to the correct place agp/intel: official names for Pineview and Ironlake drm/i915: overlay: drop superflous gpu flushes drm/i915: overlay: nuke readback to flush wc caches drm/i915: provide self-refresh status in debugfs drm/i915: provide FBC status in debugfs drm/i915: fix drps disable so unload & re-load works drm/i915: Fix OGLC performance regression on 945 drm/i915: Deobfuscate the render p-state obfuscation drm/i915: add dynamic performance control support for Ironlake drm/i915: enable memory self refresh on 9xx drm/i915: Don't reserve compatibility fence regs in KMS mode. drm/i915: Keep MCHBAR always enabled drm/i915: Replace open-coded eviction in i915_gem_idle()
2010-02-25Merge remote branch 'korg/drm-core-next' into drm-next-stageDave Airlie
* korg/drm-core-next: drm/ttm: handle OOM in ttm_tt_swapout drm/radeon/kms/atom: fix shr/shl ops drm/kms: fix spelling of "CLOCK" drm/kms: fix fb_changed = true else statement drivers/gpu/drm/drm_fb_helper.c: don't use private implementation of atoi() drm: switch all GEM/KMS ioctls to unlocked ioctl status. Use drm_gem_object_[handle_]unreference_unlocked where possible drm: introduce drm_gem_object_[handle_]unreference_unlocked
2010-02-25drm/ttm: handle OOM in ttm_tt_swapoutMaarten Maathuis
- Without this change I get a general protection fault. - Also use PTR_ERR where applicable. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Acked-by: Thomas Hellstrom <thellstrom@vmware.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-25drm/radeon/kms/atom: fix shr/shl opsAlex Deucher
The whole attribute table is valid for shr/shl ops. Fixes fdo bug 26668 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-25drm/radeon/kms: update new pll algoAlex Deucher
- add support for pre-avivo chips - add support for fixed post/ref dividers - add support for non-fractional fb dividers By default avivo chips use the new algo and pre-avivo chips use the old algo. Use the "new_pll" module option to toggle between them. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-25drm/radeon/kms: add support for square microtiles on r3xx-r5xxMarek Olšák
Signed-off-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-25drm/radeon/kms: force pinning buffer into visible VRAMJerome Glisse
This patch properly set visible VRAM and enforce any pinned buffer to be into visible VRAM. We might later add a flag to release this constraint for some newer hw more clever than previous. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-25drm/radeon/kms/evergreen: fix typo in cursor codeAlex Deucher
cursor x/y are surface relative. fixes fdo bug 26551 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23Merge branch 'drm-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/vmwgfx: Fix queries if no dma buffer thrashing is occuring. drm/nv50: fix vram ptes on IGPs to point at stolen system memory drm/nv50: fix instmem binding on IGPs to point at stolen system memory drm/nv50: improve vram page table construction drm/nv50: more efficient clearing of gpu page table entries drm/nv50: make nv50_mem_vm_{bind,unbind} operate only on vram drm/nouveau: Fix up pre-nv17 analog load detection.
2010-02-23drm/vmwgfx: Fix queries if no dma buffer thrashing is occuring.Thomas Hellstrom
Intercept query commands and apply relocations to their guest pointers. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into drm-linusDave Airlie
* 'nouveau/for-airlied' of ../drm-nouveau-next: drm/nv50: fix vram ptes on IGPs to point at stolen system memory drm/nv50: fix instmem binding on IGPs to point at stolen system memory drm/nv50: improve vram page table construction drm/nv50: more efficient clearing of gpu page table entries drm/nv50: make nv50_mem_vm_{bind,unbind} operate only on vram drm/nouveau: Fix up pre-nv17 analog load detection.
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: fix instmem binding on IGPs to point at stolen system memoryBen Skeggs
This also modifies the unused PRAMIN PT entries to be all zeroes, can't really recall why I used 9/0 initially, just that it didn't work for some reason. It was likely masking a bug elsewhere that's since been fixed. 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-02-23drm/nouveau: Fix up pre-nv17 analog load detection.Francisco Jerez
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-23drm/radeon/kms: implement reading active PCIE lanes on R600+Rafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23drm/radeon/kms: for downclocking non-mobility check PERFORMANCE stateRafał Miłecki
AtomBIOS tables on non-mobility GPU do not contain POWERSAVE/BATTERY. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23drm/radeon/kms: simplify storing current and requested PM modeRafał Miłecki
We kept pointers to requested and current clock modes in every power state. That was useless, more /global/ pointers in power struct are enough. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23drm/radeon: fixes for r6xx/r7xx gfx initAlex Deucher
- updated swizzle modes for backend map setup - fix programming of a few gfx regs - properly handle pipe/backend setup on LE cards Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23drm/radeon/rv740: fix backend setupAlex Deucher
This patch fixes occlusion queries and rendering errors on rv740 boards. Hardcoding the backend map is not an optimal solution, but a better fix is being worked on. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23drm/radeon/kms: fix R3XX/R4XX memory controller initializationJerome Glisse
Version 2 of memory controller did break the initialization for R3XX/R4XX hardware. This patch fix it. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23[rfc] drm/radeon/kms: pm debugging check for vbl.Dave Airlie
This patch adds a check on avivo chips to see if we are in the VBL region for the active crtcs when we trigger the engine change. I appear to have glitches locally on pm transistion (not sure all fixes are in yet) and this at least seems to be correct here, maybe others can test on systems with no glitches.
2010-02-23drm/radeon: Fix memory allocation failures in the preKMS command stream ↵Pauli Nieminen
checking. Allocation of single large block of memory may fail under memory presure. drm_buffer object can hold one large block of data in multiple independ pages which preents alloation failures. This patch converts all access to command stream to use drm_buffer interface. All direct access to array has to go tough drm_buffer functions to get correct pointer. Outputting the command stream to ring buffer needs to be awear of the split nature of drm_buffer. The output operation requires the new OUT_RING_DRM_BUFFER. Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-23drm: Add generic multipart buffer.Pauli Nieminen
Allocating multiple pages of memory for data that is coming from user space may fail. To fix memory allocation failures the buffer object should be split to multiple independ pages. drm buffer provides generic interface to copy and process large data arrays from user space. Interface includes allocation and free functions to allocate the buffer object and data storage pages. All access operations are performed relative to a internal pointer which is advanced with drm_buffer_advance function. The buffer can be accessed using drm_buffer_pointer_to_XXX functions if it is known that requested object doesn't split over a page boundary. These functions don't do any error checking to maximize performance. If there is large object which could be split there is special drm_buffer_read_object function. drm_buffer_read_object takes a pointer as argument which is used as temporary store for data if it is split over boundary in the buffer. Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22drm/i915: Record batch buffer following GPU errorChris Wilson
In order to improve our diagnostic capabilities following a GPU hang and subsequent reset, we need to record the batch buffer that triggered the error. We assume that the current batch buffer, plus a few details about what else is on the active list, will be sufficient -- at the very least an improvement over nothing. The extra information is stored in /debug/dri/.../i915_error_state following an error, and may be decoded using intel_gpu_tools/tools/intel_error_decode. v2: Avoid excessive work under spinlocks. v3: Include ringbuffer for later analysis. v4: Use kunmap correctly and record more buffer state. v5: Search ringbuffer for current batch buffer v6: Use a work fn for the impossible IRQ error case. v7: Avoid non-atomic paths whilst in IRQ context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
2010-02-22drm/i915: give up on 8xx lid statusJesse Barnes
These old machines more often than not lie about their lid state. So don't use it to detect LVDS presence, but leave the event handler to deal with lid open/close, when we might need to reset the mode. Fixes kernel bug #15248 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: stable@kernel.org Signed-off-by: Eric Anholt <eric@anholt.net>
2010-02-22drm/i915: reduce some of the duplication of tiling checkingOwain Ainsworth
i915_gem_object_fenceable was mostly just a repeat of the i915_gem_object_fence_offset_ok, but also checking the size (which was checkecd when we allowed that BO to be tiled in the first place). So instead, export the latter function and use it in place. Signed-Off-By: Owain G. Ainsworth <oga@openbsd.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2010-02-22drm/i915: blow away userspace mappings before fence changeDaniel Vetter
This aligns it with the other user of i915_gem_clear_fence_reg, which blows away the mapping before changing the fence reg. Only affects userspace if it races against itself when changing tiling parameters, i.e. behaviour is undefined, anyway. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
2010-02-22drm/i915: move a gtt flush to the correct placeDaniel Vetter
No functional change, because gtt flushing is a no-op. Still, try to keep the bookkeeping accurate. The if is still slightly wrong for with execbuf2 even i915-class hw doesn't always need a fence reg for gpu access. But that's for somewhen lateron. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>