summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_i2c.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: restructure source tree, split core from drm implementationBen Skeggs2012-10-031-394/+0
| | | | | | | | | | | | | | 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/nouveau/aux: mask off higher bits of auxch index in i2c table entryBen Skeggs2012-08-141-1/+1
| | | | | | | | | | At least partially fixes DP output detection on W530. Not sure if more issues remain, or if my adaptor is just behaving weirdly (it does that sometimes). In any case, this patch is necessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stackBen Skeggs2012-05-071-178/+21
| | | | | | | | | | | | | Previous issues with i2c-algo-bit have now been resolved. This is a revert of f553b79c03f0dbd52f6f03abe8233a2bef8cbd0d mostly, due to fixes in the i2c core repairing the original issue, this code isn't required and was causing regressions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reported-by: Nick Bowler <nbowler@elliptictech.com> Tested-by: Nick Bowler <nbowler@elliptictech.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau/i2c: fix thinko/regression on really old chipsetsBen Skeggs2012-03-261-3/+3
| | | | | | | Fixes i2c on my TNT2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: do a better job at hiding the NIH i2c bit-banging algoDaniel Vetter2012-02-291-4/+4
| | | | | | | | | | | I'd like to export the corresponding functions from the i2c core so that I can use them in fallback bit-banging in i915.ko v2: Adapt to new i2c export patch. Cc: nouveau@lists.freedesktop.org Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/nouveau/i2c: handle bit-banging ourselvesBen Skeggs2011-12-211-21/+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-211-142/+88
| | | | | | | | | | 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-211-102/+200
| | | | | | | | 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: fix oops if i2c bus not found in nouveau_i2c_identify()Ben Skeggs2011-11-101-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gpu: add module.h to drivers/gpu files as required.Paul Gortmaker2011-10-311-0/+2
| | | | | | | So that we don't get build failures once the implicit module.h presence is removed. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* drm/nouveau: magic to make auxch on new macbooks booted in EFI mode workBen Skeggs2011-09-201-1/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/i2c: initial implementationBen Skeggs2011-09-201-16/+35
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix a few confusions between "chipset" and "card_type".Francisco Jerez2010-11-181-1/+1
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add support for I2C hardware monitoring devices.Francisco Jerez2010-09-241-2/+6
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix minor thinko from nvc0 changesBen Skeggs2010-08-171-1/+1
| | | | 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/nv50: use custom i2c algo for dp auxchBen Skeggs2010-08-061-21/+18
| | | | | | | | | | This makes it easier to see how this is working, and lets us transfer the EDID in blocks of 16 bytes. The primary reason for this change is because debug logs are rather hard to read with the hundreds of single-byte auxch transactions that occur. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Get rid of the remaining VGA CRTC locking.Francisco Jerez2010-07-261-6/+3
| | | | | 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-261-4/+15
| | | | | | | | | | 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: Add some generic I2C gadget detection code.Francisco Jerez2010-07-261-0/+34
| | | | | | | | | 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/nv50: fix monitor detection on certain chipsetsBen Skeggs2010-05-191-5/+16
| | | | | | | | | | There appears to be some kind of switch on certain chips to control whether the DP auxch or traditional i2c bus will be operational on a connector, this commit hopefully fixes nouveau to do the right thing. Likely only relevent on chips with DP outputs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: merge nvbios and nouveau_bios_infoBen Skeggs2010-02-251-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: merge parsed_dcb and bios_parsed_dcb into dcb_tableBen Skeggs2010-02-251-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix nouveau_i2c_find bounds checkingMarcin Slusarz2010-02-251-1/+1
| | | | | | | Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add DRM driver for NVIDIA GPUsBen Skeggs2009-12-111-0/+269
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>