aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-12-03drm/nouveau: Make fences take a weak channel reference.Francisco Jerez1-1/+2
Fences didn't increment the channel reference count, and the fenced channel could go away at any time. Fixes a potential race in nouveau_fence_update(). Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: Implement weak channel references.Francisco Jerez2-16/+47
nouveau_channel_ref() takes a "weak" channel reference that doesn't prevent the hardware channel resources from being released, it just keeps the channel data structure alive. Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: Fix lock unbalance on card take down.Francisco Jerez1-1/+1
Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: Add unlocked variants of nouveau_channel_get/put.Francisco Jerez2-13/+26
Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: Fix race condition in channel refcount handling.Francisco Jerez1-3/+2
nouveau_channel_put() can be executed after the 'refcount == 0' check in nouveau_channel_get() and before the channel reference count is incremented. In that case CPU0 will take the context down while CPU1 thinks it owns the channel and 'refcount == 1'. Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: Refactor context destruction to avoid a lock ordering issue.Francisco Jerez12-49/+116
The destroy_context() engine hooks call gpuobj management functions to release the channel resources, these functions use HARDIRQ-unsafe locks whereas destroy_context() is called with the HARDIRQ-safe context_switch_lock held, that's a lock ordering violation. Push the engine-specific channel destruction logic into destroy_context() and let the hardware-specific code lock and unlock when it's actually needed. Change the engine destruction order to avoid a race in the small gap between pgraph and pfifo context uninitialization. Reported-by: Marcin Slusarz <[email protected]> Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: Use lazy fence waits when doing software interchannel sync.Francisco Jerez1-2/+2
Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: Leave BO eviction synchronization for later.Francisco Jerez1-7/+0
The pushbuf ioctl syncs after validation, no need for this anymore. Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nv50: remove some unnecessary PDISPLAY initBen Skeggs1-13/+2
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: fallback to sw fbcon if we can't get mutex immediatelyBen Skeggs1-7/+9
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: hook up acpi power supply change trackingBen Skeggs2-0/+31
Not used at all yet, but lets hook it up now anyway. Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: return error from nouveau_ramht_remove() if not foundBen Skeggs3-11/+6
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: use interruptible waits during pushbuf validationBen Skeggs1-12/+19
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: fix thinko in channel locking in semaphore pathBen Skeggs1-3/+3
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: remove cpu_writers lockBen Skeggs3-62/+4
No other driver uses this, and userspace should be responsible for handling locking between them if they share BOs. Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: switch to unlocked ioctlsBen Skeggs1-12/+12
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: add more fine-grained locking to channel list + structuresBen Skeggs19-161/+236
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: add per-channel mutex, use to lock access to drm's channelBen Skeggs4-7/+28
This fixes a race condition between fbcon acceleration and TTM buffer moves. To reproduce: - start X - switch to vt and "while (true); do dmesg; done" - switch to another vt and "sleep 2 && cat /path/to/debugfs/dri/0/evict_vram" - switch back to vt running dmesg We don't make use of this on any other channel yet, they're currently protected by drm_global_mutex. This will change in the near future. Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: disallow fbcon accel if running in interrupt contextBen Skeggs4-133/+153
A future commit will add locking to the DRM's channel, and there's numerous problems that come up if we allow printk from an interrupt context to be accelerated. It seems saner to just disallow it completely. As a nice side-effect, all the "to accel or not to accel" logic gets moved out of the chipset-specific code. Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03drm/nouveau: tidy fifo swmthd handler a littleBen Skeggs1-25/+31
Signed-off-by: Ben Skeggs <[email protected]>
2010-12-03Merge branch 'drm-radeon-fusion' of ../drm-radeon-next into drm-core-nextDave Airlie18-639/+2081
* 'drm-radeon-fusion' of ../drm-radeon-next: drm/radeon/kms: add Ontario APU ucode loading support drm/radeon/kms: add Ontario Fusion APU pci ids drm/radeon/kms: enable MSIs on fusion APUs drm/radeon/kms: add power table parsing support for Ontario fusion APUs drm/radeon/kms: refactor atombios power state fetching drm/radeon/kms: add bo blit support for Ontario fusion APUs drm/radeon/kms: add thermal sensor support for fusion APUs drm/radeon/kms: fill in GPU init for AMD Ontario Fusion APUs drm/radeon/kms: add radeon_asic struct for AMD Ontario fusion APUs drm/radeon/kms: evergreen.c updates for fusion drm/radeon/kms: MC setup changes for fusion APUs drm/radeon/kms: move r7xx/evergreen to its own vram_gtt setup function drm/radeon/kms: add support for ss overrides on Fusion APUs drm/radeon/kms: Add support for external encoders on fusion APUs drm/radeon/kms: atom changes for DCE4.1 devices drm/radeon/kms: add new family id for AMD Ontario APUs drm/radeon/kms: upstream power table updates drm/radeon/kms: upstream atombios.h updates drm/radeon/kms: upstream ObjectID.h updates drm/radeon/kms: setup mc chremap properly on r7xx/evergreen
2010-12-03Merge branch 'drm-radeon-next' of ../drm-radeon-next into drm-core-nextDave Airlie19-223/+958
* 'drm-radeon-next' of ../drm-radeon-next: drm/radeon/kms: improve pflip precision on r1xx-r4xx drm/kms/radeon: Use high precision timestamps for pageflip completion events. drm/kms/radeon: Reorder vblank and pageflip interrupt handling. drm/radeon/kms: add pageflip ioctl support (v3) drm/kms/radeon: Add support for precise vblank timestamping.
2010-12-03Merge branch 'drm-ttm-next' into drm-core-nextDave Airlie16-241/+593
* drm-ttm-next: drm/radeon: Use the ttm execbuf utilities drm/ttm: Fix up io_mem_reserve / io_mem_free calling drm/ttm/vmwgfx: Have TTM manage the validation sequence. drm/ttm: Improved fencing of buffer object lists drm/ttm/radeon/nouveau: Kill the bo lock in favour of a bo device fence_lock drm/ttm: Don't deadlock on recursive multi-bo reservations drm/ttm: Optimize ttm_eu_backoff_reservation drm/ttm: Use kref_sub instead of repeatedly calling kref_put kref: Add a kref_sub function drm/ttm: Add a bo list reserve fastpath (v2)
2010-11-26drm/radeon/kms: improve pflip precision on r1xx-r4xxAlex Deucher2-3/+7
The update pending bit has a separate enable bit. Cc: Mario Kleiner <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add Ontario APU ucode loading supportAlex Deucher1-0/+7
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add Ontario Fusion APU pci idsAlex Deucher1-0/+4
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: enable MSIs on fusion APUsAlex Deucher1-1/+1
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add power table parsing support for Ontario fusion APUsAlex Deucher1-5/+101
The vbios power tables on my inagua board seem a bit funky... Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: refactor atombios power state fetchingAlex Deucher1-466/+475
The function was getting too large. Rework it to share more state better handle new power table formats. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add bo blit support for Ontario fusion APUsAlex Deucher2-5/+28
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add thermal sensor support for fusion APUsAlex Deucher4-1/+17
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: fill in GPU init for AMD Ontario Fusion APUsAlex Deucher1-5/+44
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add radeon_asic struct for AMD Ontario fusion APUsAlex Deucher1-0/+46
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: evergreen.c updates for fusionAlex Deucher2-82/+113
fusion chips only have 2 crtcs. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: MC setup changes for fusion APUsAlex Deucher3-4/+19
- CONFIG_MEMSIZE is in bytes on fusion. - FB_BASE and FB_TOP are finer grained. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: move r7xx/evergreen to its own vram_gtt setup functionAlex Deucher4-4/+46
MC_VM_FB_LOCATION is at a different offset between r6xx and r7xx/evergreen. The location is needed for vram setup on fusion chips. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add support for ss overrides on Fusion APUsAlex Deucher1-0/+39
System specific spread spectrum overrides can be specified in the integrated system info table for Fusion APUs. This adds support for using those overrides. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: Add support for external encoders on fusion APUsAlex Deucher2-4/+54
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: atom changes for DCE4.1 devicesAlex Deucher2-5/+24
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: add new family id for AMD Ontario APUsAlex Deucher2-0/+2
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: upstream power table updatesAlex Deucher1-4/+140
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: upstream atombios.h updatesAlex Deucher1-61/+792
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: upstream ObjectID.h updatesAlex Deucher1-0/+48
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-23drm/radeon/kms: setup mc chremap properly on r7xx/evergreenAlex Deucher4-0/+89
Should improve performance slightly and possibly fix some issues. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/radeon: Use the ttm execbuf utilitiesThomas Hellstrom4-63/+16
Rather than re-implementing in the Radeon driver, Use the execbuf / cs / pushbuf utilities that comes with TTM. This comes with an even greater benefit now that many spinlocks have been optimized away... Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm: Fix up io_mem_reserve / io_mem_free callingThomas Hellstrom5-80/+226
This patch attempts to fix up shortcomings with the current calling sequences. 1) There's a fastpath where no locking occurs and only io_mem_reserved is called to obtain needed info for mapping. The fastpath is set per memory type manager. 2) If the fastpath is disabled, io_mem_reserve and io_mem_free will be exactly balanced and not called recursively for the same struct ttm_mem_reg. 3) Optionally the driver can choose to enable a per memory type manager LRU eviction mechanism that, when io_mem_reserve returns -EAGAIN will attempt to kill user-space mappings of memory in that manager to free up needed resources Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm/vmwgfx: Have TTM manage the validation sequence.Thomas Hellstrom6-6/+9
Rather than having the driver supply the validation sequence, leave that responsibility to TTM. This saves some confusion and a function argument. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm: Improved fencing of buffer object listsThomas Hellstrom4-14/+45
Drastically reduce the number of spin lock / unlock operations by performing unreserving and fencing under global locks. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm/radeon/nouveau: Kill the bo lock in favour of a bo device fence_lockThomas Hellstrom9-51/+53
The bo lock used only to protect the bo sync object members, and since it is a per bo lock, fencing a buffer list will see a lot of locks and unlocks. Replace it with a per-device lock that protects the sync object members on *all* bos. Reading and setting these members will always be very quick, so the risc of heavy lock contention is microscopic. Note that waiting for sync objects will always take place outside of this lock. The bo device fence lock will eventually be replaced with a seqlock / rcu mechanism so we can determine that a bo is idle under a rcu / read seqlock. However this change will allow us to batch fencing and unreserving of buffers with a minimal amount of locking. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm: Don't deadlock on recursive multi-bo reservationsThomas Hellstrom2-6/+34
Add an aid for the driver to detect deadlocks on multi-bo reservations Update documentation. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>