GitHub/moto-9609/android_kernel_motorola_exynos9610.git
9 years agodrm/nouveau/xtensa: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/xtensa: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/falcon: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/falcon: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/tmr: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/tmr: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/therm: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/therm: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pmu: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/pmu: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mmu: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/mmu: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mc: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/mc: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ltc: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/ltc: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/imem: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/imem: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ibus: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/ibus: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/i2c: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/i2c: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gpio: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/gpio: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fuse: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/fuse: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fb: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/fb: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/devinit: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:09 +0000 (14:54 +1000)]
drm/nouveau/devinit: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/clk: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/clk: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bus: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/bus: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/bios: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bar: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/bar: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/core: switch to device pri macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/core: switch to device pri macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/device: type-safe register accessor macros
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/device: type-safe register accessor macros

These require an explit struct nvkm_device pointer, unlike the previous
macros which take a void *, and assume it's any old nvkm_subdev.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/vp: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/vp: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/sw: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/sw: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/sec: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/sec: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/pm: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/msvld: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/msvld: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/msppp: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/msppp: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mspdec: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/mspdec: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mpeg: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/mpeg: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)]
drm/nouveau/gr: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fifo: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/fifo: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/dma: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/dma: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/disp: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/disp: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/cipher: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/cipher: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ce: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/ce: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bsp: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/bsp: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/xtensa: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/xtensa: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/falcon: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/falcon: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/volt: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/volt: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/tmr: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/tmr: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/therm: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/therm: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pmu: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/pmu: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mxm: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/mxm: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mmu: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/mmu: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mc: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/mc: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ltc: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)]
drm/nouveau/ltc: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/imem: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/imem: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ibus: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/ibus: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/i2c: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/i2c: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gpio: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/gpio: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fuse: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/fuse: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fb: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/fb: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/devinit: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/devinit: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/clk: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/clk: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bus: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/bus: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/bios: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bar: cosmetic changes
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/bar: cosmetic changes

This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/device: include core/device.h automatically for subdevs/engines
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/device: include core/device.h automatically for subdevs/engines

Pretty much every subdev/engine is going to need access to nvkm_device
shortly to touch registers and/or output messages.

The odd placement of the includes is necessary to work around some
inter-dependencies that currently exist.  This will be fixed later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/device: add direct pointer to struct device
Ben Skeggs [Thu, 20 Aug 2015 04:54:06 +0000 (14:54 +1000)]
drm/nouveau/device: add direct pointer to struct device

A future commit will hide the platform/pci specifics from nvkm_device,
but it's still very useful in a lot of places to have access to the
Linux device struct.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/device: add direct pointers to subdevs from nvkm_device
Ben Skeggs [Thu, 20 Aug 2015 04:54:05 +0000 (14:54 +1000)]
drm/nouveau/device: add direct pointers to subdevs from nvkm_device

Will be used in upcoming commits to remove the need for lookup/runtime
type-checking functions when accessing foreign subdevs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/subdev: add direct pointer to nvkm_device
Ben Skeggs [Thu, 20 Aug 2015 04:54:05 +0000 (14:54 +1000)]
drm/nouveau/subdev: add direct pointer to nvkm_device

Will be utilised in upcoming commits to remove the need for heuristics
to lookup the device a subdev belongs to.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/lib: various tweaks
Ben Skeggs [Thu, 20 Aug 2015 04:54:05 +0000 (14:54 +1000)]
drm/nouveau/lib: various tweaks

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pmu/gk104: implement a hackish workaround for a hw bug
Ben Skeggs [Thu, 27 Aug 2015 07:33:19 +0000 (17:33 +1000)]
drm/nouveau/pmu/gk104: implement a hackish workaround for a hw bug

Only a handful of machines have this enabled by default, where it's been
proven to work.  The workaround can be explicitly enabled with a module
option also.

Still waiting on feedback from NVIDIA for a proper idea of exactly what
this fix is doing, and how to implement it properly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/disp/dp: gm1xx appears to have same dp lane ordering as gm2xx
Ben Skeggs [Fri, 21 Aug 2015 03:38:31 +0000 (13:38 +1000)]
drm/nouveau/disp/dp: gm1xx appears to have same dp lane ordering as gm2xx

Fixes 2-lane DP on Quadro K620.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/disp/dp: fix some tx_pu mishandling
Ben Skeggs [Fri, 21 Aug 2015 02:50:07 +0000 (12:50 +1000)]
drm/nouveau/disp/dp: fix some tx_pu mishandling

We only need to mask 0x0f on GM2xx, and want to keep the higher bits on
earlier cards.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios/dp: use alternate set of drvctl values where necessary
Ben Skeggs [Fri, 21 Aug 2015 03:19:13 +0000 (13:19 +1000)]
drm/nouveau/bios/dp: use alternate set of drvctl values where necessary

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios/dcb: accept "maxwell" lane count values for dcb 4.0
Ben Skeggs [Fri, 21 Aug 2015 00:52:54 +0000 (10:52 +1000)]
drm/nouveau/bios/dcb: accept "maxwell" lane count values for dcb 4.0

We previously assumed that the values "2" and "4" were new in DCB 4.1,
however, there's at least one GM107 DCB 4.0 board (Quadro K620) that
uses the newer values.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fb/sddr3: add WR/CWL values seen on a GK208
Ilia Mirkin [Mon, 17 Aug 2015 23:37:34 +0000 (19:37 -0400)]
drm/nouveau/fb/sddr3: add WR/CWL values seen on a GK208

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/nv46: Change mc subdev oclass from nv44 to nv4c
Hans de Goede [Thu, 23 Jul 2015 15:20:12 +0000 (17:20 +0200)]
drm/nouveau/nv46: Change mc subdev oclass from nv44 to nv4c

MSI interrupts appear to not work for nv46 based cards. Change the mc
subdev oclass for these cards from nv44 to nv4c, the nv4c mc code is
identical to the nv44 mc code except that it does not use msi
(it does not define a msi_rearm callback).

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90435
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/gf100: only use PBFB_BROADCAST.PM_UNK100 for PBFB signals
Samuel Pitoiset [Tue, 4 Aug 2015 21:58:15 +0000 (23:58 +0200)]
drm/nouveau/pm/gf100: only use PBFB_BROADCAST.PM_UNK100 for PBFB signals

High level hardware events related to PBFB will monitor all partitions.
While we are at it, fix bitfield for this mux.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/gf100: remove multiple definitions of GPC_DOM signal 0x0e
Samuel Pitoiset [Tue, 4 Aug 2015 21:58:14 +0000 (23:58 +0200)]
drm/nouveau/pm/gf100: remove multiple definitions of GPC_DOM signal 0x0e

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/gf100: remove undefined TEX.PM_UNKC8 mux
Samuel Pitoiset [Tue, 4 Aug 2015 21:58:13 +0000 (23:58 +0200)]
drm/nouveau/pm/gf100: remove undefined TEX.PM_UNKC8 mux

This mux only exists on GF108+ (except for GF110 one), but since it is
not used by the userspace we can drop it for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: allow zeroed signals to enable sources
Samuel Pitoiset [Tue, 4 Aug 2015 21:58:12 +0000 (23:58 +0200)]
drm/nouveau/pm: allow zeroed signals to enable sources

Hardware signals index 0x00 are defined for some domains and they have
to be allowed to enable sources like the others.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/nv50: TPC[0x3] must be used for PGRAPH muxs on G80
Samuel Pitoiset [Sun, 26 Jul 2015 09:30:08 +0000 (11:30 +0200)]
drm/nouveau/pm/nv50: TPC[0x3] must be used for PGRAPH muxs on G80

I thought that using TPC[0x0] like for G84:GT215 was sufficient on G80,
but it's actually not the case. According to NVIDIA PerfKit on Windows,
we have to configure PGRAPH related muxs on TPC[0x3] for this chipset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/nv50: fix wrong addr for ZCULL source on G80:GT215
Samuel Pitoiset [Sun, 26 Jul 2015 09:30:07 +0000 (11:30 +0200)]
drm/nouveau/pm/nv50: fix wrong addr for ZCULL source on G80:GT215

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: add opcodes 0x73 and 0x77
Ilia Mirkin [Fri, 19 Jun 2015 06:51:23 +0000 (02:51 -0400)]
drm/nouveau/bios: add opcodes 0x73 and 0x77

No known VBIOSes use these, but they are present in the actual VBIOS
table parsing logic. No harm in adding these too.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/platform: recognize GM20B
Alexandre Courbot [Tue, 23 Jun 2015 06:16:06 +0000 (15:16 +0900)]
drm/nouveau/platform: recognize GM20B

Allow the platform driver to recognize GM20B.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/device: recognize GM20B
Alexandre Courbot [Tue, 23 Jun 2015 06:16:05 +0000 (15:16 +0900)]
drm/nouveau/device: recognize GM20B

Recognize GM20B and assign the right engines and subdevs.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr: add GM20B support
Alexandre Courbot [Tue, 23 Jun 2015 06:16:04 +0000 (15:16 +0900)]
drm/nouveau/gr: add GM20B support

Add support for GM20B's graphics engine, based on GK20A. Note that this
code alone will not allow the engine to initialize on released devices
which require PMU-assisted secure boot.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fifo: add GM20B fifo
Alexandre Courbot [Tue, 23 Jun 2015 06:16:03 +0000 (15:16 +0900)]
drm/nouveau/fifo: add GM20B fifo

GM20B has a 512-channels FIFO similar to GK104.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gk20a: use same initialization sequence as nvgpu
Alexandre Courbot [Tue, 23 Jun 2015 06:16:02 +0000 (15:16 +0900)]
drm/nouveau/gr/gk20a: use same initialization sequence as nvgpu

GK20A's initialization was based on GK104, but differences exist in the
way the initial context is built and the initialization process itself.

This patch follows the same initialization sequence as nvgpu performs
to avoid bad surprises. Since the register bundles initialization also
differ considerably from GK104, the register packs are now loaded from
firmware files, again similarly to what is done with nvgpu.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr: use NVIDIA-provided external firmwares
Alexandre Courbot [Tue, 23 Jun 2015 06:16:01 +0000 (15:16 +0900)]
drm/nouveau/gr: use NVIDIA-provided external firmwares

NVIDIA will officially start providing GR firmwares through
linux-firmware for GPUs that require it. Change the GR firmware lookup
function to use these files.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/gk104: add compute signals/sources
Samuel Pitoiset [Fri, 19 Jun 2015 15:37:18 +0000 (17:37 +0200)]
drm/nouveau/pm/gk104: add compute signals/sources

These signals and sources have been reverse engineered from CUPTI
(Linux). Graphics signals exposed by PerfKit (Windows only) will be
added later. I need to reverse engineer them and it's a bit painful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/gk104: re-use gf100_pm_ctor()
Samuel Pitoiset [Fri, 19 Jun 2015 15:37:17 +0000 (17:37 +0200)]
drm/nouveau/pm/gk104: re-use gf100_pm_ctor()

gk104_pm_ctor() is equal to gf100_pm_ctor().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/nv40: rename pcounter domains to 'pc' instead of 'pm'
Samuel Pitoiset [Fri, 19 Jun 2015 15:36:38 +0000 (17:36 +0200)]
drm/nouveau/pm/nv40: rename pcounter domains to 'pc' instead of 'pm'

This trivial patch makes thing more consistent since hardware signals
names are prefixed by 'pcXX'.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: expose name of domains
Samuel Pitoiset [Fri, 19 Jun 2015 15:36:37 +0000 (17:36 +0200)]
drm/nouveau/pm: expose name of domains

This is going to be very useful for GF100+ because each GPC can
have its own domain of counters.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/drm/nouveau/clk: fix tstate to pstate calculation
Wei Ni [Tue, 16 Jun 2015 09:35:12 +0000 (17:35 +0800)]
drm/nouveau/drm/nouveau/clk: fix tstate to pstate calculation

According to the tstate calculation in nvkm_clk_tstate(),
the range of tstate is from -(clk->state_nr - 1) to 0,
it mean the tstate is negative value. But in nvkm_pstate_work(),
it use (clk->state_nr - 1 - clk->tstate) to limit pstate,
it's not correct.
This patch fix it to use (clk->state_nr - 1 + clk->tstate) to
limit pstate.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: some fixes related to sources
Samuel Pitoiset [Sun, 14 Jun 2015 11:50:06 +0000 (13:50 +0200)]
drm/nouveau/pm: some fixes related to sources

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: fix signals/sources for GT200+
Samuel Pitoiset [Sun, 14 Jun 2015 11:50:05 +0000 (13:50 +0200)]
drm/nouveau/pm: fix signals/sources for GT200+

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/gf100: add compute signals/sources
Samuel Pitoiset [Sun, 14 Jun 2015 11:33:55 +0000 (13:33 +0200)]
drm/nouveau/pm/gf100: add compute signals/sources

These signals and sources have been reverse engineered from CUPTI
(Linux). Graphics signals exposed by PerfKit (Windows only) will be
added later. I need to reverse engineer them and it's a bit painful.

This commit also adds a new class for GF108 and GF117.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/gf100: allow to share GPC, HUB and PART domains
Samuel Pitoiset [Sun, 14 Jun 2015 11:33:54 +0000 (13:33 +0200)]
drm/nouveau/pm/gf100: allow to share GPC, HUB and PART domains

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: stack perfdom class under perfmon
Ben Skeggs [Sun, 14 Jun 2015 02:20:37 +0000 (12:20 +1000)]
drm/nouveau/pm: stack perfdom class under perfmon

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: swap perfmon/perfdom code to avoid forward decl in next commit
Ben Skeggs [Sun, 14 Jun 2015 02:10:59 +0000 (12:10 +1000)]
drm/nouveau/pm: swap perfmon/perfdom code to avoid forward decl in next commit

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm/nv50: add compute and graphics signals/sources
Samuel Pitoiset [Sun, 7 Jun 2015 20:40:28 +0000 (22:40 +0200)]
drm/nouveau/pm/nv50: add compute and graphics signals/sources

These signals and sources have been reverse engineered from NVIDIA
PerfKit (Windows) and CUPTI (Linux), they will be used to build complex
hardware events from the userspace.

This commit also adds a new class for GT200.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: allow the userspace to configure sources
Samuel Pitoiset [Sun, 7 Jun 2015 20:40:27 +0000 (22:40 +0200)]
drm/nouveau/pm: allow the userspace to configure sources

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: allow to configure domains instead of simple counters
Samuel Pitoiset [Sun, 7 Jun 2015 20:40:26 +0000 (22:40 +0200)]
drm/nouveau/pm: allow to configure domains instead of simple counters

Configuring counters from the userspace require the kernel to handle some
logic related to performance counters. Basically, it has to find a free
slot to assign a counter, to handle extra counting modes like B4/B6 and it
must return and error when it can't configure a counter.

In my opinion, the kernel should not handle all of that logic but it
should only write the configuration sent by the userspace without
checking anything. In other words, it should overwrite the configuration
even if it's already counting and do not return any errors.

This patch allows the userspace to configure a domain instead of
separate counters. This has the advantage to move all of the logic to
the userspace.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: allow the userspace to schedule hardware counters
Samuel Pitoiset [Sun, 7 Jun 2015 20:40:25 +0000 (22:40 +0200)]
drm/nouveau/pm: allow the userspace to schedule hardware counters

This adds a new method NVIF_PERFCTR_V0_INIT which starts a batch of
hardware counters for sampling. This will allow the userspace to start
a monitoring session using the INIT method and to stop it with SAMPLE,
for example before and after a frame is rendered.

This commit temporarily breaks nv_perfmon but this is going to be fixed
with the upcoming patch.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: implement NVIF_PERFMON_V0_QUERY_SOURCE method
Samuel Pitoiset [Sun, 7 Jun 2015 20:40:24 +0000 (22:40 +0200)]
drm/nouveau/pm: implement NVIF_PERFMON_V0_QUERY_SOURCE method

This allows to query the ID, the mask and the user-readable name of
sources for each signal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: allow to query the number of sources for a signal
Samuel Pitoiset [Sun, 7 Jun 2015 20:40:23 +0000 (22:40 +0200)]
drm/nouveau/pm: allow to query the number of sources for a signal

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pm: add concept of sources
Samuel Pitoiset [Sun, 7 Jun 2015 20:40:22 +0000 (22:40 +0200)]
drm/nouveau/pm: add concept of sources

A source (or multiplexer) is a tuple addr+mask+shift which allows to
control a block of signals. The maximum number of sources that a signal
can define is arbitrary limited to 8 and this should be large enough.
This patch allows to define multi-level of sources for a signal.

Each different sources are stored to a global list and will be exposed
to the userspace through the nvif interface in order to avoid conflicts.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>