summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: move hpd enable/disable to common codeBen Skeggs2011-12-213-27/+18
| | | | | | No idea why I didn't do this initially... NVD9 HPD is now enabled. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40/disp: implement support for hotplug irqBen Skeggs2011-12-213-0/+52
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: reimplement as nouveau_gpio.c, fixing a number of issuesBen Skeggs2011-12-2116-646/+653
| | | | | | | | | | | | | | - moves out of nouveau_bios.c and demagics the logical state definitions - simplifies chipset-specific driver interface - makes most of gpio irq handling common, will use for nv4x hpd later - api extended to allow both direct gpio access, and access using the logical function states - api extended to allow for future use of gpio extender chips - pre-nv50 was handled very badly, the main issue being that all GPIOs were being treated as output-only. - fixes nvd0 so gpio changes actually stick, magic reg needs bashing Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: just pass gpio line to pwm_*, not entire gpio structBen Skeggs2011-12-215-30/+25
| | | | | | | We don't need more than the line id to determine the PWM controller, and the GPIO interfaces are about to change somewhat. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/hwsq: remove some magic, give proper opcode namesBen Skeggs2011-12-212-6/+23
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: introduce hwsq-based memory reclockingMartin Peres2011-12-212-62/+243
| | | | | | | | | | | | | | | More work needs to be done on supporting the different memory types. v2 (Ben Skeggs): - fixed up conflicts from not having pausing patch first - restructured code somewhat to fit with how all the other code works - fixed bug where incorrect mpll_ctrl could get set sometimes - removed stuff that's cargo-culted from the binary driver - merged nv92+ display disable into hwsq - fixed incorrect opcode 0x5f magic at end of ucode Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04/disp: handle dual-link spwg panels without needing quirksBen Skeggs2011-12-212-15/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: remove broken display depth function, use the improved oneBen Skeggs2011-12-211-22/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mxm: implement ROM shadow methodBen Skeggs2011-12-211-0/+39
| | | | | | Untested, -ENOHW. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mxm: implement _DSM shadow methodBen Skeggs2011-12-211-1/+60
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mxm: implement wmi shadow methodBen Skeggs2011-12-211-6/+45
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mxm: initial implementation of dcb sanitisationBen Skeggs2011-12-216-3/+561
| | | | | | | | | | | | | | | | The DCB table provided by the VBIOS on most MXM chips has a number of entries which either need to be disabled, or modified according to the MXM-SIS Output Device Descriptors. The x86 vbios code usually takes care of this for us, however, with the large number of laptops now with switchable graphics or optimus, a lot of the time nouveau is responsible for POSTing the card instead - leaving some fun situations like, plugging in a monitor and having nouveau decide 3 connectors actually just got plugged in.. No MXM-SIS fetching methods implemented yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp: parse connector info directly in nouveau_connector.cBen Skeggs2011-12-217-328/+240
| | | | | | | | | | | | Another case where we parsed vbios data to some structs, then again use that info once to construct another set of data. Skip the intermediate step. This is also slightly improved in that we can now use DCB 3.x connector table info, which will allow NV4x to gain hotplug support, and to make quirks for SPWG LVDS panels unnecessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: handle bit-banging ourselvesBen Skeggs2011-12-212-22/+178
| | | | | | | | | | | | | | | | | i2c-algo-bit doesn't actually work very well on one card I have access to (NVS 300), random single-bit errors occur most of the time - what we're doing now is closer to what xf86i2c.c does. The original plan was to figure out why i2c-algo-bit fails on the NVS 300, and fix it. However, while investigating I discovered i2c-algo-bit calls cond_resched(), which makes it a bad idea for us to be using as we execute VBIOS scripts from a tasklet, and there may very well be i2c transfers as a result. So, since I already wrote this code in userspace to track down the NVS 300 bug, and it's not really much code - lets use it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: fix debug messageBen Skeggs2011-12-211-3/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: tidy up bit-bang helpers, also fixing nv50 setsda bugBen Skeggs2011-12-213-148/+94
| | | | | | | | | | Was using nv_mask, which is bad. Reading the reg senses the current line states, which aren't necessarily the states we're trying to drive the lines to. Fixed to store SCL driver state just as we already do for SDA. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: do parsing of i2c-related vbios info in nouveau_i2c.cBen Skeggs2011-12-216-278/+222
| | | | | | | | Not much point parsing the vbios data into a struct which is only used once to parse the data into another struct, go directly from vbios to nouveau_i2c_chan. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: start refactoring dcb routinesBen Skeggs2011-12-213-121/+162
| | | | | | | | This primary reason for this was mostly to avoid duplication of some of this stuff by the MXM-SIS parser. However, some other cleanups will also follow this as a result. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fold fixup_legacy_i2cBen Skeggs2011-12-211-23/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: pass drm_device to ROMPTR, rather than nvbiosBen Skeggs2011-12-217-27/+28
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: use single, shared, sync bo for all evo channelsBen Skeggs2011-12-211-31/+32
| | | | | | This simplifies some things, and hopefully won't come back to bite me. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: rename sync channel to flip channelBen Skeggs2011-12-211-9/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: handle yet another interruptBen Skeggs2011-12-211-0/+6
| | | | | | | | | | | | | | Spotted while messing with overlay channels (probably as a result of sending a similar "disable" sequence as we do for the flip channels). The value in 0x61008c was 0x20, which one would reasonably guess is "bit 5 == something to report about evo channel 5" - but who knows. Spotted the binary driver getting this too, and it appears to not do anything exciting as a result. So, handle it the same way and avoid an IRQ storm. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: initialise overlay channelsBen Skeggs2011-12-211-5/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: add support for page flippingBen Skeggs2011-12-215-65/+267
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: make it clearer that the cursor regs are pio evo channelsBen Skeggs2011-12-211-3/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: have evo names now, use themBen Skeggs2011-12-211-24/+24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: init display sync channelsBen Skeggs2011-12-211-55/+115
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: scaler updates, overscan compensation etcBen Skeggs2011-12-212-33/+67
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: update crtc timing calculations for interlace/doublescanBen Skeggs2011-12-211-18/+34
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: shutdown display on suspend/hibernateBen Skeggs2011-12-214-11/+45
| | | | | | Known to fix some serious issues with hibernate on a couple of systems. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/disp: fix evo for create/init + destroy/fini splitBen Skeggs2011-12-213-11/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: re-jig fbcon suspend/resume process a littleBen Skeggs2011-12-212-16/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp: introduce proper init/fini, separate from create/destroyBen Skeggs2011-12-217-31/+39
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: fix missing volt changes when boot voltage is undefinedBen Skeggs2011-12-211-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: fix a typo in clock calculationMartin Peres2011-12-211-1/+1
| | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: enable hdmi audioBen Skeggs2011-12-211-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: hook evo up to debuggingBen Skeggs2011-12-211-0/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: enable hdmi on sor if hdmi monitor presentBen Skeggs2011-12-211-0/+44
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: send eld to the audio codecBen Skeggs2011-12-211-3/+63
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/hdmi: enable audio for nva3:nvd0 chipsetsBen Skeggs2011-12-211-3/+24
| | | | | | | Pre-nva3 will likely require far more extensive setup, and nvd9 needs to be checked to find its SOR_HDMI/SOR_AUDIO blocks. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix page faulting for 128MB page table sizesMarcin Slusarz2011-12-211-1/+1
| | | | | | | This seems to be a typo... Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: print correct engine number which failed to unload/idleMarcin Slusarz2011-12-211-1/+1
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/copy: fix typo in fuc which caused host to not recieve exceptionsBen Skeggs2011-12-213-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/copy: update fuc source for latest envytoolsBen Skeggs2011-12-211-129/+131
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: only touch 0x611200 on nv92-Ben Skeggs2011-12-211-3/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: stabilise transition to 100MHz mclk a bitBen Skeggs2011-12-211-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: avoid touching dom6/vdec clocks if perflvl doesn't define itBen Skeggs2011-12-211-16/+16
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: fix thinko which lead to clocks being slightly off sometimesBen Skeggs2011-12-211-22/+24
| | | | | | | read_pll_ref() needs to take into account the refclk src bits in 0xc040 on some chipsets, it wasn't doing this. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: 0x84/0x86 can't use "1" for nvclk src, need 0x50 methodBen Skeggs2011-12-211-2/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud