summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/include
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/clk: allow non-blocking for nouveau_clock_astate()Vince Hsu
There might be some callers of nouveau_clock_astate(), and they are from inetrrupt context. So we must ensure that this function can be atomic in that condition. This patch adds one parameter which is subsequently passed to nouveau_pstate_calc(). Therefore we can choose whether we want to wait for the pstate work's completion or not. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: object.engine is always a nouveau_engine nowBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: uninline subdev/engine/device lookup functionsBen Skeggs
These are a tad more complex than a direct cast with paranoia safeties. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: rename subclass.base to subclass.superclassBen Skeggs
Makes things a bit more readable. This is specially important now as upcoming commits are going to be gradually removing the use of macros for down-casts, in favour of compile-time checking. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/subdev: always upcast through nouveau_subdev()/nouveau_engine()Ben Skeggs
Has additional safeties for one. For two, needed for an upcoming commit that removes abuse of nouveau_object.engine. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/volt: add support for GK20AVince Hsu
The voltage value are calculated by the hardware characterized result. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/devinit: bump priv ring timeouts before executing scriptsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/bios: add parsing of BIT M(v2) +0x03 tableBen Skeggs
We only support one kind of matching here (ramcfg strap), but it appears alternate methods are possible. I wrote a tool to scan our vbios repo for other types, but did not see any used. Hopefully this means there aren't any in the wild that will now break. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/device: store revisionBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau: introduce nv_device_is_cpu_coherent()Alexandre Courbot
Add a function allowing us to know whether a device is CPU-coherent, i.e. accesses performed by the CPU on GPU-mapped buffers will be immediately visible on the GPU side and vice-versa. For now, a device is considered to be coherent if it uses the PCI bus on a non-ARM architecture. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/core: remove some dead code that got forgottenBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/fb/ramnva3: Reclocking script for DDR3Roy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/fb/ramnva3: Ressurect timing calculation codeRoy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> 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-12-02drm/nouveau/bios/ramcfg: 10_02_40 -> DLLoffRoy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gm204/disp: initial supportBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/bios: add support for ccb 4.1Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gm204/i2c: add aux channel driverBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/i2c: segregate aux channel adapter indices from bit-banged i2cBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/bios: store aux addr independently of i2cBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gm204/devinit: initial implementationBen Skeggs
Starting from GM204, certain registers are no longer accessible by the host (or unsigned PMU firmware). This commit implements devinit on PMU, using a signed microcode image, and devinit data, from the VBIOS. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/bios: add parsing of pmu image tablesBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/bios: add NPDE parsingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/bios: add pci data structure parsingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/bios: split out shadow methodsBen Skeggs
We're about to need to be able to fetch additional chunks of data beyond the primary bios image, which makes fetching a lot more complicated. This splits out the verious shadowing routines to be nothing more than very dumb "fetch this much data from this offset" routines, and leaves the logic of what and how much to fetch in common code. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/bios: parse older ramcfg/timing data like we do newer onesBen Skeggs
Done after discussion with Roy. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nv50/fb/ram: Store the number of partitions in the designated fieldsRoy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> 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/nouveau/gpio: rename g92 class to g94Emil Velikov
nv92 hardware has only 16 interrupt lines, while nv94 and later has 32. Accessing 0xe0c{0,4} registers on nv92 can lead to incorrect PDISP setup. This is a regression introduced with commit 9d0f5ec9ee0fd5dc5fc1cc2cf559286431e406e3 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon May 12 15:22:42 2014 +1000 gpio: split g92 class from nv50 Reported-by: estece on #nouveau Cc: stable@vger.kernel.org # 3.16+ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/bios: parse another large chunk of random memory config dataBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/gk104-/fb/ram: parse ramcfg data for all frequencies up-frontBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/bios: parse freq ranges and timing id into ramcfg structBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x09Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x05Ben Skeggs
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/subdev: add a pfuse subdev v2Martin Peres
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>
2014-09-15drm/nva3/clk: Set intermediate core clock on reclockingRoy Spliet
Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau: Fix duplicate definition of NV04_PFB_BOOT_0_*Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/gm107/therm: add PWM fan support v2Martin Peres
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>
2014-09-15drm/nouveau/bios/fan: add support for maxwell's fan management table v2Martin Peres
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>
2014-09-15drm/nouveau/core/mm: allow allocation to be confined to a specific slice of heapBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/core/mm: fill in holes with "allocated" nodesBen Skeggs
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>
2014-09-15drm/nouveau/core/mm: make it clearer what (type == 0) meansBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/core: pass related object into notify constructorBen Skeggs
The event source types/index might need to be derived from it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/bar: ioremap only the areas that we're actually usingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-14drm/nouveau/nvif: fix a number of notify thinkosBen Skeggs
Note to self: more sleep Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-09drm/nouveau/ltc: add zbc driversBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>