aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
Commit message (Collapse)AuthorAge
* drm/nouveau: set TASK_(UN)INTERRUPTIBLE before schedule_timeout()Kulikov Vasiliy2010-08-01
| | | | | | | | | | set_current_state() is called only once before the first iteration. After return from schedule_timeout() current state is TASK_RUNNING. If we are going to wait again, set_current_state() must be called. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix some not-error error messagesBen Skeggs2010-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: introduce gpio engineBen Skeggs2010-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: correct wait condition for instmem flushBen Skeggs2010-07-25
| | | | | Reported-by: Marcin Koƛcielnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix TV-out detection on unposted cards lacking a usable DCB table.Francisco Jerez2010-07-25
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Get rid of the remaining VGA CRTC locking.Francisco Jerez2010-07-25
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Move display init to a new nouveau_engine.Francisco Jerez2010-07-25
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Put back the old 2-messages I2C slave test.Francisco Jerez2010-07-25
| | | | | | | | | | I was hoping we could detect I2C devices at a given address without actually writing data into them, but apparently some DDC slaves get confused with 0-bytes transactions. Put the good old test back. Reported-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Reset AGP before running the init scripts.Francisco Jerez2010-07-25
| | | | | | | | | | | | BIOS scripts usually make an attempt to reset the AGP controller, however on some nv4x cards doing it properly involves switching FW off and on: if we do that without updating the AGP bridge settings accordingly (e.g. with the corresponding calls to agp_enable()) we will be locking ourselves out of the card MMIO space. Do it from nouveau_mem_reset_agp() before the init scripts are executed. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv30: Init the PFB+0x3xx memory timing regs.Francisco Jerez2010-07-25
| | | | | | | | Fixes the randomly flashing vertical lines seen on some nv3x after a cold-boot. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: disable hotplug detect around DP link trainingBen Skeggs2010-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: add function to control GPIO IRQ reportingBen Skeggs2010-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: add nv_mask register accessorBen Skeggs2010-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix build without CONFIG_ACPIBen Skeggs2010-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Reset CRTC owner to 0 before BIOS init.Francisco Jerez2010-07-25
| | | | | | | | Fixes suspend+multihead on some boards that also use BIOS scripts for modesetting. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: No need to lock/unlock the VGA CRTC regs all the time.Francisco Jerez2010-07-25
| | | | | | | | Locking only makes sense in the VBIOS parsing code as it's executed before CRTC init. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Remove useless CRTC_OWNER logging.Francisco Jerez2010-07-25
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add some generic I2C gadget detection code.Francisco Jerez2010-07-25
| | | | | | | | | Clean up and move the external TV encoder detection code to nouveau_i2c.c, it's also going to be useful for external TMDS and DDC detection. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/i2c/ch7006: Don't assume that the specified config points to static memory.Francisco Jerez2010-07-25
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04-nv3x: Implement init-compute-mem.Francisco Jerez2010-07-25
| | | | | | | | | | | | | | Init-compute-mem was the last piece missing for nv0x-nv3x card cold-booting. This implementation is somewhat lacking but it's been reported to work on most chipsets it was tested in. Let me know if it breaks suspend to RAM for you. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Tested-by: Patrice Mandin <patmandin@gmail.com> Tested-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Xavier Chantry <chantry.xavier@gmail.com> Tested-by: Marcin Koƛcielnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add some PFB register defines.Francisco Jerez2010-07-25
| | | | | | | | Also collect all the PFB registers in a single place and remove some duplicated definitions. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add another Zotac FX5200 TV-out quirk.Francisco Jerez2010-07-25
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Don't pick an interlaced mode as the panel native mode.Francisco Jerez2010-07-25
| | | | | | | | Rescaling interlaced modes isn't going to work correctly, and even if it did, come on, interlaced flat panels? are you pulling my leg? Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix a sparse warning.Francisco Jerez2010-07-25
| | | | | | | It doesn't like variable length arrays. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix regression that break LVDS in some placesBen Skeggs2010-07-25
| | | | | | | | A previous commit started additionally using the SOR link when trying to match the correct output script. However, we never fill in this field for LVDS so we can never match a script at all. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: support fetching LVDS EDID from ACPIBen Skeggs2010-07-25
| | | | | | | Based on a patch from Matthew Garrett. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Matthew Garrett <mjg@redhat.com>
* drm/nouveau: remove quirk to fabricate DVI-A output on DCB 1.5 boardsBen Skeggs2010-07-25
| | | | | | | | | | | | | | There's a report of this quirk breaking modesetting on at least one board. After discussion with Francisco Jerez, we've decided to remove it: <darktama> it's not worth limiting the quirk to just where we know it can work? i'm happy either way really :) <curro> hmm, don't think so, most if not all DCB15 cards have just one DAC <curro> and with that quirk there's no way to tell if the load comes from the VGA or DVI port Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Francisco Jerez <currojerez@riseup.net>
* drm/nv50: use correct PRAMIN flush register on original nv50Ben Skeggs2010-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/i2c/ch7006: Fix up suspend/resume.Francisco Jerez2010-07-12
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: reduce usage of fence spinlock to when absolutely necessaryBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix RAMHT sizeBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix pcirom vbios shadow breakage from acpi rom patchBen Skeggs2010-07-12
| | | | | | | | | | | On nv50 it became impossible to attempt a PCI ROM shadow of the VBIOS, which will break some setups. This patch also removes the different ordering of shadow methods for pre-nv50 chipsets. The reason for the different ordering was paranoia, but it should hopefully be OK to try shadowing PRAMIN first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04: Enable context switching on PFIFO init.Francisco Jerez2010-07-12
| | | | | | | Fixes a lockup when coming back from suspend. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Disable PROM access on init.Francisco Jerez2010-07-12
| | | | | | | | | On older cards (<nv17) scanout gets blocked when the ROM is being accessed. PROM access usually comes out enabled from suspend, switch it off. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix crashes during fbcon init on single head cards.Francisco Jerez2010-07-12
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: initialise display before enabling interruptsBen Skeggs2010-07-12
| | | | | | | | | | In some situations it's possible we can receive a spurious hotplug IRQ before we're ready to handle it, leading to an oops. Calling the display init before enabling interrupts should clear any pending IRQs on the GPU and prevent this from happening. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: move dp_set_tmds() function to happen in the last display irqBen Skeggs2010-07-12
| | | | | | | It seems on some chipsets that doing this from the 0x20 handler causes the display engine to not ever signal the final 0x40 stage. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix mtrr cleanup pathBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix dp_set_tmds to work on the right ORBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv20-nv30: move context table object out of dev_privBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: cleanup nv50_fifo.cBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove unused fbdev_infoBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: allocate fixed amount of PRAMIN per channel on all chipsetsBen Skeggs2010-07-12
| | | | | | | | Previously only done on nv50+ This commit also switches unknown NV2x/NV3x chipsets to noaccel mode. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove ability to use external firmwareBen Skeggs2010-07-12
| | | | | | | This was always really a developer option, and if it's really necessary we can hack this in ourselves. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: move tlb flushing to a helper functionBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: add instmem flush() hookBen Skeggs2010-07-12
| | | | | | | | | | This removes the previous prepare_access() and finish_access() hooks, and replaces it with a much simpler flush() hook. All the chipset-specific code before nv50 has its use removed completely, as it's not required there at all. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: implement DAC disconnect fix missed in earlier commitBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove dev_priv->init_state and friendsBen Skeggs2010-07-12
| | | | | | | Nouveau will no longer load at all if card initialisation fails, so all these checks are unnecessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: add scaler-only modes for eDP tooBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: set DP display power state during DPMSBen Skeggs2010-07-12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>