summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvd0_display.c
AgeCommit message (Collapse)AuthorFilesLines
2012-11-29drm/nouveau: rename nvd0_display to nv50_display to reflect reality since mergeBen Skeggs1-2039/+0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: implement support for colour vibrance controlBen Skeggs1-0/+35
Ported from original nv50 commit by Christoph, with added support for the setting on later chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: remove fetching of capabilities reportBen Skeggs1-7/+1
Unused, and caused a race with evo_sync(). Will revisit using it properly later on. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: enable support for older display classesBen Skeggs1-1/+10
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: support creation of fb dma objects on older chipsetsBen Skeggs1-36/+131
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: implement support for older DISP_SYNC classesBen Skeggs1-20/+44
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: implement sor support for older display classesBen Skeggs1-45/+61
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: implement dac support for older display classesBen Skeggs1-25/+48
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: start implementing support for older display classesBen Skeggs1-87/+233
Currently unused, but checkpointing the merged head handling routines. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nouveau/dp: move core link training calls to common codeBen Skeggs1-42/+2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: calculate U script id in supervisor interruptBen Skeggs1-11/+6
This is like we do on nv50:nvd9 already. There's been no problems seen yet with using this *seemingly* scratch register to store the value, but we won't be able to do this anymore once nv50's code is merged. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nv50/disp: call into core for dac load detectionBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: handle DP transfer unit setup from second supervisor interruptBen Skeggs1-51/+0
This is what we've done forever in nv50_display.c, and also allows the last direct MMIO accesses to be removed from nvd0_display.c. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: move HDMI control to coreBen Skeggs1-29/+8
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: move HDA codec setup to coreBen Skeggs1-18/+6
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: call into core to handle dac power state changesBen Skeggs1-20/+9
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: call into core to handle sor power state changesBen Skeggs1-9/+2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: move link training helpers into core as display methodsBen Skeggs1-82/+12
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: move remaining interrupt handling to coreBen Skeggs1-252/+0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: allocate display and evo channels from driver coreBen Skeggs1-354/+375
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nouveau/drm/nvd0/disp: display->dispBen Skeggs1-15/+15
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29drm/nvd0/disp: introduce a nvd0_head as a subclass of nouveau_crtcBen Skeggs1-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>
2012-10-03Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-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 ...
2012-10-03drm/nouveau: port remainder of drm code, and rip out compat layerBen Skeggs1-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>
2012-10-03drm/nouveau: start culling unused codeBen Skeggs1-12/+0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-03drm/nouveau: port all engines to new engine module formatBen Skeggs1-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>
2012-10-03drm/nouveau/pageflip: kick flip handling out of engsw and into fenceBen Skeggs1-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>
2012-10-03drm/nouveau/instmem: completely new implementation, as a subdev moduleBen Skeggs1-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>
2012-10-03drm/nouveau/fb: merge fb/vram and port to subdev interfacesBen Skeggs1-3/+3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-03drm/nouveau: implement devinit subdev, and new init table parserBen Skeggs1-35/+35
v2: - make sure not to execute display scripts unless resuming Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells1-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>
2012-08-31drm/nvd0/disp: hopefully fix selection of 6/8bpc mode on DP outputsBen Skeggs1-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>
2012-08-14drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinateChristoph Bumiller1-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
2012-07-19drm: Make the .mode_fixup() operations mode argument a const pointerLaurent Pinchart1-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>
2012-05-24drm/nouveau: move flip-related channel setup to software engineBen Skeggs1-1/+3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nvd0/disp: remove unnecessary sync from flip_nextBen Skeggs1-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>
2012-05-24drm/nouveau: use the same packet header macros as userspaceBen Skeggs1-2/+2
Cosmetic cleanup only. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-23nouveau: add PRIME supportDave Airlie1-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>
2012-03-23drm/nouveau/dp: support version 4.0 of DP tableBen Skeggs1-0/+6
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-23drm/nve0/disp: nvidia randomly decided to move the dithering methodBen Skeggs1-1/+8
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nvd0/disp: ignore clock set if no pclkBen Skeggs1-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>
2012-03-22drm/nouveau: remove subchannel names from places where it doesn't matterBen Skeggs1-2/+2
These are FIFO methods, it doesn't matter what subchannel is being used. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: disconnect encoders before reprogramming themBen Skeggs1-33/+33
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: move syncs/magic setup to or mode_setBen Skeggs1-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>
2012-03-13drm/nvd0/disp: fix dcb sor link matching in supervisor handlerBen Skeggs1-8/+9
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: initial implementation of displayportBen Skeggs1-0/+169
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: attempt to handle more than 2 crtcs if possibleBen Skeggs1-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>
2011-12-21drm/nouveau/disp: parse connector info directly in nouveau_connector.cBen Skeggs1-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>
2011-12-21drm/nvd0/disp: use single, shared, sync bo for all evo channelsBen Skeggs1-31/+32
This simplifies some things, and hopefully won't come back to bite me. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-12-21drm/nvd0/disp: rename sync channel to flip channelBen Skeggs1-9/+9
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>