summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev/pwr
AgeCommit message (Collapse)Author
2015-01-22drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)Ben Skeggs
The symlinks were annoying some people, and they're not used anywhere else in the kernel tree. The include directory structure has been changed so that symlinks aren't needed anymore. NVKM has been moved from core/ to nvkm/ to make it more obvious as to what the directory is for, and as some minor prep for when NVKM gets split out into its own module (virt) at a later date. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/pwr: add support for GK20AVince Hsu
This patch adds PWR support for GK20A. But instead of adding the PWR features like firmware loading and communication with PMU firmware, we add the DVFS (Dynamic Voltage and Frequency Scaling), which is one of the PMU firmware's jobs on dGPUs, in this patch. This refers to the idle signals provided by the NVIDIA hardware and tries to adjust the performance level based on the calculated target. The reclocking policy can be fine-tuned later when we have more real use cases. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/pwr: make nouveau_pwr_pgob() non-staticVince Hsu
The platform device does not use the common nouveau_pwr_init() to initialize the PWR, but it does need the .pgob() be assigned to avoid NULL pointer dereference in graph/nve4.c. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/pwr/fuc: Fix thinko in nouveau_memx_wait()Roy Spliet
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/fb/ramnva3: Link training for DDR3Roy Spliet
V2: fix whitespace errors in memx.fuc Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/gf100-/pwr/memx: block host and fifo around reclockBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr/memx: fix command ordering around block/unblockBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr/memx: rename fb off/on to block/unblockBen Skeggs
More accurate as to the function of the opcodes. Not only is FB disabled, but the host is prevented from touching the GPU. An upcoming patch for Kepler will also halt PFIFO (as NVIDIA does). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nva3/pwr/memx: Match blob's fb access behaviourRoy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr/memx: Return debugging informationRoy Spliet
Time measured from disabling FB to re-enabling, PPWR_IN reveals status of heads at the end of script. Helps debug various issues (like flicker). Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr/memx: Make FB disable and enable explicitRoy Spliet
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>
2014-09-15drm/nva3/pwr/memx: Implement "wait for VBLANK"Roy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr: wait for scrubbers to finish before uploading new ucodeBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr/fuc: make $r1-$r10 registers callee-saved in kernel.fucMartin Peres
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr/fuc: add ld/st macrosMartin Peres
Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr: add helpers for delay-to-ticks and ticks-to-delayMartin Peres
Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr: add some arith functions (mul32_32_64, subu64 and addu64)Martin Peres
Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/pwr: fix the timers implementation with concurent processesMartin Peres
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>
2014-09-15drm/nouveau/ppwr: enable ppwr on gm107Martin Peres
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>
2014-08-10drm/nouveau/pwr/macros: Stop playing Russian roulette on data memoryRoy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gk104/pwr: implement PGOB disable methodBen Skeggs
As documented at: ftp://download.nvidia.com/open-gpu-doc/gk104-disable-graphics-power-gating/1/gk104-disable-graphics-power-gating.txt NVIDIA were not able document the steps necessary to detect whether this is required or not at this time. However, they did confirm that this procedure is safe to perform unconditionally on GK104/6. GK107 does not have the power gating feature, and it was recommended that we do not perform these steps there as the effects were not verified. The disable path is from observing the binary driver, and not documented in the link above. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/nouveau/pwr: tidyBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17drm/nouveau/pwr: fix typo in fifo wrap handlingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23drm/nouveau/pwr: implement a simple i2c stackBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23drm/nouveau/pwr: have rd/wr32 routines clobber data instead of addrBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-14drm/nouveau/pwr: fix missing mutex unlock in a failure pathBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/pwr: initial implementationBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>