summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvd0_display.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nvd0/disp: allocate display and evo channels from driver coreBen Skeggs2012-11-291-354/+375
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/drm/nvd0/disp: display->dispBen Skeggs2012-11-291-15/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: introduce a nvd0_head as a subclass of nouveau_crtcBen Skeggs2012-11-291-20/+24
| | | | | | | This will be used instead of storing a heap of per-head data (such as evo channels) in nvd0_display in some other way. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2012-10-031-239/+265
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * drm/nouveau: port remainder of drm code, and rip out compat layerBen Skeggs2012-10-031-180/+228
| | | | | | | | | | | | | | | | 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: start culling unused codeBen Skeggs2012-10-031-12/+0
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: port all engines to new engine module formatBen Skeggs2012-10-031-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a HUGE commit, but it's not nearly as bad as it looks - any problems can be isolated to a particular chipset and engine combination. It was simply too difficult to port each one at a time, the compat layers are *already* ridiculous. Most of the changes here are simply to the glue, the process for each of the engine modules was to start with a standard skeleton and copy+paste the old code into the appropriate places, fixing up variable names etc as needed. v2: Marcin Slusarz <marcin.slusarz@gmail.com> - fix find/replace bug in license header v3: Ben Skeggs <bskeggs@redhat.com> - bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and left no space for kernel's requirements during GEM pushbuf submission. - fix duplicate assignments noticed by clang v4: Marcin Slusarz <marcin.slusarz@gmail.com> - add sparse annotations to nv04_fifo_pause/nv04_fifo_start - use ioread32_native/iowrite32_native for fifo control registers v5: Ben Skeggs <bskeggs@redhat.com> - rebase on v3.6-rc4, modified to keep copy engine fix intact - nv10/fence: unmap fence bo before destroying - fixed fermi regression when using nvidia gr fuc - fixed typo in supported dma_mask checking Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/pageflip: kick flip handling out of engsw and into fenceBen Skeggs2012-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | This is all very much a policy thing, and hence will not belong in SW after the rework. engsw now only handles receiving the event to say "can flip now" and makes a callback to perform the actual work. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/instmem: completely new implementation, as a subdev moduleBen Skeggs2012-10-031-3/+2
| | | | | | | | | | | | | | | | v2 (Ben Skeggs): - some fixes for 64KiB PAGE_SIZE - fix porting issues in (currently unused) nv41/nv44 pciegart code Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb: merge fb/vram and port to subdev interfacesBen Skeggs2012-10-031-3/+3
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: implement devinit subdev, and new init table parserBen Skeggs2012-10-031-35/+35
| | | | | | | | | | | | | | v2: - make sure not to execute display scripts unless resuming Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells2012-10-021-2/+2
|/ | | | | | | | | | | 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/nvd0/disp: hopefully fix selection of 6/8bpc mode on DP outputsBen Skeggs2012-08-311-2/+2
| | | | | | | | | | | I have a very limited number of traces available for DP on NVD9+, but, these values produce the same as the binary driver on a confirmed 18-bit eDP panel and a confirmed 24-bit eDP panel (Retina MBP). It's interesting that the bitfield values also match the MODE_CTRL values that control the same thing on nv50:nvd9. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinateChristoph Bumiller2012-08-141-1/+1
| | | | | | Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
* drm: Make the .mode_fixup() operations mode argument a const pointerLaurent Pinchart2012-07-191-3/+5
| | | | | | | | The passed mode must not be modified by the operation, make it const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: move flip-related channel setup to software engineBen Skeggs2012-05-241-1/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: remove unnecessary sync from flip_nextBen Skeggs2012-05-241-2/+0
| | | | | | | | | | This shouldn't be necessary, I believe this is just a bit of missed debug code that got left over somehow. Causes flips to be always synced to vblank, regardless of swap interval, which we don't want.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use the same packet header macros as userspaceBen Skeggs2012-05-241-2/+2
| | | | | | Cosmetic cleanup only. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nouveau: add PRIME supportDave Airlie2012-05-231-3/+3
| | | | | | | | | | | | This adds prime->fd and fd->prime support to nouveau, it passes the SG object to TTM, and then populates the GART entries using it. v2: add stubbed kmap + use new function to fill out pages array for faulting + add reimport test. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau/dp: support version 4.0 of DP tableBen Skeggs2012-03-231-0/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/disp: nvidia randomly decided to move the dithering methodBen Skeggs2012-03-231-1/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: ignore clock set if no pclkBen Skeggs2012-03-221-1/+3
| | | | | | | | | This happens somehow during init on a machine I have, and leads to a divide-by-zero. Lets avoid that... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove subchannel names from places where it doesn't matterBen Skeggs2012-03-221-2/+2
| | | | | | These are FIFO methods, it doesn't matter what subchannel is being used. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: disconnect encoders before reprogramming themBen Skeggs2012-03-131-33/+33
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: move syncs/magic setup to or mode_setBen Skeggs2012-03-131-20/+39
| | | | | | | | | | NVIDIA appear to do these around the same place they do the MODE_CTRL methods, and for DP at least we need to bash some extra bits in "syncs" to keep EVO happy. It's a bit of a guess as to the 6/8bpc, but i have no better idea yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: fix dcb sor link matching in supervisor handlerBen Skeggs2012-03-131-8/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: initial implementation of displayportBen Skeggs2012-03-131-0/+169
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: attempt to handle more than 2 crtcs if possibleBen Skeggs2012-03-131-19/+14
| | | | | | | Theoretically handles CRTC2/CRTC3, should any GF119 out there actually have them enabled. The room is there for the regs etc, so why not :) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp: parse connector info directly in nouveau_connector.cBen Skeggs2011-12-211-1/+1
| | | | | | | | | | | | 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/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-211-53/+243
| | | | 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-211-30/+64
| | | | 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/disp: introduce proper init/fini, separate from create/destroyBen Skeggs2011-12-211-7/+1
| | | | 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: improve dithering properties, and implement proper auto modeBen Skeggs2011-12-211-11/+16
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: no need to pass parameters into set_scale/ditherBen Skeggs2011-12-211-8/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: fix sor dpms typo, preventing dpms on in some situationsBen Skeggs2011-11-301-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd9/disp: bail out of mode_set_base if no fb bound to crtcBen Skeggs2011-09-201-0/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd9/disp: stub some more api hooks so we don't oops on resumeBen Skeggs2011-09-201-0/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: tidy up what we have so farBen Skeggs2011-09-201-61/+36
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>