summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/clk
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/core: remove pmc_enable argument from subdev ctorBen Skeggs2016-05-201-1/+1
| | | | | | These are now specified directly in the MC subdev. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gm20b: add basic driverAlexandre Courbot2016-03-142-0/+199
| | | | | | | Add a basic clock driver that reuses the GK20A logic. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: share reusable structures/functionsAlexandre Courbot2016-03-142-36/+73
| | | | | | | Make functions/structures that the GM20B driver will reuse public. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: set lowest frequency during init()Alexandre Courbot2016-03-141-2/+5
| | | | | | | | Err on the safe side by setting the lowest frequency (and thus voltage) during device init. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: split gk20a_clk_new()Alexandre Courbot2016-03-141-12/+31
| | | | | | | | | | | This allows to instanciate drivers that use the same logic as gk20a with different parameters. Add a constructor function to allow other chips that inherit from this clock to easily initialize its members Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: abstract pl_to_divAlexandre Courbot2016-03-141-21/+36
| | | | | | | | pl_to_div may be done differently depending on the chip. Abstract this operation so the same logic can be reused for them as well. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: put mnp values into their own structAlexandre Courbot2016-03-141-31/+36
| | | | | | | | This allows us to read them using one single function and will be handy to the GM20B driver. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: emit parent rate as debug messageAlexandre Courbot2016-03-141-2/+2
| | | | | | | Most users are probably not interested in this information. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: only restore divider to 1:1 if neededAlexandre Courbot2016-03-141-3/+10
| | | | | | | | | Only restore the 1:1 divider if it is not set already. Also use the proper masks for this operation and add a second write as done in the Android code. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: only compute n_lo if neededAlexandre Courbot2016-03-141-3/+5
| | | | | | | | n_lo is used if we are going to slide. Compute it only if that condition succeeds to avoid confusion about future usage of this computation. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: fix VCO bit maskAlexandre Courbot2016-03-141-1/+2
| | | | | | | | | Fix the mask specified to switch to VCO mode was given as an (incorrect) immediate value. Although the side-effect happens to be the same, this is clearly incorrect. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: rename enable/disable functionsAlexandre Courbot2016-03-141-28/+24
| | | | | | | | | gk20a_pllg_disable() is only used in the context of gk20a_clk_fini(). Move its body there and rename _gk20a_pllg_enable() and _gk20a_pllg_disable() to non-underscored versions. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: reorganize variables in gk20a_pllg_calc_mnp()Alexandre Courbot2016-03-141-4/+8
| | | | | | | | Move some variables declarations to the scope where they are actually used to make the code easier to follow. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gk20a: convert parameters to KhzAlexandre Courbot2016-03-141-15/+17
| | | | | | | Perform computations in Khz instead of Mhz for better precision. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge tag 'asm-generic-for-linus' of ↵Linus Torvalds2016-01-201-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "The asm-generic tree this time contains one series from Nicolas Pitre that makes the optimized do_div() implementation from the ARM architecture available to all architectures. This also adds stricter type checking for callers of do_div, which has uncovered a number of bugs in existing code, and fixes up the ones we have found" * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: ARM: asm/div64.h: adjust to generic codde __div64_32(): make it overridable at compile time __div64_const32(): abstract out the actual 128-bit cross product code do_div(): generic optimization for constant divisor on 32-bit machines div64.h: optimize do_div() for power-of-two constant divisors mtd/sm_ftl.c: fix wrong do_div() usage drm/mgag200/mgag200_mode.c: fix wrong do_div() usage hid-sensor-hub.c: fix wrong do_div() usage ti/fapll: fix wrong do_div() usage ti/clkt_dpll: fix wrong do_div() usage tegra/clk-divider: fix wrong do_div() usage imx/clk-pllv2: fix wrong do_div() usage imx/clk-pllv1: fix wrong do_div() usage nouveau/nvkm/subdev/clk/gk20a.c: fix wrong do_div() usage
| * nouveau/nvkm/subdev/clk/gk20a.c: fix wrong do_div() usageNicolas Pitre2015-11-161-2/+1
| | | | | | | | | | | | do_div() must only be used with a u64 dividend. Signed-off-by: Nicolas Pitre <nico@linaro.org>
* | drm/nouveau/perf: change pcie speed on pstate changeKarol Herbst2016-01-111-0/+3
| | | | | | | | | | | | | | v2: remove error and only set link for pcie devices v6: remove check for pcie device Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* | drm/nouveau/perf: add fields for pci speed and width and use it for the pstatesKarol Herbst2016-01-111-0/+2
| | | | | | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* | drm/nouveau/clk: remove references to "daemon"Ben Skeggs2016-01-113-7/+7
|/ | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/g84: Enable reclocking for GDDR3 G94-G200Roy Spliet2015-11-031-1/+1
| | | | | | | | Your milage may vary, as it's only been tested on a single G94 and one G96. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Tested-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gt215: Unbreak engine pausing for GT21x/MCP7xRoy Spliet2015-09-111-1/+1
| | | | | | | | Typo that snuck in with commit 6979c6303a4abf263753cd9d577d79f05c6e8c47 Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Reported-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/tegra: merge platform setup from nouveau drmBen Skeggs2015-08-281-5/+3
| | | | | | | | The copyright header in nvkm/engine/device/platform.c has been replaced with the NVIDIA one from drm/nouveau_platform.c, as most of the actual code is now theirs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: convert to new-style nvkm_engineBen Skeggs2015-08-281-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/volt: convert to new-style nvkm_subdevBen Skeggs2015-08-281-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: convert to new-style nvkm_subdevBen Skeggs2015-08-2814-507/+446
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: convert to new-style nvkm_subdevBen Skeggs2015-08-289-23/+26
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: convert user classes to new-style nvkm_objectBen Skeggs2015-08-281-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/subdev: rename some functions to avoid upcoming conflictsBen Skeggs2015-08-281-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/platform: remove subclassing of nvkm_deviceBen Skeggs2015-08-281-3/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb: transition nvkm_ram away from being based on nvkm_objectBen Skeggs2015-08-281-5/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: switch to subdev printk macrosBen Skeggs2015-08-2810-69/+93
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: switch to new-style timer macrosBen Skeggs2015-08-285-18/+54
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: switch to device pri macrosBen Skeggs2015-08-287-181/+234
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: cosmetic changesBen Skeggs2015-08-281-6/+6
| | | | | | | This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: cosmetic changesBen Skeggs2015-08-281-5/+5
| | | | | | | This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb: cosmetic changesBen Skeggs2015-08-281-5/+5
| | | | | | | This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: cosmetic changesBen Skeggs2015-08-2811-769/+758
| | | | | | | This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: include core/device.h automatically for subdevs/enginesBen Skeggs2015-08-288-9/+0
| | | | | | | | | | 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>
* drm/nouveau/drm/nouveau/clk: fix tstate to pstate calculationWei Ni2015-08-281-1/+1
| | | | | | | | | | | | | 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>
* drm/nouveau/clk/nv50: Enable user reclocking for NVA0Roy Spliet2015-08-281-1/+2
| | | | | | | | Tested on a few cards. Probably works quite well for most, given they should all be GDDR3. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gt215: u32->s32 for difference in req. and set clockRoy Spliet2015-07-271-1/+2
| | | | | | | This difference can of course be negative too... Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* make RAM device optionalAlexandre Courbot2015-04-141-1/+1
| | | | | | | | | | | | | | | Having a RAM device does not make sense for chips like GK20A which have no dedicated video memory. The dummy RAM device that we used so far works as a temporary band-aid, but in the longer term it is desirable for the driver to be able to work without any kind of VRAM. This patch adds a few conditionals in places where a RAM device was assumed to be present and allows some more objects to be allocated from the TT domain, allowing Nouveau to handle GPUs for which pfb->ram == NULL. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/volt: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-221-0/+1
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/timer: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-225-0/+6
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-2218-525/+493
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: rename from clock (no binary change)Ben Skeggs2015-01-2217-0/+4587
Rename to match the Linux subsystem responsible for the same kind of things. Will be investigating how feasible it will be to expose the GPU clock trees with it at some point. The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud