diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:21 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:45 +1000 |
commit | 98b20c9ab88ff4dbe5f3e239efa5a6b7818c1da7 (patch) | |
tree | 0f4435d3a405b2134ab04d898f8145437945c73a /drivers/gpu/drm/nouveau/nvkm/engine/vp | |
parent | 53e60da43aee440d3f75000cdd269bd1324a8ad4 (diff) | |
download | linux-98b20c9ab88ff4dbe5f3e239efa5a6b7818c1da7.tar.bz2 |
drm/nouveau/xtensa: convert to new-style nvkm_engine
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 | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c index 0035498024ec..4188c77ac927 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c @@ -26,41 +26,19 @@ #include <nvif/class.h> static const struct nvkm_xtensa_func -g84_vp_func = { +g84_vp = { + .pmc_enable = 0x01020000, + .fifo_val = 0x111, + .unkd28 = 0x9c544, .sclass = { { -1, -1, NV74_VP2 }, {} } }; -static int -g84_vp_ctor(struct nvkm_object *parent, struct nvkm_object *engine, - struct nvkm_oclass *oclass, void *data, u32 size, - struct nvkm_object **pobject) +int +g84_vp_new(struct nvkm_device *device, int index, struct nvkm_engine **pengine) { - struct nvkm_xtensa *vp; - int ret; - - ret = nvkm_xtensa_create(parent, engine, oclass, 0xf000, true, - "PVP", "vp", &vp); - *pobject = nv_object(vp); - if (ret) - return ret; - - vp->func = &g84_vp_func; - nv_subdev(vp)->unit = 0x01020000; - vp->fifo_val = 0x111; - vp->unkd28 = 0x9c544; - return 0; + return nvkm_xtensa_new_(&g84_vp, device, index, + true, 0x00f000, pengine); } - -struct nvkm_oclass -g84_vp_oclass = { - .handle = NV_ENGINE(VP, 0x84), - .ofuncs = &(struct nvkm_ofuncs) { - .ctor = g84_vp_ctor, - .dtor = _nvkm_xtensa_dtor, - .init = _nvkm_xtensa_init, - .fini = _nvkm_xtensa_fini, - }, -}; |