summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* pci/gp100: initial supportBen Skeggs2016-07-094-0/+47
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc/gp100: initial supportBen Skeggs2016-07-094-0/+106
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* top/gp100: initial supportBen Skeggs2016-07-092-16/+24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: recognise GP100 chipsetBen Skeggs2016-07-0914-8/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: increase maximum nvenc instances to 3Ben Skeggs2016-07-093-3/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: increase maximum ce instances to 6Ben Skeggs2016-07-093-3/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/gf100-: allow selection of an alternate big page sizeBen Skeggs2016-07-098-3/+47
| | | | | | | | | | | | | GFxxx/GM1xx support the selection of 64/128KiB big pages globally. GM2xx supports the same, as well as another mode where the page size can be selected per-instance. We default to 128KiB pages (With per-instance for GM200, but the current code selects 128KiB there already) as the MMU code isn't currently able to handle otherwise. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: prevent oops if no mmu subdev presentBen Skeggs2016-07-091-0/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/g94: implement workaround for dvi issue on fx380Ben Skeggs2016-07-061-0/+133
| | | | | | | | Fixes the second DVI output on Quadro FX380. Thanks to NVIDIA for providing the details on the full workaround. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: pointers beyond end of first image need special handlingBen Skeggs2016-07-064-21/+36
| | | | | | | | | Makes common the code that was previously used by the PMU table parsing, as it appears other tables need this too. Not much of an idea what this is all about... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: guard against out-of-bounds accesses to imageBen Skeggs2016-07-062-4/+37
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gk104-: translate engidx into human-readable name in debug outputBen Skeggs2016-07-061-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: fix lookup of udisp table under certain circumstancesBen Skeggs2016-07-062-5/+2
| | | | | | | | Some VBIOS have separate tables for each link of a given output path, which means we have to specify the specific link we're using instead of all possible links. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc/gm107-: decode interrupt status to human-readable stringsBen Skeggs2016-07-063-5/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gk20a: delete unneeded second newlineJulia Lawall2016-07-061-1/+0
| | | | | Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gf100: Read secondary bypass postdiv when requiredRoy Spliet2016-07-061-6/+14
| | | | | | | v2: fix typo it's -> its Signed-off-by: Roy Spliet <nouveau@spliet.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gf100-: Clean up PLL locking testRoy Spliet2016-07-062-2/+14
| | | | | | | | | | | Corresponds with GT215. Don't rely on the lock test logic being unconditionally enabled, and disable test logic when done (presumably to save power). v2: Remove warning, nvkm_msec already warns on time-out Signed-off-by: Roy Spliet <nouveau@spliet.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* secboot: lazy-load firmware and be more resilientAlexandre Courbot2016-07-064-39/+59
| | | | | | | | | | | | | | | Defer the loading of firmware files to the chip-specific part of secure boot. This allows implementations to retry loading firmware if the first attempt failed ; for the GM200 implementation, this happens when trying to reset a falcon, typically in reaction to GR init. Firmware loading may fail for a variety of reasons, such as the filesystem where they reside not being ready at init time. This new behavior allows GR to be initialized the next time we try to use it if the firmware has become available. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* secboot/gm200: make firmware loading re-callableAlexandre Courbot2016-07-061-16/+26
| | | | | | | | | | Make it possible to call gm20x_secboot_prepare_blobs() several times after either success or failure without re-building already existing blobs. The function will now try to load firmware files that have previously failed before returning success. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100: handle secure boot errorsAlexandre Courbot2016-07-061-2/+8
| | | | | | | | | | Handle and propagate secure boot errors. Failure to do so results in Nouveau incorrectly believing init has succeeded and a completely black display during boot. If we propagate the error, GR init will fail and the user will at least have a working display. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* secboot: fix kerneldoc for secure boot structuresAlexandre Courbot2016-07-061-4/+9
| | | | | | | Some members were documented in the wrong structure. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* hwmon: add in_min and in_maxKarol Herbst2016-07-061-0/+36
| | | | | | | it is a little help for hardware monitoring tools Signed-off-by: Karol Herbst <karolherbst@gmail.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* volt: save the voltage range we are able to setKarol Herbst2016-07-062-1/+16
| | | | | | | | | | We shouldn't set voltages below the min or above the max voltage the gpu is able to set, so save the range for future lookups. Signed-off-by: Karol Herbst <karolherbst@gmail.de> Reviewed-by: Martin Peres <martin.peres@free.fr> Tested-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gm20b: add glitchless and DFS supportAlexandre Courbot2016-07-065-98/+1016
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for advanced features supported by the Noise-Aware PLL of Maxwell. Glitchless switch allows the PL field to be updated without disabling the PLL first if the SYNC_MODE bit of the CFG register is set. More significantly, DFS allows the PLL to monitor the actual input voltage and to dynamically lower the output frequency accordingly. This allows the clock to be more tolerant of lower voltages. These improvements are only supported for Tegra speedos >= 1. Also add the voltage table that is suitable for GM20B's NAPLL. This change needs to be done atomically for the right voltages to be used by the clock driver. v2. Fix build on non-Tegra platforms Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: rename constructorAlexandre Courbot2016-07-063-5/+5
| | | | | | | Strip the _ prefix off the gk20a clock constructor. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: improve MNP programmingAlexandre Courbot2016-07-061-89/+96
| | | | | | | | | | | | | | | Split the MNP programming function into two functions for the cases where we allow sliding or not, instead of making it take a parameter for this. This results in less conditionals in the code and makes it easier to read. Also make the MNP programming functions take the PLL parameters as arguments, and move bits of code to more relevant places (previous programming tended to be just-in-time, which added more conditionnals in the code). Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: factorize n_lo computation codeAlexandre Courbot2016-07-061-9/+10
| | | | | | | Use a dedicated function instead of always calculating n_lo on the fly. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: parameterize PLL settingsAlexandre Courbot2016-07-061-24/+27
| | | | | | | | | | Make functions manipulating PLL settings take them as an argument, instead of assuming we want to work on the copy in the gk20a_clk structure. This makes these functions more flexible, which we will need in GM20B. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: add and use MNP programming functionsAlexandre Courbot2016-07-061-13/+22
| | | | | | | | Add relevant functions to work with the gk20a_pll structure and use them where they ought to be instead of directly manipulating registers. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: use nvkm_ functions in slide()Alexandre Courbot2016-07-061-16/+10
| | | | | Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: reorganize MNP calculation a bitAlexandre Courbot2016-07-061-8/+5
| | | | | | | | Move variables declarations to their actual scope of use, and simplify code a bit. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: setup slide once during initAlexandre Courbot2016-07-063-6/+46
| | | | | | | | Slide setup needs to be performed only once, during init. Also use the proper parameters for different clock speeds. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: properly protect macro argumentAlexandre Courbot2016-07-062-2/+2
| | | | | Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* volt/gm20b: add support for vmin parameterAlexandre Courbot2016-07-063-7/+22
| | | | | | | | | Chips may be characterized for a minimum voltage. Support this extra parameter and select the appropriate minimum voltage for the detected GPU speedo. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* volt/gk20a: rename constructorAlexandre Courbot2016-07-063-10/+10
| | | | | | | Strip the _ prefix off the gk20a volt constructor. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* volt/gk20a: constify and name v_scaleAlexandre Courbot2016-07-061-1/+2
| | | | | | | | Give a name to this constant so we at least get an idea of what it is for. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* volt/gk20a: make unused public functions staticAlexandre Courbot2016-07-062-9/+4
| | | | | | | Nobody else is using these, so make them private. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* tegra: fetch gpu_speedo_idAlexandre Courbot2016-07-063-0/+3
| | | | | | | | The GPU speedo ID is required to select the right clk/volt parameters on GM20B. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* secboot: use nvkm_mc_enable/disable()Ben Skeggs2016-07-062-6/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* secboot: use nvkm_mc_intr_mask/unmask()Ben Skeggs2016-07-062-7/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc/gk104-: add pmu reset maskBen Skeggs2016-07-061-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc/gf100-: support for masking interruptsBen Skeggs2016-07-064-0/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc/gt215: support for masking interruptsBen Skeggs2016-07-061-0/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc: support for temporarily masking interrupts from a specific deviceBen Skeggs2016-07-063-0/+18
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc: s/intr_mask/intr_stat/Ben Skeggs2016-07-0613-19/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc: expose device enable/disable separately, as well as resetBen Skeggs2016-07-063-15/+38
| | | | | | | | | | There are cases where subdevs need to perform additonal actions around the master reset, so we want to expost the operations separately. This commit also adds a flag to the NV_PMC_ENABLE bitfield definitions which allow skipping the automatic reset() called from core/subdev.c. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc: take nvkm_device as argument to public functionsBen Skeggs2016-07-069-46/+50
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc: allow construction of subclassed deviceBen Skeggs2016-07-062-4/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* top: add function to lookup interrupt mask for a given deviceBen Skeggs2016-07-062-0/+17
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* top: take nvkm_device as argument to public functionsBen Skeggs2016-07-064-13/+16
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>