diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:19 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:41 +1000 |
commit | c79a191b2799fb36a7b64c0f9ddc20383ed0dcdb (patch) | |
tree | 83b99c76b4d87f4bc557c9160aef7d26ce21aac3 /drivers/gpu/drm/nouveau/nvkm/engine/vp | |
parent | 9d498e0f7a5ece8f61c8a174b40668a2621a82e3 (diff) | |
download | linux-c79a191b2799fb36a7b64c0f9ddc20383ed0dcdb.tar.bz2 |
drm/nouveau/xtensa: convert user classes to new-style nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/vp')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c index a4ff78a34566..0035498024ec 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c +++ b/drivers/gpu/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; |