summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2010-12-03drm/nv50: fix evo instmem alignmentBen Skeggs
Not an issue right now, we're forced to 64k size/alignment by the BO allocator anyway. This won't be the case soon. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: improve evo error handler when more than just channel 0 activeBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: rework evo init to match nvidia more closelyBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: initial work to allow multiple evo channelsBen Skeggs
This doesn't work yet for unknown reasons. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: move evo handling to nv50_evo.cBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: clearer separation of the stages of evo initBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: create graph and crypt contexts on demandBen Skeggs
This really needs cleaning up somehow, and probably investigate what's needed to do this on earlier generations. NVIDIA do something similar there too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: remove excessive alignment of graph/crypt contextsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv84: add support for the PCRYPT engineBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: only expose the object classes that are supported by the chipsetBen Skeggs
We previously added all the available classes for the entire generation, even though the objects wouldn't work on the hardware. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: use object class structs more extensivelyBen Skeggs
The structs themselves, as well as the non-sw object creation function are probably very misnamed now. That's a problem for later :) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: store engine type in gpuobj class structsBen Skeggs
We will eventually want to address hw engines other than PGRAPH. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: pass gpuobj alignment request down into backing allocatorBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv40: Ignore sync-to-vblank active when waiting for idle.Francisco Jerez
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Take fence spinlock in nouveau_fence_channel_fini().Francisco Jerez
Without it there's a potential race with nouveau_fence_update(). Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Avoid race in the interchannel sync code.Francisco Jerez
It needs a "strong" channel reference because it actually writes to the channel pushbuf, otherwise the corresponding FIFO context could get kicked off in the middle of nouveau_fence_sync(). Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Make fences take a weak channel reference.Francisco Jerez
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 <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Implement weak channel references.Francisco Jerez
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 <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Fix lock unbalance on card take down.Francisco Jerez
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Add unlocked variants of nouveau_channel_get/put.Francisco Jerez
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Fix race condition in channel refcount handling.Francisco Jerez
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 <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Refactor context destruction to avoid a lock ordering issue.Francisco Jerez
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 <marcin.slusarz@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Use lazy fence waits when doing software interchannel sync.Francisco Jerez
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: Leave BO eviction synchronization for later.Francisco Jerez
The pushbuf ioctl syncs after validation, no need for this anymore. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nv50: remove some unnecessary PDISPLAY initBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: fallback to sw fbcon if we can't get mutex immediatelyBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: hook up acpi power supply change trackingBen Skeggs
Not used at all yet, but lets hook it up now anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: return error from nouveau_ramht_remove() if not foundBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: use interruptible waits during pushbuf validationBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: fix thinko in channel locking in semaphore pathBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: remove cpu_writers lockBen Skeggs
No other driver uses this, and userspace should be responsible for handling locking between them if they share BOs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: switch to unlocked ioctlsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: add more fine-grained locking to channel list + structuresBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03drm/nouveau: add per-channel mutex, use to lock access to drm's channelBen Skeggs
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 <bskeggs@redhat.com>
2010-12-03drm/nouveau: disallow fbcon accel if running in interrupt contextBen Skeggs
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 <bskeggs@redhat.com>
2010-12-03drm/nouveau: tidy fifo swmthd handler a littleBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03Merge branch 'drm-radeon-fusion' of ../drm-radeon-next into drm-core-nextDave Airlie
* '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 Airlie
* '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-11-26drm/radeon/kms: improve pflip precision on r1xx-r4xxAlex Deucher
The update pending bit has a separate enable bit. Cc: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: add Ontario APU ucode loading supportAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: enable MSIs on fusion APUsAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: add power table parsing support for Ontario fusion APUsAlex Deucher
The vbios power tables on my inagua board seem a bit funky... Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: refactor atombios power state fetchingAlex Deucher
The function was getting too large. Rework it to share more state better handle new power table formats. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: add bo blit support for Ontario fusion APUsAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: add thermal sensor support for fusion APUsAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: fill in GPU init for AMD Ontario Fusion APUsAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: add radeon_asic struct for AMD Ontario fusion APUsAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: evergreen.c updates for fusionAlex Deucher
fusion chips only have 2 crtcs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: MC setup changes for fusion APUsAlex Deucher
- CONFIG_MEMSIZE is in bytes on fusion. - FB_BASE and FB_TOP are finer grained. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23drm/radeon/kms: move r7xx/evergreen to its own vram_gtt setup functionAlex Deucher
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 <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>