summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_dp.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/kms/nv50: initial support for DP 1.2 multi-streamBen Skeggs2016-11-071-1/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: clean-up encoder functionsBen Skeggs2016-11-071-2/+2
| | | | | | | | Just a shuffle of blocks into an order consistent with the rest of the code, renaming hdmi/audio funtions for atomic, and removal of unused code. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: switch mst sink back into sst modeBen Skeggs2016-11-071-1/+8
| | | | | | | | | | | | Sometimes we load with a sink already in MST mode. If, however, we can't or don't want to use MST, we need to be able to switch it back to SST. This commit instantiates a stub topology manager for any output path that we believe (the detection of this could use some improvement) has support for MST, and adds the connector detect() logic for detecting sink support and switching between modes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: rename nouveau_drm.h to nouveau_drv.hBen Skeggs2016-05-201-1/+1
| | | | | | | Fixes out-of-tree build issue where uapi/drm/nouveau_drm.h gets picked up instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: transition pad/ports away from being based on nvkm_objectBen Skeggs2015-08-281-9/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: finalise nvkm namespace switch (no binary change)Ben Skeggs2015-01-221-2/+2
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove as much direct use of core headers as possibleBen Skeggs2014-08-101-2/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: port to nvif client/device/objectsBen Skeggs2014-08-101-3/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: probe dpcd to determine connectednessBen Skeggs2014-06-111-8/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-/disp: move DP link training to core and train from supervisorBen Skeggs2013-02-201-293/+0
| | | | | | | | | | | | | | | We need to be able to do link training for PIOR-connected ANX9805 from the third supervisor handler (due to script ordering in the bios, can't have the "user" call train because some settings are overwritten from the modesetting bios scripts). This moves link training for SOR-connected DP encoders to the second supervisor interrupt, *before* we call the modesetting scripts (yes, different ordering from PIOR is necessary). This is useful since we should now be able to remove some hacks to workaround races between the supervisor and link training paths. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: store i2c port pointer directly in nouveau_encoderBen Skeggs2013-02-201-7/+3
| | | | | | | | | | This is about to become somewhat more complicated to determine in a number of cases, so store the "common" case (DDC/AUX) directly inside the encoder structure. Pre-nv50 code not touched except to fill the pointer, don't care. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: use event interfaces for interrupt signallingBen Skeggs2013-02-201-2/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/drm: store full dcb gpio function data in connectorBen Skeggs2013-02-201-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: remove last bits of VBIOS parsing from DRM codeBen Skeggs2012-11-291-90/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: move core link training calls to common codeBen Skeggs2012-11-291-9/+25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2012-10-031-227/+53
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm merge (part 1) from Dave Airlie: "So first of all my tree and uapi stuff has a conflict mess, its my fault as the nouveau stuff didn't hit -next as were trying to rebase regressions out of it before we merged. Highlights: - SH mobile modesetting driver and associated helpers - some DRM core documentation - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write combined pte writing, ilk rc6 support, - nouveau: major driver rework into a hw core driver, makes features like SLI a lot saner to implement, - psb: add eDP/DP support for Cedarview - radeon: 2 layer page tables, async VM pte updates, better PLL selection for > 2 screens, better ACPI interactions The rest is general grab bag of fixes. So why part 1? well I have the exynos pull req which came in a bit late but was waiting for me to do something they shouldn't have and it looks fairly safe, and David Howells has some more header cleanups he'd like me to pull, that seem like a good idea, but I'd like to get this merge out of the way so -next dosen't get blocked." Tons of conflicts mostly due to silly include line changes, but mostly mindless. A few other small semantic conflicts too, noted from Dave's pre-merged branch. * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits) drm/nv98/crypt: fix fuc build with latest envyas drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering drm/nv41/vm: fix and enable use of "real" pciegart drm/nv44/vm: fix and enable use of "real" pciegart drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie drm/nouveau: store supported dma mask in vmmgr drm/nvc0/ibus: initial implementation of subdev drm/nouveau/therm: add support for fan-control modes drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules drm/nouveau/therm: calculate the pwm divisor on nv50+ drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster drm/nouveau/therm: move thermal-related functions to the therm subdev drm/nouveau/bios: parse the pwm divisor from the perf table drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices drm/nouveau/therm: rework thermal table parsing drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table drm/nouveau: fix pm initialization order drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it drm/nouveau: log channel debug/error messages from client object rather than drm client drm/nouveau: have drm debugging macros build on top of core macros ...
| * Merge branch 'drm-nouveau-next' of ↵Dave Airlie2012-10-031-225/+53
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next This is a major rework of the nouveau driver core, to reflect more closely how the hw is used and to make it easier to implement newer features now that the GPUs are more clearly understood than when nouveau started. It also contains a few other bits: thermal patches nv41/44 pcie gart fixes i2c unregistering fixes. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (191 commits) drm/nv98/crypt: fix fuc build with latest envyas drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering drm/nv41/vm: fix and enable use of "real" pciegart drm/nv44/vm: fix and enable use of "real" pciegart drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie drm/nouveau: store supported dma mask in vmmgr drm/nvc0/ibus: initial implementation of subdev drm/nouveau/therm: add support for fan-control modes drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules drm/nouveau/therm: calculate the pwm divisor on nv50+ drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster drm/nouveau/therm: move thermal-related functions to the therm subdev drm/nouveau/bios: parse the pwm divisor from the perf table drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices drm/nouveau/therm: rework thermal table parsing drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table drm/nouveau: fix pm initialization order drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it drm/nouveau: log channel debug/error messages from client object rather than drm client drm/nouveau: have drm debugging macros build on top of core macros ... Conflicts: drivers/gpu/drm/nouveau/nouveau_dp.c
| | * drm/nouveau: quiet some static-related sparse noiseMarcin Slusarz2012-10-031-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: port remainder of drm code, and rip out compat layerBen Skeggs2012-10-031-29/+45
| | | | | | | | | | | | | | | | | | | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - fill in nouveau_pm.dev to prevent oops - fix ppc issues (build + OF shadow) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: implement devinit subdev, and new init table parserBen Skeggs2012-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | v2: - make sure not to execute display scripts unless resuming Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau/i2c: port to subdev interfacesBen Skeggs2012-10-031-203/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2/v3: Ben Skeggs <bskeggs@redhat.com> - fix typo in default bus selection - fix accidental loss of destructor v4: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> - fix typo causing incorrect default i2c port settings when no BMP data Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau/gpio: port gpio to subdev interfacesBen Skeggs2012-10-031-1/+0
| | | | | | | | | | | | | | | | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - rebase on top of v3.6-rc6 with gpio reset patch integrated already Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: restructure source tree, split core from drm implementationBen Skeggs2012-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Future work will be headed in the way of separating the policy supplied by the nouveau drm module from the mechanisms provided by the driver core. There will be a couple of major classes (subdev, engine) of driver modules that have clearly defined tasks, and the further directory structure change is to reflect this. No code changes here whatsoever, aside from fixing up a couple of include file pathnames. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm: use %*ph to dump small buffersAndy Shevchenko2012-09-131-3/+1
| |/ | | | | | | | | Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* / UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells2012-10-021-1/+1
|/ | | | | | | | | | | Convert #include "..." to #include <path/...> in drivers/gpu/. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
* drm/nouveau/dp: Probe branch/sink OUIs (v2)Adam Jackson2012-05-221-0/+21
| | | | | | | (airlied: v2: fix missing struct - fixes compile) Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau/dp: support version 4.0 of DP tableBen Skeggs2012-03-231-0/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: account for channel coding overhead in link trainingBen Skeggs2012-03-131-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: initial implementation of displayportBen Skeggs2012-03-131-4/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: make dp dpms function common, call from sor code insteadBen Skeggs2012-03-131-0/+23
| | | | | | GF119 will use this too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: move all nv50/sor-specific code out of nouveau_dp.cBen Skeggs2012-03-131-217/+16
| | | | | | | Off-chip encoders (which we don't support yet anyway), and newer chipsets (such as NVD9...), will need their own code for this. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: make functions for executing various bios tablesBen Skeggs2012-03-131-9/+46
| | | | | | | More code to do the same thing, but will make it easier to handle various changes that could possibly happen the the VBIOS tables. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: fix bad comparison in dp_link_train_commit()Xi Wang2012-03-131-1/+1
| | | | | | | | | The comparison (lpre == DP_TRAIN_PRE_EMPHASIS_9_5) is always false: lpre is initialized as (lane & 0x0c) >> 2, which is at most 3, while DP_TRAIN_PRE_EMPHASIS_9_5 is defined as (3 << 3). Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: reimplement as nouveau_gpio.c, fixing a number of issuesBen Skeggs2011-12-211-4/+3
| | | | | | | | | | | | | | - 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/disp: parse connector info directly in nouveau_connector.cBen Skeggs2011-12-211-2/+2
| | | | | | | | | | | | 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: tidy up bit-bang helpers, also fixing nv50 setsda bugBen Skeggs2011-12-211-3/+3
| | | | | | | | | | 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/bios: pass drm_device to ROMPTR, rather than nvbiosBen Skeggs2011-12-211-6/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: add support for displayport table 0x30Ben Skeggs2011-09-201-22/+48
| | | | | | | Written from observations of my NVD9's vbios, completely untested due to my NVD9 lacking actual DisplayPort connectors.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: return master dp table pointer too when looking up encoderBen Skeggs2011-09-201-18/+61
| | | | | | | Will need to be able to distinguish 2.0/2.1 from 3.0 soon. Also, move the vbios parsing to nouveau_dp where it belongs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: preserve non-pattern bits in DP_TRAINING_PATTERN_SETBen Skeggs2011-09-201-1/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: use alternate lane mask for nvafBen Skeggs2011-09-201-1/+10
| | | | | | | Naturally... Because Macs can't just be the same as everything else now can they? Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: link rate scripts are selected with a comparison tableBen Skeggs2011-09-201-4/+3
| | | | | | Not hardcoded as originally thought. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: enable down-spread if vbios and sink support itBen Skeggs2011-09-201-27/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: execute some more vbios tables relating to link rateBen Skeggs2011-09-201-5/+21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: store unencoded link_bw everywhereBen Skeggs2011-09-201-14/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: restructure link training codeBen Skeggs2011-09-201-327/+199
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: pass in required datarate to link trainingBen Skeggs2011-09-201-1/+1
| | | | | | | Not used currently, but it will be used in preference to pre-determined lane/bandwidth numbers at a later point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: remove reliance on vbios for native displayportBen Skeggs2011-09-201-1/+110
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: rewrite auxch transaction routinesBen Skeggs2011-09-201-105/+131
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: allow passing in crtc to the init table parserBen Skeggs2011-09-201-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>