From: Ben Skeggs Date: Wed, 14 Jan 2015 05:29:56 +0000 (+1000) Subject: drm/nouveau/mpeg: namespace + nvidia gpu names (no binary change) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7c29683fd014dfb9a730086c2c564161264e1ea;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/nouveau/mpeg: 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 --- diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/mpeg.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/mpeg.h index 9b0d938199f6..4e500b398064 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/mpeg.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/mpeg.h @@ -1,63 +1,62 @@ -#ifndef __NOUVEAU_MPEG_H__ -#define __NOUVEAU_MPEG_H__ - -#include +#ifndef __NVKM_MPEG_H__ +#define __NVKM_MPEG_H__ #include -struct nouveau_mpeg_chan { - struct nouveau_engctx base; +struct nvkm_mpeg_chan { + struct nvkm_engctx base; }; -#define nouveau_mpeg_context_create(p,e,c,g,s,a,f,d) \ - nouveau_engctx_create((p), (e), (c), (g), (s), (a), (f), (d)) -#define nouveau_mpeg_context_destroy(d) \ - nouveau_engctx_destroy(&(d)->base) -#define nouveau_mpeg_context_init(d) \ - nouveau_engctx_init(&(d)->base) -#define nouveau_mpeg_context_fini(d,s) \ - nouveau_engctx_fini(&(d)->base, (s)) - -#define _nouveau_mpeg_context_dtor _nouveau_engctx_dtor -#define _nouveau_mpeg_context_init _nouveau_engctx_init -#define _nouveau_mpeg_context_fini _nouveau_engctx_fini -#define _nouveau_mpeg_context_rd32 _nouveau_engctx_rd32 -#define _nouveau_mpeg_context_wr32 _nouveau_engctx_wr32 - -struct nouveau_mpeg { - struct nouveau_engine base; -}; +#define nvkm_mpeg_context_create(p,e,c,g,s,a,f,d) \ + nvkm_engctx_create((p), (e), (c), (g), (s), (a), (f), (d)) +#define nvkm_mpeg_context_destroy(d) \ + nvkm_engctx_destroy(&(d)->base) +#define nvkm_mpeg_context_init(d) \ + nvkm_engctx_init(&(d)->base) +#define nvkm_mpeg_context_fini(d,s) \ + nvkm_engctx_fini(&(d)->base, (s)) + +#define _nvkm_mpeg_context_dtor _nvkm_engctx_dtor +#define _nvkm_mpeg_context_init _nvkm_engctx_init +#define _nvkm_mpeg_context_fini _nvkm_engctx_fini +#define _nvkm_mpeg_context_rd32 _nvkm_engctx_rd32 +#define _nvkm_mpeg_context_wr32 _nvkm_engctx_wr32 -#define nouveau_mpeg_create(p,e,c,d) \ - nouveau_engine_create((p), (e), (c), true, "PMPEG", "mpeg", (d)) -#define nouveau_mpeg_destroy(d) \ - nouveau_engine_destroy(&(d)->base) -#define nouveau_mpeg_init(d) \ - nouveau_engine_init(&(d)->base) -#define nouveau_mpeg_fini(d,s) \ - nouveau_engine_fini(&(d)->base, (s)) - -#define _nouveau_mpeg_dtor _nouveau_engine_dtor -#define _nouveau_mpeg_init _nouveau_engine_init -#define _nouveau_mpeg_fini _nouveau_engine_fini - -extern struct nouveau_oclass nv31_mpeg_oclass; -extern struct nouveau_oclass nv40_mpeg_oclass; -extern struct nouveau_oclass nv44_mpeg_oclass; -extern struct nouveau_oclass nv50_mpeg_oclass; -extern struct nouveau_oclass nv84_mpeg_oclass; -extern struct nouveau_ofuncs nv31_mpeg_ofuncs; -extern struct nouveau_oclass nv31_mpeg_cclass; -extern struct nouveau_oclass nv31_mpeg_sclass[]; -extern struct nouveau_oclass nv40_mpeg_sclass[]; -void nv31_mpeg_intr(struct nouveau_subdev *); -void nv31_mpeg_tile_prog(struct nouveau_engine *, int); -int nv31_mpeg_init(struct nouveau_object *); - -extern struct nouveau_ofuncs nv50_mpeg_ofuncs; -int nv50_mpeg_context_ctor(struct nouveau_object *, struct nouveau_object *, - struct nouveau_oclass *, void *, u32, - struct nouveau_object **); -void nv50_mpeg_intr(struct nouveau_subdev *); -int nv50_mpeg_init(struct nouveau_object *); +#include + +struct nvkm_mpeg { + struct nvkm_engine base; +}; +#define nvkm_mpeg_create(p,e,c,d) \ + nvkm_engine_create((p), (e), (c), true, "PMPEG", "mpeg", (d)) +#define nvkm_mpeg_destroy(d) \ + nvkm_engine_destroy(&(d)->base) +#define nvkm_mpeg_init(d) \ + nvkm_engine_init(&(d)->base) +#define nvkm_mpeg_fini(d,s) \ + nvkm_engine_fini(&(d)->base, (s)) + +#define _nvkm_mpeg_dtor _nvkm_engine_dtor +#define _nvkm_mpeg_init _nvkm_engine_init +#define _nvkm_mpeg_fini _nvkm_engine_fini + +extern struct nvkm_oclass nv31_mpeg_oclass; +extern struct nvkm_oclass nv40_mpeg_oclass; +extern struct nvkm_oclass nv44_mpeg_oclass; +extern struct nvkm_oclass nv50_mpeg_oclass; +extern struct nvkm_oclass g84_mpeg_oclass; +extern struct nvkm_ofuncs nv31_mpeg_ofuncs; +extern struct nvkm_oclass nv31_mpeg_cclass; +extern struct nvkm_oclass nv31_mpeg_sclass[]; +extern struct nvkm_oclass nv40_mpeg_sclass[]; +void nv31_mpeg_intr(struct nvkm_subdev *); +void nv31_mpeg_tile_prog(struct nvkm_engine *, int); +int nv31_mpeg_init(struct nvkm_object *); + +extern struct nvkm_ofuncs nv50_mpeg_ofuncs; +int nv50_mpeg_context_ctor(struct nvkm_object *, struct nvkm_object *, + struct nvkm_oclass *, void *, u32, + struct nvkm_object **); +void nv50_mpeg_intr(struct nvkm_subdev *); +int nv50_mpeg_init(struct nvkm_object *); #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c index f48fd5a22f26..2db202b1cc3a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c @@ -109,7 +109,7 @@ nv50_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_FIFO ] = g84_fifo_oclass; device->oclass[NVDEV_ENGINE_SW ] = nv50_sw_oclass; device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; - device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; + device->oclass[NVDEV_ENGINE_MPEG ] = &g84_mpeg_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &g84_cipher_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass; @@ -138,7 +138,7 @@ nv50_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_FIFO ] = g84_fifo_oclass; device->oclass[NVDEV_ENGINE_SW ] = nv50_sw_oclass; device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; - device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; + device->oclass[NVDEV_ENGINE_MPEG ] = &g84_mpeg_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &g84_cipher_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass; @@ -167,7 +167,7 @@ nv50_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_FIFO ] = g84_fifo_oclass; device->oclass[NVDEV_ENGINE_SW ] = nv50_sw_oclass; device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; - device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; + device->oclass[NVDEV_ENGINE_MPEG ] = &g84_mpeg_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &g84_cipher_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass; @@ -196,7 +196,7 @@ nv50_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_FIFO ] = g84_fifo_oclass; device->oclass[NVDEV_ENGINE_SW ] = nv50_sw_oclass; device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; - device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; + device->oclass[NVDEV_ENGINE_MPEG ] = &g84_mpeg_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &g84_cipher_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass; @@ -225,7 +225,7 @@ nv50_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_FIFO ] = g84_fifo_oclass; device->oclass[NVDEV_ENGINE_SW ] = nv50_sw_oclass; device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; - device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; + device->oclass[NVDEV_ENGINE_MPEG ] = &g84_mpeg_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &g84_cipher_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass; @@ -283,7 +283,7 @@ nv50_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_FIFO ] = g84_fifo_oclass; device->oclass[NVDEV_ENGINE_SW ] = nv50_sw_oclass; device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; - device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; + device->oclass[NVDEV_ENGINE_MPEG ] = &g84_mpeg_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &g84_cipher_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass; @@ -371,7 +371,7 @@ nv50_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_FIFO ] = g84_fifo_oclass; device->oclass[NVDEV_ENGINE_SW ] = nv50_sw_oclass; device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; - device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; + device->oclass[NVDEV_ENGINE_MPEG ] = &g84_mpeg_oclass; device->oclass[NVDEV_ENGINE_MSPDEC ] = &nv98_mspdec_oclass; device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; device->oclass[NVDEV_ENGINE_MSPPP ] = &nv98_msppp_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/Kbuild index 39a045bcaf6e..61b7b5f98f3c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/Kbuild +++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/Kbuild @@ -2,4 +2,4 @@ nvkm-y += nvkm/engine/mpeg/nv31.o nvkm-y += nvkm/engine/mpeg/nv40.o nvkm-y += nvkm/engine/mpeg/nv44.o nvkm-y += nvkm/engine/mpeg/nv50.o -nvkm-y += nvkm/engine/mpeg/nv84.o +nvkm-y += nvkm/engine/mpeg/g84.o diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/g84.c new file mode 100644 index 000000000000..0df889fa2611 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/g84.c @@ -0,0 +1,94 @@ +/* + * Copyright 2012 Red Hat Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Ben Skeggs + */ +#include + +struct g84_mpeg_priv { + struct nvkm_mpeg base; +}; + +struct g84_mpeg_chan { + struct nvkm_mpeg_chan base; +}; + +/******************************************************************************* + * MPEG object classes + ******************************************************************************/ + +static struct nvkm_oclass +g84_mpeg_sclass[] = { + { 0x8274, &nv50_mpeg_ofuncs }, + {} +}; + +/******************************************************************************* + * PMPEG context + ******************************************************************************/ + +static struct nvkm_oclass +g84_mpeg_cclass = { + .handle = NV_ENGCTX(MPEG, 0x84), + .ofuncs = &(struct nvkm_ofuncs) { + .ctor = nv50_mpeg_context_ctor, + .dtor = _nvkm_mpeg_context_dtor, + .init = _nvkm_mpeg_context_init, + .fini = _nvkm_mpeg_context_fini, + .rd32 = _nvkm_mpeg_context_rd32, + .wr32 = _nvkm_mpeg_context_wr32, + }, +}; + +/******************************************************************************* + * PMPEG engine/subdev functions + ******************************************************************************/ + +static int +g84_mpeg_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) +{ + struct g84_mpeg_priv *priv; + int ret; + + ret = nvkm_mpeg_create(parent, engine, oclass, &priv); + *pobject = nv_object(priv); + if (ret) + return ret; + + nv_subdev(priv)->unit = 0x00000002; + nv_subdev(priv)->intr = nv50_mpeg_intr; + nv_engine(priv)->cclass = &g84_mpeg_cclass; + nv_engine(priv)->sclass = g84_mpeg_sclass; + return 0; +} + +struct nvkm_oclass +g84_mpeg_oclass = { + .handle = NV_ENGINE(MPEG, 0x84), + .ofuncs = &(struct nvkm_ofuncs) { + .ctor = g84_mpeg_ctor, + .dtor = _nvkm_mpeg_dtor, + .init = nv50_mpeg_init, + .fini = _nvkm_mpeg_fini, + }, +}; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c index d88c700b2f69..b5bef0718359 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c @@ -21,35 +21,30 @@ * * Authors: Ben Skeggs */ +#include "nv31.h" #include -#include -#include #include - +#include +#include #include #include -#include - -#include -#include -#include /******************************************************************************* * MPEG object classes ******************************************************************************/ static int -nv31_mpeg_object_ctor(struct nouveau_object *parent, - struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv31_mpeg_object_ctor(struct nvkm_object *parent, + struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { - struct nouveau_gpuobj *obj; + struct nvkm_gpuobj *obj; int ret; - ret = nouveau_gpuobj_create(parent, engine, oclass, 0, parent, - 20, 16, 0, &obj); + ret = nvkm_gpuobj_create(parent, engine, oclass, 0, parent, + 20, 16, 0, &obj); *pobject = nv_object(obj); if (ret) return ret; @@ -62,9 +57,9 @@ nv31_mpeg_object_ctor(struct nouveau_object *parent, } static int -nv31_mpeg_mthd_dma(struct nouveau_object *object, u32 mthd, void *arg, u32 len) +nv31_mpeg_mthd_dma(struct nvkm_object *object, u32 mthd, void *arg, u32 len) { - struct nouveau_instmem *imem = nouveau_instmem(object); + struct nvkm_instmem *imem = nvkm_instmem(object); struct nv31_mpeg_priv *priv = (void *)object->engine; u32 inst = *(u32 *)arg << 4; u32 dma0 = nv_ro32(imem, inst + 0); @@ -100,17 +95,17 @@ nv31_mpeg_mthd_dma(struct nouveau_object *object, u32 mthd, void *arg, u32 len) return 0; } -struct nouveau_ofuncs +struct nvkm_ofuncs nv31_mpeg_ofuncs = { .ctor = nv31_mpeg_object_ctor, - .dtor = _nouveau_gpuobj_dtor, - .init = _nouveau_gpuobj_init, - .fini = _nouveau_gpuobj_fini, - .rd32 = _nouveau_gpuobj_rd32, - .wr32 = _nouveau_gpuobj_wr32, + .dtor = _nvkm_gpuobj_dtor, + .init = _nvkm_gpuobj_init, + .fini = _nvkm_gpuobj_fini, + .rd32 = _nvkm_gpuobj_rd32, + .wr32 = _nvkm_gpuobj_wr32, }; -static struct nouveau_omthds +static struct nvkm_omthds nv31_mpeg_omthds[] = { { 0x0190, 0x0190, nv31_mpeg_mthd_dma }, { 0x01a0, 0x01a0, nv31_mpeg_mthd_dma }, @@ -118,7 +113,7 @@ nv31_mpeg_omthds[] = { {} }; -struct nouveau_oclass +struct nvkm_oclass nv31_mpeg_sclass[] = { { 0x3174, &nv31_mpeg_ofuncs, nv31_mpeg_omthds }, {} @@ -129,17 +124,17 @@ nv31_mpeg_sclass[] = { ******************************************************************************/ static int -nv31_mpeg_context_ctor(struct nouveau_object *parent, - struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv31_mpeg_context_ctor(struct nvkm_object *parent, + struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct nv31_mpeg_priv *priv = (void *)engine; struct nv31_mpeg_chan *chan; unsigned long flags; int ret; - ret = nouveau_object_create(parent, engine, oclass, 0, &chan); + ret = nvkm_object_create(parent, engine, oclass, 0, &chan); *pobject = nv_object(chan); if (ret) return ret; @@ -147,7 +142,7 @@ nv31_mpeg_context_ctor(struct nouveau_object *parent, spin_lock_irqsave(&nv_engine(priv)->lock, flags); if (priv->chan) { spin_unlock_irqrestore(&nv_engine(priv)->lock, flags); - nouveau_object_destroy(&chan->base); + nvkm_object_destroy(&chan->base); *pobject = NULL; return -EBUSY; } @@ -157,7 +152,7 @@ nv31_mpeg_context_ctor(struct nouveau_object *parent, } static void -nv31_mpeg_context_dtor(struct nouveau_object *object) +nv31_mpeg_context_dtor(struct nvkm_object *object) { struct nv31_mpeg_priv *priv = (void *)object->engine; struct nv31_mpeg_chan *chan = (void *)object; @@ -166,17 +161,17 @@ nv31_mpeg_context_dtor(struct nouveau_object *object) spin_lock_irqsave(&nv_engine(priv)->lock, flags); priv->chan = NULL; spin_unlock_irqrestore(&nv_engine(priv)->lock, flags); - nouveau_object_destroy(&chan->base); + nvkm_object_destroy(&chan->base); } -struct nouveau_oclass +struct nvkm_oclass nv31_mpeg_cclass = { .handle = NV_ENGCTX(MPEG, 0x31), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv31_mpeg_context_ctor, .dtor = nv31_mpeg_context_dtor, - .init = nouveau_object_init, - .fini = nouveau_object_fini, + .init = nvkm_object_init, + .fini = nvkm_object_fini, }, }; @@ -185,9 +180,9 @@ nv31_mpeg_cclass = { ******************************************************************************/ void -nv31_mpeg_tile_prog(struct nouveau_engine *engine, int i) +nv31_mpeg_tile_prog(struct nvkm_engine *engine, int i) { - struct nouveau_fb_tile *tile = &nouveau_fb(engine)->tile.region[i]; + struct nvkm_fb_tile *tile = &nvkm_fb(engine)->tile.region[i]; struct nv31_mpeg_priv *priv = (void *)engine; nv_wr32(priv, 0x00b008 + (i * 0x10), tile->pitch); @@ -196,12 +191,12 @@ nv31_mpeg_tile_prog(struct nouveau_engine *engine, int i) } void -nv31_mpeg_intr(struct nouveau_subdev *subdev) +nv31_mpeg_intr(struct nvkm_subdev *subdev) { struct nv31_mpeg_priv *priv = (void *)subdev; - struct nouveau_fifo *pfifo = nouveau_fifo(subdev); - struct nouveau_handle *handle; - struct nouveau_object *engctx; + struct nvkm_fifo *pfifo = nvkm_fifo(subdev); + struct nvkm_handle *handle; + struct nvkm_object *engctx; u32 stat = nv_rd32(priv, 0x00b100); u32 type = nv_rd32(priv, 0x00b230); u32 mthd = nv_rd32(priv, 0x00b234); @@ -220,10 +215,10 @@ nv31_mpeg_intr(struct nouveau_subdev *subdev) } if (type == 0x00000010 && engctx) { - handle = nouveau_handle_get_class(engctx, 0x3174); + handle = nvkm_handle_get_class(engctx, 0x3174); if (handle && !nv_call(handle->object, mthd, data)) show &= ~0x01000000; - nouveau_handle_put(handle); + nvkm_handle_put(handle); } } @@ -233,21 +228,21 @@ nv31_mpeg_intr(struct nouveau_subdev *subdev) if (show) { nv_error(priv, "ch %d [%s] 0x%08x 0x%08x 0x%08x 0x%08x\n", pfifo->chid(pfifo, engctx), - nouveau_client_name(engctx), stat, type, mthd, data); + nvkm_client_name(engctx), stat, type, mthd, data); } spin_unlock_irqrestore(&nv_engine(priv)->lock, flags); } static int -nv31_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv31_mpeg_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct nv31_mpeg_priv *priv; int ret; - ret = nouveau_mpeg_create(parent, engine, oclass, &priv); + ret = nvkm_mpeg_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; @@ -261,14 +256,14 @@ nv31_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, } int -nv31_mpeg_init(struct nouveau_object *object) +nv31_mpeg_init(struct nvkm_object *object) { - struct nouveau_engine *engine = nv_engine(object); + struct nvkm_engine *engine = nv_engine(object); struct nv31_mpeg_priv *priv = (void *)object; - struct nouveau_fb *pfb = nouveau_fb(object); + struct nvkm_fb *pfb = nvkm_fb(object); int ret, i; - ret = nouveau_mpeg_init(&priv->base); + ret = nvkm_mpeg_init(&priv->base); if (ret) return ret; @@ -297,13 +292,13 @@ nv31_mpeg_init(struct nouveau_object *object) return 0; } -struct nouveau_oclass +struct nvkm_oclass nv31_mpeg_oclass = { .handle = NV_ENGINE(MPEG, 0x31), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv31_mpeg_ctor, - .dtor = _nouveau_mpeg_dtor, + .dtor = _nvkm_mpeg_dtor, .init = nv31_mpeg_init, - .fini = _nouveau_mpeg_fini, + .fini = _nvkm_mpeg_fini, }, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h index d08629d0b6ad..782b796d7458 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h @@ -1,15 +1,13 @@ #ifndef __NV31_MPEG_H__ #define __NV31_MPEG_H__ - #include struct nv31_mpeg_chan { - struct nouveau_object base; + struct nvkm_object base; }; struct nv31_mpeg_priv { - struct nouveau_mpeg base; + struct nvkm_mpeg base; struct nv31_mpeg_chan *chan; }; - #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c index bdb2f20ff7b1..9508bf9e140f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv40.c @@ -21,25 +21,18 @@ * * Authors: Ben Skeggs */ +#include "nv31.h" -#include -#include - -#include -#include #include -#include -#include - /******************************************************************************* * MPEG object classes ******************************************************************************/ static int -nv40_mpeg_mthd_dma(struct nouveau_object *object, u32 mthd, void *arg, u32 len) +nv40_mpeg_mthd_dma(struct nvkm_object *object, u32 mthd, void *arg, u32 len) { - struct nouveau_instmem *imem = nouveau_instmem(object); + struct nvkm_instmem *imem = nvkm_instmem(object); struct nv31_mpeg_priv *priv = (void *)object->engine; u32 inst = *(u32 *)arg << 4; u32 dma0 = nv_ro32(imem, inst + 0); @@ -75,7 +68,7 @@ nv40_mpeg_mthd_dma(struct nouveau_object *object, u32 mthd, void *arg, u32 len) return 0; } -static struct nouveau_omthds +static struct nvkm_omthds nv40_mpeg_omthds[] = { { 0x0190, 0x0190, nv40_mpeg_mthd_dma }, { 0x01a0, 0x01a0, nv40_mpeg_mthd_dma }, @@ -83,7 +76,7 @@ nv40_mpeg_omthds[] = { {} }; -struct nouveau_oclass +struct nvkm_oclass nv40_mpeg_sclass[] = { { 0x3174, &nv31_mpeg_ofuncs, nv40_mpeg_omthds }, {} @@ -94,7 +87,7 @@ nv40_mpeg_sclass[] = { ******************************************************************************/ static void -nv40_mpeg_intr(struct nouveau_subdev *subdev) +nv40_mpeg_intr(struct nvkm_subdev *subdev) { struct nv31_mpeg_priv *priv = (void *)subdev; u32 stat; @@ -109,14 +102,14 @@ nv40_mpeg_intr(struct nouveau_subdev *subdev) } static int -nv40_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv40_mpeg_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct nv31_mpeg_priv *priv; int ret; - ret = nouveau_mpeg_create(parent, engine, oclass, &priv); + ret = nvkm_mpeg_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; @@ -129,13 +122,13 @@ nv40_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, return 0; } -struct nouveau_oclass +struct nvkm_oclass nv40_mpeg_oclass = { .handle = NV_ENGINE(MPEG, 0x40), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv40_mpeg_ctor, - .dtor = _nouveau_mpeg_dtor, + .dtor = _nvkm_mpeg_dtor, .init = nv31_mpeg_init, - .fini = _nouveau_mpeg_fini, + .fini = _nvkm_mpeg_fini, }, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c index 72c7f33fd29b..4720ac884468 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c @@ -21,25 +21,18 @@ * * Authors: Ben Skeggs */ +#include -#include #include -#include #include - -#include -#include -#include - #include -#include struct nv44_mpeg_priv { - struct nouveau_mpeg base; + struct nvkm_mpeg base; }; struct nv44_mpeg_chan { - struct nouveau_mpeg_chan base; + struct nvkm_mpeg_chan base; }; /******************************************************************************* @@ -47,17 +40,16 @@ struct nv44_mpeg_chan { ******************************************************************************/ static int -nv44_mpeg_context_ctor(struct nouveau_object *parent, - struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv44_mpeg_context_ctor(struct nvkm_object *parent, + struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct nv44_mpeg_chan *chan; int ret; - ret = nouveau_mpeg_context_create(parent, engine, oclass, NULL, - 264 * 4, 16, - NVOBJ_FLAG_ZERO_ALLOC, &chan); + ret = nvkm_mpeg_context_create(parent, engine, oclass, NULL, 264 * 4, + 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); *pobject = nv_object(chan); if (ret) return ret; @@ -67,7 +59,7 @@ nv44_mpeg_context_ctor(struct nouveau_object *parent, } static int -nv44_mpeg_context_fini(struct nouveau_object *object, bool suspend) +nv44_mpeg_context_fini(struct nvkm_object *object, bool suspend) { struct nv44_mpeg_priv *priv = (void *)object->engine; @@ -81,16 +73,16 @@ nv44_mpeg_context_fini(struct nouveau_object *object, bool suspend) return 0; } -static struct nouveau_oclass +static struct nvkm_oclass nv44_mpeg_cclass = { .handle = NV_ENGCTX(MPEG, 0x44), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv44_mpeg_context_ctor, - .dtor = _nouveau_mpeg_context_dtor, - .init = _nouveau_mpeg_context_init, + .dtor = _nvkm_mpeg_context_dtor, + .init = _nvkm_mpeg_context_init, .fini = nv44_mpeg_context_fini, - .rd32 = _nouveau_mpeg_context_rd32, - .wr32 = _nouveau_mpeg_context_wr32, + .rd32 = _nvkm_mpeg_context_rd32, + .wr32 = _nvkm_mpeg_context_wr32, }, }; @@ -99,12 +91,12 @@ nv44_mpeg_cclass = { ******************************************************************************/ static void -nv44_mpeg_intr(struct nouveau_subdev *subdev) +nv44_mpeg_intr(struct nvkm_subdev *subdev) { - struct nouveau_fifo *pfifo = nouveau_fifo(subdev); - struct nouveau_engine *engine = nv_engine(subdev); - struct nouveau_object *engctx; - struct nouveau_handle *handle; + struct nvkm_fifo *pfifo = nvkm_fifo(subdev); + struct nvkm_engine *engine = nv_engine(subdev); + struct nvkm_object *engctx; + struct nvkm_handle *handle; struct nv44_mpeg_priv *priv = (void *)subdev; u32 inst = nv_rd32(priv, 0x00b318) & 0x000fffff; u32 stat = nv_rd32(priv, 0x00b100); @@ -114,7 +106,7 @@ nv44_mpeg_intr(struct nouveau_subdev *subdev) u32 show = stat; int chid; - engctx = nouveau_engctx_get(engine, inst); + engctx = nvkm_engctx_get(engine, inst); chid = pfifo->chid(pfifo, engctx); if (stat & 0x01000000) { @@ -125,10 +117,10 @@ nv44_mpeg_intr(struct nouveau_subdev *subdev) } if (type == 0x00000010) { - handle = nouveau_handle_get_class(engctx, 0x3174); + handle = nvkm_handle_get_class(engctx, 0x3174); if (handle && !nv_call(handle->object, mthd, data)) show &= ~0x01000000; - nouveau_handle_put(handle); + nvkm_handle_put(handle); } } @@ -138,15 +130,15 @@ nv44_mpeg_intr(struct nouveau_subdev *subdev) if (show) { nv_error(priv, "ch %d [0x%08x %s] 0x%08x 0x%08x 0x%08x 0x%08x\n", - chid, inst << 4, nouveau_client_name(engctx), stat, + chid, inst << 4, nvkm_client_name(engctx), stat, type, mthd, data); } - nouveau_engctx_put(engctx); + nvkm_engctx_put(engctx); } static void -nv44_mpeg_me_intr(struct nouveau_subdev *subdev) +nv44_mpeg_me_intr(struct nvkm_subdev *subdev) { struct nv44_mpeg_priv *priv = (void *)subdev; u32 stat; @@ -161,14 +153,14 @@ nv44_mpeg_me_intr(struct nouveau_subdev *subdev) } static int -nv44_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv44_mpeg_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct nv44_mpeg_priv *priv; int ret; - ret = nouveau_mpeg_create(parent, engine, oclass, &priv); + ret = nvkm_mpeg_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; @@ -181,13 +173,13 @@ nv44_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, return 0; } -struct nouveau_oclass +struct nvkm_oclass nv44_mpeg_oclass = { .handle = NV_ENGINE(MPEG, 0x44), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv44_mpeg_ctor, - .dtor = _nouveau_mpeg_dtor, + .dtor = _nvkm_mpeg_dtor, .init = nv31_mpeg_init, - .fini = _nouveau_mpeg_fini, + .fini = _nvkm_mpeg_fini, }, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c index b62c301b31a1..b3463f3739ce 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c @@ -21,22 +21,17 @@ * * Authors: Ben Skeggs */ +#include -#include -#include - -#include #include #include -#include - struct nv50_mpeg_priv { - struct nouveau_mpeg base; + struct nvkm_mpeg base; }; struct nv50_mpeg_chan { - struct nouveau_mpeg_chan base; + struct nvkm_mpeg_chan base; }; /******************************************************************************* @@ -44,16 +39,16 @@ struct nv50_mpeg_chan { ******************************************************************************/ static int -nv50_mpeg_object_ctor(struct nouveau_object *parent, - struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv50_mpeg_object_ctor(struct nvkm_object *parent, + struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { - struct nouveau_gpuobj *obj; + struct nvkm_gpuobj *obj; int ret; - ret = nouveau_gpuobj_create(parent, engine, oclass, 0, parent, - 16, 16, 0, &obj); + ret = nvkm_gpuobj_create(parent, engine, oclass, 0, parent, + 16, 16, 0, &obj); *pobject = nv_object(obj); if (ret) return ret; @@ -65,17 +60,17 @@ nv50_mpeg_object_ctor(struct nouveau_object *parent, return 0; } -struct nouveau_ofuncs +struct nvkm_ofuncs nv50_mpeg_ofuncs = { .ctor = nv50_mpeg_object_ctor, - .dtor = _nouveau_gpuobj_dtor, - .init = _nouveau_gpuobj_init, - .fini = _nouveau_gpuobj_fini, - .rd32 = _nouveau_gpuobj_rd32, - .wr32 = _nouveau_gpuobj_wr32, + .dtor = _nvkm_gpuobj_dtor, + .init = _nvkm_gpuobj_init, + .fini = _nvkm_gpuobj_fini, + .rd32 = _nvkm_gpuobj_rd32, + .wr32 = _nvkm_gpuobj_wr32, }; -static struct nouveau_oclass +static struct nvkm_oclass nv50_mpeg_sclass[] = { { 0x3174, &nv50_mpeg_ofuncs }, {} @@ -86,17 +81,17 @@ nv50_mpeg_sclass[] = { ******************************************************************************/ int -nv50_mpeg_context_ctor(struct nouveau_object *parent, - struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv50_mpeg_context_ctor(struct nvkm_object *parent, + struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { - struct nouveau_bar *bar = nouveau_bar(parent); + struct nvkm_bar *bar = nvkm_bar(parent); struct nv50_mpeg_chan *chan; int ret; - ret = nouveau_mpeg_context_create(parent, engine, oclass, NULL, 128 * 4, - 0, NVOBJ_FLAG_ZERO_ALLOC, &chan); + ret = nvkm_mpeg_context_create(parent, engine, oclass, NULL, 128 * 4, + 0, NVOBJ_FLAG_ZERO_ALLOC, &chan); *pobject = nv_object(chan); if (ret) return ret; @@ -107,16 +102,16 @@ nv50_mpeg_context_ctor(struct nouveau_object *parent, return 0; } -static struct nouveau_oclass +static struct nvkm_oclass nv50_mpeg_cclass = { .handle = NV_ENGCTX(MPEG, 0x50), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv50_mpeg_context_ctor, - .dtor = _nouveau_mpeg_context_dtor, - .init = _nouveau_mpeg_context_init, - .fini = _nouveau_mpeg_context_fini, - .rd32 = _nouveau_mpeg_context_rd32, - .wr32 = _nouveau_mpeg_context_wr32, + .dtor = _nvkm_mpeg_context_dtor, + .init = _nvkm_mpeg_context_init, + .fini = _nvkm_mpeg_context_fini, + .rd32 = _nvkm_mpeg_context_rd32, + .wr32 = _nvkm_mpeg_context_wr32, }, }; @@ -125,7 +120,7 @@ nv50_mpeg_cclass = { ******************************************************************************/ void -nv50_mpeg_intr(struct nouveau_subdev *subdev) +nv50_mpeg_intr(struct nvkm_subdev *subdev) { struct nv50_mpeg_priv *priv = (void *)subdev; u32 stat = nv_rd32(priv, 0x00b100); @@ -152,7 +147,7 @@ nv50_mpeg_intr(struct nouveau_subdev *subdev) } static void -nv50_vpe_intr(struct nouveau_subdev *subdev) +nv50_vpe_intr(struct nvkm_subdev *subdev) { struct nv50_mpeg_priv *priv = (void *)subdev; @@ -167,14 +162,14 @@ nv50_vpe_intr(struct nouveau_subdev *subdev) } static int -nv50_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nv50_mpeg_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct nv50_mpeg_priv *priv; int ret; - ret = nouveau_mpeg_create(parent, engine, oclass, &priv); + ret = nvkm_mpeg_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; @@ -187,12 +182,12 @@ nv50_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, } int -nv50_mpeg_init(struct nouveau_object *object) +nv50_mpeg_init(struct nvkm_object *object) { struct nv50_mpeg_priv *priv = (void *)object; int ret; - ret = nouveau_mpeg_init(&priv->base); + ret = nvkm_mpeg_init(&priv->base); if (ret) return ret; @@ -218,13 +213,13 @@ nv50_mpeg_init(struct nouveau_object *object) return 0; } -struct nouveau_oclass +struct nvkm_oclass nv50_mpeg_oclass = { .handle = NV_ENGINE(MPEG, 0x50), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv50_mpeg_ctor, - .dtor = _nouveau_mpeg_dtor, + .dtor = _nvkm_mpeg_dtor, .init = nv50_mpeg_init, - .fini = _nouveau_mpeg_fini, + .fini = _nvkm_mpeg_fini, }, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv84.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv84.c deleted file mode 100644 index 97c8343e1a08..000000000000 --- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv84.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2012 Red Hat Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: Ben Skeggs - */ - -#include -#include - -#include -#include -#include - -#include - -struct nv84_mpeg_priv { - struct nouveau_mpeg base; -}; - -struct nv84_mpeg_chan { - struct nouveau_mpeg_chan base; -}; - -/******************************************************************************* - * MPEG object classes - ******************************************************************************/ - -static struct nouveau_oclass -nv84_mpeg_sclass[] = { - { 0x8274, &nv50_mpeg_ofuncs }, - {} -}; - -/******************************************************************************* - * PMPEG context - ******************************************************************************/ - -static struct nouveau_oclass -nv84_mpeg_cclass = { - .handle = NV_ENGCTX(MPEG, 0x84), - .ofuncs = &(struct nouveau_ofuncs) { - .ctor = nv50_mpeg_context_ctor, - .dtor = _nouveau_mpeg_context_dtor, - .init = _nouveau_mpeg_context_init, - .fini = _nouveau_mpeg_context_fini, - .rd32 = _nouveau_mpeg_context_rd32, - .wr32 = _nouveau_mpeg_context_wr32, - }, -}; - -/******************************************************************************* - * PMPEG engine/subdev functions - ******************************************************************************/ - -static int -nv84_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) -{ - struct nv84_mpeg_priv *priv; - int ret; - - ret = nouveau_mpeg_create(parent, engine, oclass, &priv); - *pobject = nv_object(priv); - if (ret) - return ret; - - nv_subdev(priv)->unit = 0x00000002; - nv_subdev(priv)->intr = nv50_mpeg_intr; - nv_engine(priv)->cclass = &nv84_mpeg_cclass; - nv_engine(priv)->sclass = nv84_mpeg_sclass; - return 0; -} - -struct nouveau_oclass -nv84_mpeg_oclass = { - .handle = NV_ENGINE(MPEG, 0x84), - .ofuncs = &(struct nouveau_ofuncs) { - .ctor = nv84_mpeg_ctor, - .dtor = _nouveau_mpeg_dtor, - .init = nv50_mpeg_init, - .fini = _nouveau_mpeg_fini, - }, -};