aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-01-14 00:04:21 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-01-22 12:17:43 +1000
commitebb58dc2ef8c62d1affa28160f57faa7b0e1dc02 (patch)
tree9611cc71197328f8c9887bce0fafd0ed4633c012 /drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h
parentdrm/nouveau/clk: rename from clock (no binary change) (diff)
downloadlinux-dev-ebb58dc2ef8c62d1affa28160f57faa7b0e1dc02.tar.xz
linux-dev-ebb58dc2ef8c62d1affa28160f57faa7b0e1dc02.zip
drm/nouveau/pmu: rename from pwr (no binary change)
Switch to NVIDIA's name for the device. 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>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h
new file mode 100644
index 000000000000..eb5bd1cb3955
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h
@@ -0,0 +1,45 @@
+#ifndef __NVKM_PMU_PRIV_H__
+#define __NVKM_PMU_PRIV_H__
+
+#include <subdev/pmu.h>
+#include <subdev/pmu/fuc/os.h>
+
+#define nouveau_pmu_create(p, e, o, d) \
+ nouveau_pmu_create_((p), (e), (o), sizeof(**d), (void **)d)
+#define nouveau_pmu_destroy(p) \
+ nouveau_subdev_destroy(&(p)->base)
+#define nouveau_pmu_init(p) ({ \
+ struct nouveau_pmu *_pmu = (p); \
+ _nouveau_pmu_init(nv_object(_pmu)); \
+})
+#define nouveau_pmu_fini(p,s) ({ \
+ struct nouveau_pmu *_pmu = (p); \
+ _nouveau_pmu_fini(nv_object(_pmu), (s)); \
+})
+
+int nouveau_pmu_create_(struct nouveau_object *, struct nouveau_object *,
+ struct nouveau_oclass *, int, void **);
+
+int _nouveau_pmu_ctor(struct nouveau_object *, struct nouveau_object *,
+ struct nouveau_oclass *, void *, u32,
+ struct nouveau_object **);
+#define _nouveau_pmu_dtor _nouveau_subdev_dtor
+int _nouveau_pmu_init(struct nouveau_object *);
+int _nouveau_pmu_fini(struct nouveau_object *, bool);
+void nouveau_pmu_pgob(struct nouveau_pmu *pmu, bool enable);
+
+struct nvkm_pmu_impl {
+ struct nouveau_oclass base;
+ struct {
+ u32 *data;
+ u32 size;
+ } code;
+ struct {
+ u32 *data;
+ u32 size;
+ } data;
+
+ void (*pgob)(struct nouveau_pmu *, bool);
+};
+
+#endif