summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* pwr/memx: Make FB disable and enable explicitRoy Spliet2014-10-026-6/+43
| | | | | | | | | | | | | Needs to be done after wait-for-VBLANK, and NVA3 requires register writes in between. Rather than hard-coding register writes, just split out fb_disable and fb_enable. v2. Squashed "fb/ramnve0: disable fb before reclocking" Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr/memx/nva3: Implement "wait for VBLANK"Roy Spliet2014-10-029-994/+1356
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm/nv84+: do not expose non-calibrated internal temp sensorMartin Peres2014-10-021-1/+6
| | | | | Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm: make sure the temperature settings are sane on nv84+Martin Peres2014-10-024-1/+35
| | | | | | | | | | | | One of my nv92 has a calibrated internal sensor but it displays 0°C as the default values use sw calibration values to force the temperature to 0. Since we cannot read the temperature from the adt7473 present on this board, let's re-enable the internal reading! Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* subdev: add a pfuse subdev v2Martin Peres2014-10-0221-1/+380
| | | | | | | | | | | | We will use this subdev to disable temperature reading on cards that did not get a sensor calibration in the factory. v2: - rename "nouveau_fuse_rd32" to "gxXXX_fuse_rd32" as adviced by Christian Costa - fold the code a little as adviced by Emil Velikov Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/nva3: Set intermediate core clock on reclockingRoy Spliet2014-10-023-14/+51
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/nva3: For PLL clocks always make sure the PLL is not in useRoy Spliet2014-10-021-0/+9
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/nva3: Abort when PLL doesn't lockRoy Spliet2014-10-021-1/+5
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/nva3: HOST clockRoy Spliet2014-10-022-8/+78
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/nva3: Set PLL refclkRoy Spliet2014-10-023-29/+48
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/nva3: Parse clock control registers more accuratelyRoy Spliet2014-10-021-4/+28
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: Fix duplicate definition of NV04_PFB_BOOT_0_*Pierre Moreau2014-10-024-32/+25
| | | | | Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: Display Nouveau boot options at launchPierre Moreau2014-10-029-6/+37
| | | | | | | | | It can help to remove any ambiguity about which options were passed to Nouveau, especially in case the user had some options set in /etc/modprobe.d/*.conf that he forgot about, as they won't appear in a dmesg. Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr: wait for scrubbers to finish before uploading new ucodeBen Skeggs2014-10-021-3/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr/fuc: make $r1-$r10 registers callee-saved in kernel.fucMartin Peres2014-10-025-736/+749
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr/fuc: add ld/st macrosMartin Peres2014-10-021-0/+10
| | | | | Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr: add helpers for delay-to-ticks and ticks-to-delayMartin Peres2014-10-029-2284/+2446
| | | | | Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr: add some arith functions (mul32_32_64, subu64 and addu64)Martin Peres2014-10-0212-1736/+1922
| | | | | Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr: fix the timers implementation with concurent processesMartin Peres2014-10-025-990/+1133
| | | | | | | | | | | | | | | | | | The problem with the current implementation is that adding a timer improperly checked which process would time up first by not taking into account how much time elapsed since their timer got scheduled. Rework the re-scheduling decision t fix this. The catch with this fix is that we are limited to scheduling timers of up to 2^31 ticks to avoid any potential overflow. Since we are unlikely to need to wait for more than a second, this won't be a problem :) Another possible fix would be to decrement the timeouts of all processes but it would duplicate a lot of code and dealing with edge cases wasn't pretty last time I checked. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ppwr: enable ppwr on gm107Martin Peres2014-10-022-1/+5
| | | | | | | | For some reason, it is now required to wait a 20 µs after the 0x200 reset of the engine. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gm107/therm: add PWM fan support v2Martin Peres2014-10-029-7/+109
| | | | | | | | v2: change the copyright ownership from "Nouveau Community" to myself, as per Illia's recommendation. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm/fan: do not use the pwm mode when the vbios tells us to use toggleMartin Peres2014-10-021-1/+7
| | | | | Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/fan: add support for maxwell's fan management table v2Martin Peres2014-10-027-2/+115
| | | | | | | | | | | | Re-use the therm-exported fan structure with only two minor modifications: - pwm_freq: u16 -> u32; - add fan_type (toggle or PWM) v2: - Do not memset the table to 0 as it erases the pre-set default values Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc: allocate tagram from memory that spans all partitionsBen Skeggs2014-10-021-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core/mm: allow allocation to be confined to a specific slice of heapBen Skeggs2014-10-0216-26/+38
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core/mm: fill in holes with "allocated" nodesBen Skeggs2014-10-022-6/+21
| | | | | | | | | | | The allocation algorithm doesn't expect there to be holes in the mm, which causes its alignment/cutoff calculations to choke (and go negative) when encountering the last chunk of a block before a hole. The least expensive solution is to simply fill in any holes with nodes that are pre-marked as being allocated. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core/mm: dump mm when trying to tear one down that still has allocationsBen Skeggs2014-10-021-9/+32
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core/mm: modify test for if building a mm with holes in itBen Skeggs2014-10-022-2/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core/mm: make it clearer what (type == 0) meansBen Skeggs2014-10-022-9/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc/gf100: translate interrupt status into more meaningful namesBen Skeggs2014-10-022-5/+29
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc: drop workaround for an interrupt storm that no longer happensBen Skeggs2014-10-022-10/+0
| | | | | | | | | This is really the wrong thing to do, but at the time it was our only option to prevent worse issues. We no longer cause quite so much anger from LTC, so it's not needed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: add support for completion eventsBen Skeggs2014-10-0211-11/+173
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: pass related object into notify constructorBen Skeggs2014-10-0218-28/+42
| | | | | | The event source types/index might need to be derived from it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bar: ioremap only the areas that we're actually usingBen Skeggs2014-10-022-20/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm-next 98faa78ce7f1f986e11e7805d31b409782a6d2d4Ben Skeggs2014-10-0213-396/+547
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: make sure display hardware is reinitialised on runtime resumeBen Skeggs2014-10-023-53/+26
| | | | | | | | | | | | | | | Linus commit 05c63c2ff23a80b654d6c088ac3ba21628db0173 modified the runtime suspend/resume paths to skip over display-related tasks to avoid locking issues on resume. Unfortunately, this resulted in the display hardware being left in a partially initialised state, preventing subsequent modesets from completing. This commit unifies the (many) suspend/resume paths, bringing back display (and fbcon) handling in the runtime paths. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: punt fbcon resume out to a workqueueBen Skeggs2014-10-022-6/+18
| | | | | | | | | | | | | | | Preparation for some runtime pm fixes. Currently we skip over fbcon suspend/resume in the runtime path, which causes issues on resume if fbcon tries to write to the framebuffer before the BAR subdev has been resumed to restore the BAR1 VM setup. As we might be woken up via a sysfs connector, we are unable to call fb_set_suspend() in the resume path as it could make its way down to a modeset and cause all sorts of locking hilarity. To solve this, we'll just delay the fbcon resume to a workqueue. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: fix regression on original nv50 boardBen Skeggs2014-10-021-1/+6
| | | | | | | | | | | Xorg (and any non-DRM client really) doesn't have permission to directly touch VRAM on nv50 and up, which the fence code prior to g84 depends on. It's less invasive to temporarily grant it premission to do so, as it previously did, than it is to rework fencenv50 to use the VM. That will come later on. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50: fix dpms regression on certain boardsBen Skeggs2014-10-021-1/+2
| | | | | | Reported in fdo#82527 comment #2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v3.17-rc7Ben Skeggs2014-10-013-14/+12
|
* ltc/gf100-: fix cbc issues on certain boardsBen Skeggs2014-10-015-1/+7
| | | | | | | | | | | A mismatch between FB and LTC's idea of how big a large page is causes issues such as black "holes" in rendering to occur on some boards (those where LTC is configured for 64KiB large pages) when compression is used. Confirmed to fix at least the GK107 MBP. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: don't leak oclass type bits to userBen Skeggs2014-09-051-2/+2
| | | | | | | | Fixes not being able to init fence subsystem when multiple boards are present. Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v3.17-rc3Ben Skeggs2014-09-053-0/+9
|
* platform: fix compilation errorAlexandre Courbot2014-08-151-1/+2
| | | | | | | | nouveau_platform.c was still using the old nouveau_dev() macro, triggering a compilation error. Fix this. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gk20a: add LTC deviceAlexandre Courbot2014-08-151-0/+1
| | | | | | | LTC device is now required for PGRAPH to work, add it. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: warn if we fail to re-pin fb on resumeBen Skeggs2014-08-151-1/+3
| | | | | | Spotted by Coverity. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: fix dac load detect method definitionBen Skeggs2014-08-151-2/+2
| | | | | | | | A thinko made me turn this into a u16 when cleaning up. Spotted by coverity. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: fix -ENOSPC detection when allocating zbc table entriesBen Skeggs2014-08-151-0/+6
| | | | | | Spotted by Coverity. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: return null pointers on failure, in addition to ret != 0Ben Skeggs2014-08-152-2/+6
| | | | | | | | Reported by Coverity. The intention is that the return value is checked, but let's be more paranoid and make it extremely obvious if something forgets to. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc: fix tag base address getting truncated if above 4GiBBen Skeggs2014-08-151-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>