aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_irq.c
Commit message (Collapse)AuthorAgeFilesLines
* merge more graphics stuff from 3.2.72Wolfgang Wiedmeyer2015-10-231-1/+1
|
* remove firmware files, merge more uncritical stuff from 3.0.101Wolfgang Wiedmeyer2015-10-231-1/+1
|
* samsung update 1codeworkx2012-06-021-1/+1
|
* drm/nouveau: tidy+move PGRAPH ISRs to their respective *_graph.c filesBen Skeggs2010-12-031-885/+9
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: move PFIFO ISR into nv04_fifo.cBen Skeggs2010-12-031-203/+0
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04-nv40: register vblank isrBen Skeggs2010-12-031-19/+0
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: move bitfield/enum helpers to nouveau_util.cBen Skeggs2010-12-031-68/+18
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: use register/unregister functionality for PDISPLAY ISRBen Skeggs2010-12-031-15/+1
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: move GPIO ISR to nv50_gpio.cBen Skeggs2010-12-031-4/+2
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv84: move PCRYPT ISR out of nouveau_irq.cBen Skeggs2010-12-031-24/+1
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: allow irq handlers to be installed by engine-specific codeBen Skeggs2010-12-031-1/+33
| | | | | | | Lets start to clean up this mess! Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Implement the vblank DRM hooks.Francisco Jerez2010-12-031-2/+6
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: add support for MSIBen Skeggs2010-12-031-0/+35
| | | | | | | | | | | | | | | | Only supported on NV50+ so far, and disabled by default currently. The module parameter "msi=1" will enable it. There's a kernel bug which will cause this to fail if the module (or the NVIDIA binary driver) has ever been loaded before loading nouveau with MSI enabled. As such, this is only safe to enable if you have nouveau load on boot, and don't wish to ever reload it. The workaround is to "echo 0 > /sys/bus/pci/devices/<device>/enable" until the enable count reads 0. Then you should be able to load nouveau with MSI enabled. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv84: add support for the PCRYPT engineBen Skeggs2010-12-031-0/+16
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: only expose the object classes that are supported by the chipsetBen Skeggs2010-12-031-31/+5
| | | | | | | 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>
* drm/nouveau: add more fine-grained locking to channel list + structuresBen Skeggs2010-12-031-14/+28
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: tidy fifo swmthd handler a littleBen Skeggs2010-12-031-25/+31
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nouveau: Acknowledge HPD irq in handler, not bottom halfAndy Lutomirski2010-11-181-0/+1
| | | | | | | | The old code generated an interrupt storm bad enough to completely take down my system. Signed-off-by: Andy Lutomirski <luto@mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Some random cleanups.Francisco Jerez2010-11-181-9/+10
| | | | | | | Remove some unused/duplicated definitions and make sparse happy again. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: ratelimit IRQ messagesJiri Slaby2010-11-181-12/+14
| | | | | | | | | | There are two messages in the ISR of nouveau which might be printed out hundred times in a second. Ratelimit them. (We need to move nouveau_ratelimit to the top of the file.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: handle fifo pusher errors betterBen Skeggs2010-09-241-8/+37
| | | | | | | | | | | | The most important part of this change is that we now instruct PFIFO to drop all pending fetches, rather than attempting to skip a single dword and hope that things would magically sort themselves out - they usually don't, and we end up with PFIFO being completely hung. This commit also adds somewhat more useful logging when these exceptions occur. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: report BAR access faultsBen Skeggs2010-09-241-0/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: move vm trap to nv50_fb.cBen Skeggs2010-09-241-45/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove nouveau_gpuobj_ref completely, replace with sanityBen Skeggs2010-09-241-7/+9
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: starting point for GF100 support, everything stubbedBen Skeggs2010-08-061-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Ack the context switch interrupt before switching contexts.Francisco Jerez2010-08-061-2/+2
| | | | | | | | Leaving the IRQ unack'ed while switching contexts makes the switch fail randomly on some nv1x. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'drm-fbdev-cleanup' into drm-core-nextDave Airlie2010-04-201-9/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * drm-fbdev-cleanup: drm/fb: remove drm_fb_helper_setcolreg drm/kms/fb: use slow work mechanism for normal hotplug also. drm/kms/fb: add polling support for when nothing is connected. drm/kms/fb: provide a 1024x768 fbcon if no outputs found. drm/kms/fb: separate fbdev connector list from core drm connectors drm/kms/fb: move to using fb helper crtc grouping instead of core crtc list drm/fb: fix fbdev object model + cleanup properly. Conflicts: drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/nouveau/nouveau_drv.h
| * drm/fb: fix fbdev object model + cleanup properly.Dave Airlie2010-04-071-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work. This patch a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs. b) migrated all the fb helper functions out of the crtc helper file into the fb helper file. c) pushed the fb probing/hotplug control into the driver d) makes the surface sizes into a structure for ease of passing This changes the intel/radeon/nouveau drivers to use the new helper. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nv50: punt hotplug irq handling out to workqueueBen Skeggs2010-04-091-0/+1
|/ | | | | | | On DP outputs we'll likely end up running vbios init tables here, which may sleep. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: Improve PGRAPH interrupt handling.Marcin Kościelnicki2010-03-101-48/+561
| | | | | | | | | | | | | This makes nouveau recognise and report more kinds of PGRAPH errors, as well as prevent GPU lockups resulting from some of them. Lots of guesswork was involved and some part of this is probably incorrect. Some potential-lockuop situations are handled by just resetting a whole PGRAPH subunit, which doesn't sound like a "proper" solution, but seems to work just fine... for now. Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: protect channel create/destroy and irq handler with a spinlockMaarten Maathuis2010-02-251-0/+5
| | | | | | | | | 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>
* drm/nv50: make the pgraph irq handler loop like the pre-nv50 versionMaarten Maathuis2010-02-101-64/+77
| | | | | | | Unset the bit that indicates that a ctxprog can continue at the end. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fixup semaphores on pre-nv50 cards.Francisco Jerez2010-02-091-0/+14
| | | | | | | | | | Apparently, they generate a PFIFO interrupt each time one of the semaphore methods is executed if its ctxdma wasn't manually marked as valid. This patch makes it flip the valid bit in response to the DMA_SEMAPHORE method (which triggers the IRQ even for a valid ctxdma). Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Acknowledge DMA_VTX_PROTECTION PGRAPH interruptsLuca Barbieri2010-01-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Nouveau is unable to dismiss DMA_VTX_PROTECTION errors, which results in an infinite loop in the interrupt handler. These errors are caused both by bugs in the Gallium driver and by user-specified index buffers with out of bounds indices. By mmio-tracing the nVidia drivers, I found out how this is done. On DMA_VTX_PROTECTION, The nVidia driver reads the register 0x402000, always getting the value 4, and then writes 4 back to 0x402000. This patch adds that logic by reading 0x402000 and writing the same value back. It's unclear what should happen if the value read is not 4, and the current approach might not be the correct one. To test this, modify mesa/progs/trivial/vbo-drawrange.c, defining ELTOBJ to 1 and replacing indices with huge out of bounds integers. Without this patch, the GPU and/or kernel should lock up. With this patch, it should misrender as expected but not lock up. The errors are still logged since they are useful for development. This has been tested on NV49 and may not work on other cards. To find out how things work on other cards, run the aforementioned test using the blob with mmiotrace and grep for a read of the PGRAPH source register. 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>
* drm/nv50: prevent a possible ctxprog hangBen Skeggs2010-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | The below is mainly an educated guess at what's going on, docs would sure be handy... NVIDIA? :P It appears it's possible for a ctxprog to run even while a GPU exception is pending. The GF8 and up ctxprogs appear to have a small snippet of code which detects this, and stalls the ctxprog until it's been handled, which essentially looks like: if (r2 & 0x00008000) { r0 |= 0x80000000; while (r0 & 0x80000000) {} } I don't know of any way that flag would get cleared unless the driver intervenes (and indeed, in the cases I've seen the hang, nothing steps in to automagically clear it for us). This patch causes the driver to clear the flag during the PGRAPH IRQ handler. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add DRM driver for NVIDIA GPUsBen Skeggs2009-12-111-0/+702
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>