summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2013-09-0223-80/+111
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next Alex writes: This is the radeon drm-next request. Big changes include: - support for dpm on CIK parts - support for ASPM on CIK parts - support for berlin GPUs - major ring handling cleanup - remove the old 3D blit code for bo moves in favor of CP DMA or sDMA - lots of bug fixes [airlied: fix up a bunch of conflicts from drm_order removal] * 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux: (898 commits) drm/radeon/dpm: make sure dc performance level limits are valid (CI) drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2) drm/radeon: gcc fixes for extended dpm tables drm/radeon: gcc fixes for kb/kv dpm drm/radeon: gcc fixes for ci dpm drm/radeon: gcc fixes for si dpm drm/radeon: gcc fixes for ni dpm drm/radeon: gcc fixes for trinity dpm drm/radeon: gcc fixes for sumo dpm drm/radeonn: gcc fixes for rv7xx/eg/btc dpm drm/radeon: gcc fixes for rv6xx dpm drm/radeon: gcc fixes for radeon_atombios.c drm/radeon: enable UVD interrupts on CIK drm/radeon: fix init ordering for r600+ drm/radeon/dpm: only need to reprogram uvd if uvd pg is enabled drm/radeon: check the return value of uvd_v1_0_start in uvd_v1_0_init drm/radeon: split out radeon_uvd_resume from uvd_v4_2_resume radeon kms: fix uninitialised hotplug work usage in r100_irq_process() drm/radeon/audio: set up the sads on DCE3.2 asics drm/radeon: fix handling of variable sized arrays for router objects ... Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/i915_gem_dmabuf.c drivers/gpu/drm/i915/intel_pm.c drivers/gpu/drm/radeon/cik.c drivers/gpu/drm/radeon/ni.c drivers/gpu/drm/radeon/r600.c
| * drm/nouveau/mc: fix race condition between constructor and request_irq()Ben Skeggs2013-08-217-14/+14
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/ltcg: fix allocating memory as freeMaarten Lankhorst2013-08-212-1/+5
| | | | | | | | | | | | | | | | | | | | Allocating type=0 marks the memory as free. This allows the ltcg memory to be allocated twice. Add a BUG_ON in core/mm.c to prevent this ever happening again. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/ltcg: fix ltcg memory initialization after suspendMaarten Lankhorst2013-08-211-9/+23
| | | | | | | | | | | | | | | | Some registers were not initialized in init, this causes them to be uninitialized after suspend. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb: fix null derefs in nv49 and nv4e initIlia Mirkin2013-08-212-8/+8
| | | | | | | | | | | | | | | | | | | | | | Commit dceef5d87 (drm/nouveau/fb: initialise vram controller as pfb sub-object) moved some code around and introduced these null derefs. pfb->ram is set to the new ram object outside of this ctor. Reported-by: Ronald Uitermark <ronald645@gmail.com> Tested-by: Ronald Uitermark <ronald645@gmail.com> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/vm: make vm refcount into a krefBen Skeggs2013-07-302-18/+11
| | | | | | | | | | | | | | Never used to be required, but a recent change made it necessary. Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph classIlia Mirkin2013-07-301-1/+4
| | | | | | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv40/mpeg: write magic value to channel object to make it workIlia Mirkin2013-07-301-0/+1
| | | | | | | | | | | | | | | | Looks like the rewrite in commit ebb945a94b ("drm/nouveau: port all engines to new engine module format") missed that one little detail. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50-/disp: remove dcb_outp_match call, and related variablesEmil Velikov2013-07-301-8/+0
| | | | | | | | | | | | | | Unused and irrelavant since the code move of DP training/linkcontrol interrupt Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nva3-/disp: fix hda eld writing, needs to be paddedIlia Mirkin2013-07-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits 0a9e2b959 (drm/nvd0/disp: move HDA codec setup to core) and a4feaf4ea (drm/nva3/disp: move hda codec handling to core) moved code around but neglected to fill data up to 0x60 as before. This caused /proc/asound/cardN/eld#3.0 to show eld_valid as 0. With this patch, that file is again populated with the correct data. See https://bugs.freedesktop.org/show_bug.cgi?id=67051 Reported-and-tested-by: Alex <alupu01@gmail.com> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv31/mpeg: fix mpeg engine initializationIlia Mirkin2013-07-301-2/+2
| | | | | | | | | | | | | | object->engine is null, which leads to a null deref down the line Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50/mc: include vp in the fb error reporting maskIlia Mirkin2013-07-301-1/+1
| | | | | | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50/gpio: post-nv92 cards have 32 interrupt linesEmil Velikov2013-07-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the original merge of nouveau to upstream kernel, we were assuming that nv90 (and later) cards have 32 lines. Based on mmio traces of the binary driver, as well as PBUS error messages during read/write of the e070/e074 registers, we can conclude that nv92 has only 16 lines whereas nv94 (and later) cards have 32. Reported-and-tested-by: David M. Lloyd <david.lloyd@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Cc: dri-devel@lists.freedesktop.org Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvc0/fb: take lock in nvc0_ram_put()Roy Spliet2013-07-303-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Kernel panic caused by list corruption in ltcg seems to indicate a concurrency issue. Take mutex of pfb like nv50_ram_put() to eliminate concurrency. V2: Separate critical section into separate function, avoid taking the lock twice on NVC0 Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core: xtensa firmware size needs to be 0x40000 no matter whatIlia Mirkin2013-07-301-1/+7
| | | | | | | | | | | | | | | | | | The current logic is wrong since we send fw->size >> 8 to the card. Rounding the size up by 0x100 and 0x1000 didn't seem to help, the card still hung, so go back to what the blob does -- 0x40000. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | nouveau: add runtime PM support (v0.9)Dave Airlie2013-08-294-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hooks nouveau up to the runtime PM system to enable dynamic power management for secondary GPUs in switchable and optimus laptops. a) rewrite suspend/resume printks to hide them during dynamic s/r to avoid cluttering logs b) add runtime pm suspend to irq handler, crtc display, ioctl handler, connector status, c) handle hdmi audio dynamic power on/off using magic register. v0.5: make sure we hit D3 properly fix fbdev_set_suspend locking interaction, we only will poweroff if we have no active crtcs/fbcon anyways. add reference for active crtcs. sprinkle mark last busy for autosuspend timeout v0.6: allow more flexible debugging - to avoid log spam add option to enable/disable dynpm got to D3Cold v0.7: add hdmi audio support. v0.8: call autosuspend from idle, so pci config space access doesn't go straight back to sleep, this makes starting X faster. only signal usage if we actually handle the irq, otherwise usb keeps us awake. fix nv50 display active powerdown v0.9: use masking function to enable hdmi audio set busy when we fail to suspend Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge tag 'drm-intel-next-2013-07-26-fixed' of ↵Dave Airlie2013-08-077-0/+26
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~danvet/drm-intel into drm-next Neat that QA (and Ben) keeps on humming along while I'm on vacation, so you already get the next feature pull request: - proper eLLC support for HSW from Ben - more interrupt refactoring - add w/a tags where we implement them already (Damien) - hangcheck fixes (Chris) + hangcheck stats (Mika) - flesh out the new vm structs for ppgtt and ggtt (Ben) - PSR for Haswell, still disabled by default (Rodrigo et al.) - pc8+ refclock sequence code from Paulo - more interrupt refactoring from Paulo, unifying ilk/snb with the ivb/hsw interrupt code - full solution for the Haswell concurrent reg access issues (Chris) - fix racy object accounting, used by some new leak tests - fix sync polarity settings on ch7xxx dvo encoder - random bits&pieces, little fixes and better debug output all over [airlied: fix conflict with drm_mm cleanups] * tag 'drm-intel-next-2013-07-26-fixed' of git://people.freedesktop.org/~danvet/drm-intel: (289 commits) drm/i915: Do not dereference NULL crtc or fb until after checking drm/i915: fix pnv display core clock readout out drm/i915: Replace open-coded offset_in_page() drm/i915: Retry DP aux_ch communications with a different clock after failure drm/i915: Add messages useful for HPD storm detection debugging (v2) drm/i915: dvo_ch7xxx: fix vsync polarity setting drm/i915: fix the racy object accounting drm/i915: Convert the register access tracepoint to be conditional drm/i915: Squash gen lookup through multiple indirections inside GT access drm/i915: Use the common register access functions for NOTRACE variants drm/i915: Use a private interface for register access within GT drm/i915: Colocate all GT access routines in the same file drm/i915: fix reference counting in i915_gem_create drm/i915: Use Graphics Base of Stolen Memory on all gen3+ drm/i915: disable stolen mem for OVERLAY_NEEDS_PHYSICAL drm/i915: add functions to disable and restore LCPLL drm/i915: disable CLKOUT_DP when it's not needed drm/i915: extend lpt_enable_clkout_dp drm/i915: fix up error cleanup in i915_gem_object_bind_to_gtt drm/i915: Add some debug breadcrumbs to connector detection ...
| * drm/nouveau: add falcon interrupt handlerMaarten Lankhorst2013-07-107-0/+26
| | | | | | | | | | | | | | | | This prevents 100% cpu usage on fermi cards when the exit interrupt from the secret scrubber is not acked. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm: don't push static constants on stack for %*phAndy Shevchenko2013-08-071-1/+1
|/ | | | | | | | | There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nvc0/gr: fix gpc firmware regressionMaarten Lankhorst2013-07-082-20/+23
| | | | | | | | | | | "drm/nve0-/gr: some new gpc registers can have multiple copies" 5ee86c4190f9e caused a regression for nvc0, because the bit indicating last transfer has occured was no longer set, resulting in random system lockups. Reported-by: Ronald Uitermark <ronald645@gmail.com> Tested-by: Ronald Uitermark <ronald645@gmail.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/disp: Fix HDMI audio regressionIlia Mirkin2013-07-051-0/+4
| | | | | | | | | | | | This is the nva3 counterpart to commit beba44b17 (drm/nv84/disp: Fix HDMI audio regression). The regression happened as a result of refactoring in commit 8e9e3d2de (drm/nv84/disp: move hdmi control into core). Reported-and-tested-by: Max Baldwin <archerseven@gmail.com> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
* drm/nv50-/disp: Use output specific mask in interruptEmil Velikov2013-07-051-1/+5
| | | | | | | | | | | | | | | | | | | | | The commit commit 476e84e126171d809f9c0b5d97137f5055f95ca8 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Feb 11 09:24:23 2013 +1000 drm/nv50-/disp: initial supervisor support for off-chip encoders changed the write mask in one of the interrupt functions for on-chip encoders, causing a regression in certain VGA dual-head setups. This commit reintroduces the mask thus resolving the regression Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66129 Reported-and-Tested-by: Yves-Alexis <corsac@debian.org> Cc: stable@vger.kernel.org [3.9+] CC: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use vmalloc for pgt allocationMarcin Slusarz2013-07-051-3/+3
| | | | | | | | | Page tables on nv50 take 48kB, which can be hard to allocate in one piece. Let's use vmalloc. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: stable@vger.kernel.org [3.7+] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: remove some more of the hardcoded register writesBen Skeggs2013-07-053-28/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: factor out yet more unknown magic into versioned functionsBen Skeggs2013-07-059-14/+42
| | | | | | | | NVC1/NVD9 are the only chipsets that should have anything different happen on them after this. We previously weren't doing these register modifications, and NVIDIA do. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd7/devinit: use fermi class, not teslaBen Skeggs2013-07-051-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0-/gr: ctxsw scratch reg count got bumped to 16Ben Skeggs2013-07-0512-3034/+3303
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: remove hardcoding of UNK count/mask in GPCCS ucodeBen Skeggs2013-07-054-95/+129
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0/gr: build cs ucode for GK110Ben Skeggs2013-07-056-0/+1431
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: extend one of the magic calculations for >4 GPCsBen Skeggs2013-07-051-6/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0/gr: fix ddx shaders locking up on meBen Skeggs2013-07-053-3/+54
| | | | | | | This can be generalised and used on GK104 (probably even GF117), but lets just make it work for now. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/devinit: minor typoBen Skeggs2013-07-051-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0/gr: enable support, if external cs ucode is availableBen Skeggs2013-07-052-1/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0/gr: magic sequence that makes PGRAPH come out of hidingBen Skeggs2013-07-052-4/+48
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0/ce: enable supportBen Skeggs2013-07-051-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0/fifo: enable supportBen Skeggs2013-07-052-2/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd7/gr: initial supportMaarten Lankhorst2013-07-0521-20/+1928
| | | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: generate cs register lists from grctx dataBen Skeggs2013-07-0511-2073/+1152
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: tpc regs a subset of gpc, add separate list for gpc/unk regsBen Skeggs2013-07-058-34/+52
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0-/gr: some new gpc registers can have multiple copiesBen Skeggs2013-07-054-180/+227
| | | | | | | | | GK110 exposes more than one, and needs to be dealt with in the ctxsw ucode just like the TPC sets are. Broadcast is at +0xe00. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: pull out a group of separately context-switched gpc regsBen Skeggs2013-07-056-96/+68
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0-/gr: make register lists from initvals functionsBen Skeggs2013-07-0520-8421/+6112
| | | | | | Generated context verified to be the same for all supported chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0-/disp: handle case where display engine is missing/disabledMaarten Lankhorst2013-07-015-1/+16
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gr/nvc0-: merge nvc0/nve0 ucode, and use cpp instead of m4Ben Skeggs2013-07-0114-2587/+1270
| | | | | | No code changes, proven by envyas producing identical binaries. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bsp/nv84: initial vp2 engine implementationIlia Mirkin2013-07-013-14/+16
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/vp/nv84: initial vp2 engine implementationIlia Mirkin2013-07-014-14/+17
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: xtensa engine base class implementationIlia Mirkin2013-07-012-0/+208
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/vdec: fork vp3 implementations from vp2Ilia Mirkin2013-07-015-14/+202
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: move falcon class to engine/Ben Skeggs2013-07-0110-23/+20
| | | | | | | | Not really "core" per-se. About to merge Ilia's work adding another similar class for the VP2 xtensa engines, so, seems like a good time to move all these to engine/. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/vm: perform a bar flush when flushing vmMaarten Lankhorst2013-07-012-0/+8
| | | | | | | | | | Appears to fix the regression from "drm/nvc0/vm: handle bar tlb flushes internally". nvidia always seems to do this flush after writing values. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud