From 9719047b4d985ca7a46819956047cca04213d63e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 14 Jan 2015 15:35:00 +1000 Subject: drm/nouveau/device: 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/engine/device/ctrl.c | 66 +++++++++++------------ 1 file changed, 30 insertions(+), 36 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c') diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c index 7a7632e6..0b794b1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c @@ -21,25 +21,22 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include -#include -#include -#include -#include - #include -#include "priv.h" +#include +#include +#include static int -nouveau_control_mthd_pstate_info(struct nouveau_object *object, - void *data, u32 size) +nvkm_control_mthd_pstate_info(struct nvkm_object *object, void *data, u32 size) { union { struct nvif_control_pstate_info_v0 v0; } *args = data; - struct nouveau_clk *clk = nouveau_clk(object); + struct nvkm_clk *clk = nvkm_clk(object); int ret; nv_ioctl(object, "control pstate info size %d\n", size); @@ -67,16 +64,15 @@ nouveau_control_mthd_pstate_info(struct nouveau_object *object, } static int -nouveau_control_mthd_pstate_attr(struct nouveau_object *object, - void *data, u32 size) +nvkm_control_mthd_pstate_attr(struct nvkm_object *object, void *data, u32 size) { union { struct nvif_control_pstate_attr_v0 v0; } *args = data; - struct nouveau_clk *clk = nouveau_clk(object); - struct nouveau_domain *domain; - struct nouveau_pstate *pstate; - struct nouveau_cstate *cstate; + struct nvkm_clk *clk = nvkm_clk(object); + struct nvkm_domain *domain; + struct nvkm_pstate *pstate; + struct nvkm_cstate *cstate; int i = 0, j = -1; u32 lo, hi; int ret; @@ -141,13 +137,12 @@ nouveau_control_mthd_pstate_attr(struct nouveau_object *object, } static int -nouveau_control_mthd_pstate_user(struct nouveau_object *object, - void *data, u32 size) +nvkm_control_mthd_pstate_user(struct nvkm_object *object, void *data, u32 size) { union { struct nvif_control_pstate_user_v0 v0; } *args = data; - struct nouveau_clk *clk = nouveau_clk(object); + struct nvkm_clk *clk = nvkm_clk(object); int ret; nv_ioctl(object, "control pstate user size %d\n", size); @@ -161,45 +156,44 @@ nouveau_control_mthd_pstate_user(struct nouveau_object *object, return ret; if (args->v0.pwrsrc >= 0) { - ret |= nouveau_clk_ustate(clk, args->v0.ustate, args->v0.pwrsrc); + ret |= nvkm_clk_ustate(clk, args->v0.ustate, args->v0.pwrsrc); } else { - ret |= nouveau_clk_ustate(clk, args->v0.ustate, 0); - ret |= nouveau_clk_ustate(clk, args->v0.ustate, 1); + ret |= nvkm_clk_ustate(clk, args->v0.ustate, 0); + ret |= nvkm_clk_ustate(clk, args->v0.ustate, 1); } return ret; } static int -nouveau_control_mthd(struct nouveau_object *object, u32 mthd, - void *data, u32 size) +nvkm_control_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) { switch (mthd) { case NVIF_CONTROL_PSTATE_INFO: - return nouveau_control_mthd_pstate_info(object, data, size); + return nvkm_control_mthd_pstate_info(object, data, size); case NVIF_CONTROL_PSTATE_ATTR: - return nouveau_control_mthd_pstate_attr(object, data, size); + return nvkm_control_mthd_pstate_attr(object, data, size); case NVIF_CONTROL_PSTATE_USER: - return nouveau_control_mthd_pstate_user(object, data, size); + return nvkm_control_mthd_pstate_user(object, data, size); default: break; } return -EINVAL; } -static struct nouveau_ofuncs -nouveau_control_ofuncs = { - .ctor = _nouveau_object_ctor, - .dtor = nouveau_object_destroy, - .init = nouveau_object_init, - .fini = nouveau_object_fini, - .mthd = nouveau_control_mthd, +static struct nvkm_ofuncs +nvkm_control_ofuncs = { + .ctor = _nvkm_object_ctor, + .dtor = nvkm_object_destroy, + .init = nvkm_object_init, + .fini = nvkm_object_fini, + .mthd = nvkm_control_mthd, }; -struct nouveau_oclass -nouveau_control_oclass[] = { +struct nvkm_oclass +nvkm_control_oclass[] = { { .handle = NVIF_IOCTL_NEW_V0_CONTROL, - .ofuncs = &nouveau_control_ofuncs + .ofuncs = &nvkm_control_ofuncs }, {} }; -- cgit v1.1