aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-10-02UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/.David Howells43-46/+0
Remove redundant DRM UAPI header #inclusions from drivers/gpu/. Remove redundant #inclusions of core DRM UAPI headers (drm.h, drm_mode.h and drm_sarea.h). They are now #included via drmP.h and drm_crtc.h via a preceding patch. Without this patch and the patch to make include the UAPI headers from the core headers, after the UAPI split, the DRM C sources cannot find these UAPI headers because the DRM code relies on specific -I flags to make #include "..." work on headers in include/drm/ - but that does not work after the UAPI split without adding more -I flags. 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-09-27drm/nvc0/fifo: ignore bits in PFIFO_INTR that aren't set in PFIFO_INTR_ENBen Skeggs2-2/+4
PFIFO_INTR = 0x40000000 appears to be a normal case on nvc0/nve0 PFIFO, the binary driver appears to completely ignore it in its PFIFO interrupt handler and even masks off the bit (as we do) in PFIFO_INTR_EN at init time. The bits still light up in the hardware sometimes though, so lets just ignore any bits we haven't explicitely requested. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-09-26drm/nvc0/ltcg: mask off intr 0x10Ben Skeggs1-0/+1
NVIDIA do that at startup too on Fermi, so perhaps the heap of 0x10 intrs we receive are normal and we can ignore them. On Kepler NVIDIA *don't* do this, but the hardware appears to come up with the bit masked off by default - so that's probably why :) This should silence some interrupt spam seen on Fermi+ boards. Backported patch from reworked nouveau kernel tree. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-09-26drm/nouveau: silence a debug message triggered by newer userspaceBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-09-21drm/nouveau: add dmi quirk for gpio resetDave Airlie1-0/+16
This fixes the gpio reset problem so the Retina MBP works, but avoids breaking the Dell systems. Ben will work on a better solution for 3.7. Tested by me on retina MBP. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-20Revert "drm/nv50-/gpio: initialise to vbios defaults during init"Dave Airlie1-3/+0
This reverts commit 991083ba60f89e717e3a4175be96d48a810e9eae. We discovered this causes problem on some Dell eDP laptops, so Apple lose out for now, I might try and whip up a dmi based workaround for 3.6 but I'm not sure I'll get time. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-14drm/nouveau: fix booting with plymouth + dumb supportDave Airlie1-1/+1
We noticed a plymouth bug on Fedora 18, and I then noticed this stupid thinko, fixing it fixed the problem with plymouth. Cc: stable@vger.kernel.org Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-02Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/nouveau/linux-2.6 into drm-fixesDave Airlie2-2/+5
These two fix the MacBook Pro 2012 Retina display. * 'drm-nouveau-fixes' of git://anongit.freedesktop.org/nouveau/linux-2.6: drm/nv50-/gpio: initialise to vbios defaults during init drm/nvd0/disp: hopefully fix selection of 6/8bpc mode on DP outputs
2012-08-31drm/nv50-/gpio: initialise to vbios defaults during initBen Skeggs1-0/+3
This is required to fix an issue on the Retina MBP where the eDP panel's AUX channel isn't wired up to the HPD pin for the panel, causing our aux code to bail out early. From looking at various traces of the binary driver, it appears NVIDIA do something very similar on at least all nv50+ chipsets during their initialisation sequence. So, hopefully this is safe. Issue and fix initially tracked down by Ryan Bourgeois on fdo#51971. Backported fix from reworked nouveau kernel module. Signed-off-by: Ben Skeggs <bskeggs@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-29Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixesDave Airlie1-2/+4
Ben says its just a single fix to avoid the wrong pcopy units being used. * 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nvc0/copy: check PUNITS to determine which copy engines are disabled
2012-08-29drm/nvc0/copy: check PUNITS to determine which copy engines are disabledBen Skeggs1-2/+4
On some Fermi chipsets (NVCE particularly) PCOPY1 doesn't exist. And if what I've seen on Kepler is true of Fermi too, chipsets of the same type can have different PCOPY units available. This should fix a v3.5 regression reported by a number of people effecting suspend/resume on NVC8/NVCE chipsets. Cc: stable@vger.kernel.org [3.5] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-08-17vga_switcheroo: Don't require handler init callbackSeth Forshee1-6/+0
This callback is a no-op in nouveau, and the upcoming apple-gmux switcheroo support won't require it either. Rather than forcing drivers to stub it out, just make it optional and remove the callback from nouveau. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-14drm/nv86/fifo: suspend fixMaxim Levitsky1-0/+9
This fix is a backport from the reworked nouveau driver. It masks off the engines we're not expecting to use before attempting a channel kickoff. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-08-14drm/nouveau: disable copy engine on NVAFHenrik Rydberg1-1/+0
The copy engine exhibits random memory corruption in at least one case, the GeForce 320M (nv50, 0xaf) in the MacBookAir3,1. This patch omits creating the engine for the specific chipset, falling back to M2MF, which kills the symptoms. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-08-14nouveau: fixup scanout enable in nvc0_pmMaarten Lankhorst1-1/+1
Fixes screen being black after changing performance level. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: stable@vger.kernel.org [3.5+] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-08-14drm/nouveau/aux: mask off higher bits of auxch index in i2c table entryBen Skeggs1-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>
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-08-03drm/nve0/fifo: add support for the flip completion swmthdBen Skeggs1-4/+33
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-nextDave Airlie20-342/+585
* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau: init vblank requests list drm/nv50: extend vblank semaphore to generic dmaobj + offset pair drm/nouveau: mark most of our ioctls as deprecated, move to compat layer drm/nouveau: move current gpuobj code out of nouveau_object.c drm/nouveau/gem: fix object reference leak in a failure path drm/nv50: rename INVALID_QUERY_OR_TEXTURE error to INVALID_OPERATION drm/nv84: decode PCRYPT errors drm/nouveau: dcb table quirk for fdo#50830 nouveau: Fix alignment requirements on src and dst addresses
2012-07-26drm/nouveau: init vblank requests listMarcin Slusarz3-6/+1
Fixes kernel panic when vblank interrupt triggers before first sync to vblank request. (Besides init, remove some relevant leftovers from vblank rework) Reported-by: Ortwin Glück <odi@odi.ch> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: stable@vger.kernel.org [3.5] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26drm/nv50: extend vblank semaphore to generic dmaobj + offset pairBen Skeggs5-53/+32
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26drm/nouveau: mark most of our ioctls as deprecated, move to compat layerBen Skeggs9-267/+346
These will be replaced in the near future, the code isn't yet stable enough for this merge window however. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26drm/nouveau: move current gpuobj code out of nouveau_object.cBen Skeggs3-2/+2
I want this file for the new interfaces... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26drm/nouveau/gem: fix object reference leak in a failure pathBen Skeggs1-0/+1
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2012-07-26drm/nv50: rename INVALID_QUERY_OR_TEXTURE error to INVALID_OPERATIONMarcin Slusarz1-1/+1
Current name is misleading, because this error can be triggered by other conditions, like changing STRMOUT parameter without disabling STRMOUT first. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26drm/nv84: decode PCRYPT errorsMarcin Slusarz1-3/+15
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26drm/nouveau: dcb table quirk for fdo#50830Ben Skeggs1-0/+12
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-07-26nouveau: Fix alignment requirements on src and dst addressesMaarten Lankhorst3-10/+175
Linear copy works by adding the offset to the buffer address, which may end up not being 16-byte aligned. Some tests I've written for prime_pcopy show that the engine allows this correctly, so the restriction on lowest 4 bits of address can be lifted safely. The comments added were by envyas, I think because I used a newer version. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: stable@vger.kernel.org
2012-07-25drm: track dev_mapping in more robust and flexible wayIlija Hadzic1-2/+1
Setting dev_mapping (pointer to the address_space structure used for memory mappings) to the address_space of the first opener's inode and then failing if other openers come in through a different inode has a few restrictions that are eliminated by this patch. If we already have valid dev_mapping and we spot an opener with different i_node, we force its i_mapping pointer to the already established address_space structure (first opener's inode). This will make all mappings from drm device hang off the same address_space object. Some benefits (things that now work and didn't work before) of this patch are: * user space can mknod and use any number of device nodes and they will all work fine as long as the major device number is that of the drm module. * user space can even remove the first opener's device nodes and mknod the new one and the applications and windowing system will still work. * GPU drivers can safely assume that dev->dev_mapping is correct address_space and just blindly copy it into their (private) bdev.dev_mapping For reference, some discussion that lead to this patch can be found here: http://lists.freedesktop.org/archives/dri-devel/2012-April/022283.html Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-20Merge tag 'v3.5-rc7' into drm-nextDave Airlie2-1/+24
Merge Linus tree into drm to fixup conflicts in radeon code for further testing before upstream merge. Signed-off-by: Dave Airlie <airlied@redhat.com> Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/radeon/radeon_gart.c
2012-07-19drm: kill reclaim_buffers callbackDaniel Vetter1-1/+0
All leftover users either haven't set DRIVER_HAVE_DMA, in which case this will never be called, or use the drm_core implementation. Call that directly in the only callsite. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-19drm: Make the .mode_fixup() operations mode argument a const pointerLaurent Pinchart8-10/+14
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-06-27drm/nouveau: add license header to prime.Dave Airlie1-0/+23
Just forgot this when I posted it, and yes I'm the only person to have changed the file since. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-26drm/nouveau/fbcon: using nv_two_heads is not a good ideaBen Skeggs1-1/+1
nv_two_heads() was never meant to be used outside of pre-nv50 code. The code checks for >= NV_10 for 2 CRTCs, then downgrades a few specific chipsets to 1 CRTC based on (pci_device & 0x0ff0). The breakage example seen is on GTX 560Ti, with a pciid of 0x1200, which gets detected as an NV20 (0x020x) with 1 CRTC by nv_two_heads(), causing memory corruption because there's actually 2 CRTCs.. This switches fbcon to use the CRTC count directly from the mode_config structure, which will also fix the same issue on Kepler boards which have 4 CRTCs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-31nouveau: add vmap support to nouveau prime supportDave Airlie2-0/+42
Tested sharing to udl. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-31nouveau: add stub dma-buf mmap functionality.Dave Airlie1-0/+6
This just adds a stub until we have some users in place to test this with. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-24Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds82-3055/+9845
Pull main drm updates from Dave Airlie: "This is the main merge window request for the drm. It's big, but jam packed will lots of features and of course 0 regressions. (okay maybe there'll be one). Highlights: - new KMS drivers for server GPU chipsets: ast, mgag200 and cirrus (qemu only). These drivers use the generic modesetting drivers. - initial prime/dma-buf support for i915, nouveau, radeon, udl and exynos - switcheroo audio support: so GPUs with HDMI can turn off the sound driver without crashing stuff. - There are some patches drifting outside drivers/gpu into x86 and EFI for better handling of multiple video adapters in Apple Macs, they've got correct acks except one trivial fixup. - Core: edid parser has better DMT and reduced blanking support, crtc properties, plane properties, - Drivers: exynos: add 2D core accel support, prime support, hdmi features intel: more Haswell support, initial Valleyview support, more hdmi infoframe fixes, update MAINTAINERS for Daniel, lots of cleanups and fixes radeon: more HDMI audio support, improved GPU lockup recovery support, remove nested mutexes, less memory copying on PCIE, fix bus master enable race (kexec), improved fence handling gma500: cleanups, 1080p support, acpi fixes nouveau: better nva3 memory reclocking, kepler accel (needs external firmware rip), async buffer moves on nv84+ hw. I've some more dma-buf patches that rely on the dma-buf merge for vmap stuff, and I've a few fixes building up, but I'd decided I'd better get rid of the main pull sooner rather than later, so the audio guys are also unblocked." Fix up trivial conflict due to some duplicated changes in drivers/gpu/drm/i915/intel_ringbuffer.c * 'drm-core-next' of git://people.freedesktop.org/~airlied/linux: (605 commits) drm/nouveau/nvd9: Fix GPIO initialisation sequence. drm/nouveau: Unregister switcheroo client on exit drm/nouveau: Check dsm on switcheroo unregister drm/nouveau: fix a minor annoyance in an output string drm/nouveau: turn a BUG into a WARN drm/nv50: decode PGRAPH DATA_ERROR = 0x24 drm/nouveau/disp: fix dithering not being enabled on some eDP macbooks drm/nvd9/copy: initialise copy engine, seems to work like nvc0 drm/nvc0/ttm: use copy engines for async buffer moves drm/nva3/ttm: use copy engine for async buffer moves drm/nv98/ttm: add in a (disabled) crypto engine buffer copy method drm/nv84/ttm: use crypto engine for async buffer copies drm/nouveau/ttm: untangle code to support accelerated buffer moves drm/nouveau/fbcon: use fence for sync, rather than notifier drm/nv98/crypt: non-stub implementation of the engine hooks drm/nouveau/fifo: turn all fifo modules into engine modules drm/nv50/graph: remove ability to do interrupt-driven context switching drm/nv50: remove manual context unload on context destruction drm/nv50: remove execution engine context saves on suspend drm/nv50/fifo: use hardware channel kickoff functionality ...
2012-05-24drm/nouveau/nvd9: Fix GPIO initialisation sequence.Marcin Kościelnicki1-1/+1
Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nouveau: Unregister switcheroo client on exitAndreas Heider1-0/+2
Currently nouveau only registers as a vga_switcheroo client, but never unregisters. This patch adds the necessary unregister calls. Signed-off-by: Andreas Heider <andreas@meetr.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nouveau: Check dsm on switcheroo unregisterAndreas Heider1-1/+2
Currently vga_switcheroo_unregister_handler is called unconditionally when nouveau is unloaded, even when nouveau never registered a handler. This interferes with other switcheroo handlers, as vga_switcheroo doesn't check who called unregister_handler, but simply unregisters the current handler. This patch adds a check so unregister is only called if a handler was registered by nouveau before. Signed-off-by: Andreas Heider <andreas@meetr.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nouveau: fix a minor annoyance in an output stringBen Skeggs1-1/+1
Bugs me every time I put in the TNT2.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nouveau: turn a BUG into a WARNBen Skeggs1-1/+1
This is very annoying sometimes.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nv50: decode PGRAPH DATA_ERROR = 0x24Marcin Slusarz1-0/+1
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nouveau/disp: fix dithering not being enabled on some eDP macbooksBen Skeggs1-1/+7
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nvd9/copy: initialise copy engine, seems to work like nvc0Ben Skeggs1-1/+2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nvc0/ttm: use copy engines for async buffer movesBen Skeggs1-9/+51
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nva3/ttm: use copy engine for async buffer movesBen Skeggs1-1/+40
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nv98/ttm: add in a (disabled) crypto engine buffer copy methodBen Skeggs1-1/+20
Disabled for the moment until some performance issues are sorted out, code committed as a reference point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24drm/nv84/ttm: use crypto engine for async buffer copiesBen Skeggs1-0/+19
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>