Skip to content

Commit

Permalink
device: enable clk for Maxwell2
Browse files Browse the repository at this point in the history
Reclokcing will only be enabled by setting NvFanless to true.

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
  • Loading branch information
karolherbst committed Jul 22, 2017
1 parent cd17277 commit a0f13d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drm/nouveau/nvkm/engine/device/base.c
Expand Up @@ -2029,6 +2029,7 @@ nv120_chipset = {
.bar = gf100_bar_new,
.bios = nvkm_bios_new,
.bus = gf100_bus_new,
.clk = gk104_clk_new,
.devinit = gm200_devinit_new,
.fb = gm200_fb_new,
.fuse = gm107_fuse_new,
Expand Down Expand Up @@ -2064,6 +2065,7 @@ nv124_chipset = {
.bar = gf100_bar_new,
.bios = nvkm_bios_new,
.bus = gf100_bus_new,
.clk = gk104_clk_new,
.devinit = gm200_devinit_new,
.fb = gm200_fb_new,
.fuse = gm107_fuse_new,
Expand Down Expand Up @@ -2099,6 +2101,7 @@ nv126_chipset = {
.bar = gf100_bar_new,
.bios = nvkm_bios_new,
.bus = gf100_bus_new,
.clk = gk104_clk_new,
.devinit = gm200_devinit_new,
.fb = gm200_fb_new,
.fuse = gm107_fuse_new,
Expand Down
10 changes: 9 additions & 1 deletion drm/nouveau/nvkm/subdev/clk/gk104.c
Expand Up @@ -25,6 +25,7 @@
#include "priv.h"
#include "pll.h"

#include <core/option.h>
#include <subdev/timer.h>
#include <subdev/bios.h>
#include <subdev/bios/pll.h>
Expand Down Expand Up @@ -507,10 +508,17 @@ int
gk104_clk_new(struct nvkm_device *device, int index, struct nvkm_clk **pclk)
{
struct gk104_clk *clk;
bool reclocking;

if (!(clk = kzalloc(sizeof(*clk), GFP_KERNEL)))
return -ENOMEM;
*pclk = &clk->base;

return nvkm_clk_ctor(&gk104_clk, device, index, true, &clk->base);
if (device->chipset >= 0x120)
reclocking = nvkm_boolopt(device->cfgopt, "NvFanless", false);
else
reclocking = true;

return nvkm_clk_ctor(&gk104_clk, device, index, reclocking,
&clk->base);
}

0 comments on commit a0f13d3

Please sign in to comment.