From e1404611d5f6a7c75e2b745f5eb7fbcdd23751c5 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 14 Jan 2015 15:11:48 +1000 Subject: drm/nouveau/therm: namespace + nvidia gpu names (no binary change) 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 --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.c | 38 +++++++++++------------ 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.c') diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.c index 668cf33..c1f3cf3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.c @@ -21,22 +21,21 @@ * * Authors: Martin Peres */ - #include "priv.h" struct gm107_therm_priv { - struct nouveau_therm_priv base; + struct nvkm_therm_priv base; }; static int -gm107_fan_pwm_ctrl(struct nouveau_therm *therm, int line, bool enable) +gm107_fan_pwm_ctrl(struct nvkm_therm *therm, int line, bool enable) { /* nothing to do, it seems hardwired */ return 0; } static int -gm107_fan_pwm_get(struct nouveau_therm *therm, int line, u32 *divs, u32 *duty) +gm107_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) { *divs = nv_rd32(therm, 0x10eb20) & 0x1fff; *duty = nv_rd32(therm, 0x10eb24) & 0x1fff; @@ -44,7 +43,7 @@ gm107_fan_pwm_get(struct nouveau_therm *therm, int line, u32 *divs, u32 *duty) } static int -gm107_fan_pwm_set(struct nouveau_therm *therm, int line, u32 divs, u32 duty) +gm107_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) { nv_mask(therm, 0x10eb10, 0x1fff, divs); /* keep the high bits */ nv_wr32(therm, 0x10eb14, duty | 0x80000000); @@ -52,21 +51,20 @@ gm107_fan_pwm_set(struct nouveau_therm *therm, int line, u32 divs, u32 duty) } static int -gm107_fan_pwm_clock(struct nouveau_therm *therm, int line) +gm107_fan_pwm_clock(struct nvkm_therm *therm, int line) { return nv_device(therm)->crystal * 1000; } static int -gm107_therm_ctor(struct nouveau_object *parent, - struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +gm107_therm_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct gm107_therm_priv *priv; int ret; - ret = nouveau_therm_create(parent, engine, oclass, &priv); + ret = nvkm_therm_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; @@ -75,19 +73,19 @@ gm107_therm_ctor(struct nouveau_object *parent, priv->base.base.pwm_get = gm107_fan_pwm_get; priv->base.base.pwm_set = gm107_fan_pwm_set; priv->base.base.pwm_clock = gm107_fan_pwm_clock; - priv->base.base.temp_get = nv84_temp_get; - priv->base.base.fan_sense = nva3_therm_fan_sense; - priv->base.sensor.program_alarms = nouveau_therm_program_alarms_polling; - return nouveau_therm_preinit(&priv->base.base); + priv->base.base.temp_get = g84_temp_get; + priv->base.base.fan_sense = gt215_therm_fan_sense; + priv->base.sensor.program_alarms = nvkm_therm_program_alarms_polling; + return nvkm_therm_preinit(&priv->base.base); } -struct nouveau_oclass +struct nvkm_oclass gm107_therm_oclass = { .handle = NV_SUBDEV(THERM, 0x117), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = gm107_therm_ctor, - .dtor = _nouveau_therm_dtor, - .init = nvd0_therm_init, - .fini = nv84_therm_fini, + .dtor = _nvkm_therm_dtor, + .init = gf110_therm_init, + .fini = g84_therm_fini, }, }; -- cgit v1.1