summaryrefslogtreecommitdiff
path: root/drm/nouveau/nvkm/engine/vp/g84.c
diff options
context:
space:
mode:
Diffstat (limited to 'drm/nouveau/nvkm/engine/vp/g84.c')
-rw-r--r--drm/nouveau/nvkm/engine/vp/g84.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/drm/nouveau/nvkm/engine/vp/g84.c b/drm/nouveau/nvkm/engine/vp/g84.c
index a4ff78a34..003549802 100644
--- a/drm/nouveau/nvkm/engine/vp/g84.c
+++ b/drm/nouveau/nvkm/engine/vp/g84.c
@@ -22,41 +22,17 @@
* Authors: Ben Skeggs, Ilia Mirkin
*/
#include <engine/vp.h>
-#include <engine/xtensa.h>
-#include <core/engctx.h>
+#include <nvif/class.h>
-/*******************************************************************************
- * VP object classes
- ******************************************************************************/
-
-static struct nvkm_oclass
-g84_vp_sclass[] = {
- { 0x7476, &nvkm_object_ofuncs },
- {},
+static const struct nvkm_xtensa_func
+g84_vp_func = {
+ .sclass = {
+ { -1, -1, NV74_VP2 },
+ {}
+ }
};
-/*******************************************************************************
- * PVP context
- ******************************************************************************/
-
-static struct nvkm_oclass
-g84_vp_cclass = {
- .handle = NV_ENGCTX(VP, 0x84),
- .ofuncs = &(struct nvkm_ofuncs) {
- .ctor = _nvkm_xtensa_engctx_ctor,
- .dtor = _nvkm_engctx_dtor,
- .init = _nvkm_engctx_init,
- .fini = _nvkm_engctx_fini,
- .rd32 = _nvkm_engctx_rd32,
- .wr32 = _nvkm_engctx_wr32,
- },
-};
-
-/*******************************************************************************
- * PVP engine/subdev functions
- ******************************************************************************/
-
static int
g84_vp_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct nvkm_oclass *oclass, void *data, u32 size,
@@ -71,9 +47,8 @@ g84_vp_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if (ret)
return ret;
+ vp->func = &g84_vp_func;
nv_subdev(vp)->unit = 0x01020000;
- nv_engine(vp)->cclass = &g84_vp_cclass;
- nv_engine(vp)->sclass = g84_vp_sclass;
vp->fifo_val = 0x111;
vp->unkd28 = 0x9c544;
return 0;