diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:18 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:38 +1000 |
commit | a83d8872fc8a482e47f7375ab66006e1f8c1fd59 (patch) | |
tree | ae2559ef6c74c0667e4deee1225b5ef6b7664372 /drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | |
parent | 344c2d429dd86b1b0113177e18f15adb74e9d936 (diff) | |
download | linux-a83d8872fc8a482e47f7375ab66006e1f8c1fd59.tar.bz2 |
drm/nouveau/falcon: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h index 5e6f1f518ea5..bdadc8b60281 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h @@ -1,6 +1,7 @@ #ifndef __NVKM_FALCON_H__ #define __NVKM_FALCON_H__ #include <core/engctx.h> +struct nvkm_fifo_chan; struct nvkm_falcon_chan { struct nvkm_engctx base; @@ -30,6 +31,7 @@ struct nvkm_falcon_data { struct nvkm_falcon { struct nvkm_engine engine; + const struct nvkm_falcon_func *func; u32 addr; u8 version; @@ -51,10 +53,14 @@ struct nvkm_falcon { } data; }; +struct nvkm_falcon_func { + void (*intr)(struct nvkm_falcon *, struct nvkm_fifo_chan *); +}; + #define nv_falcon(priv) ((struct nvkm_falcon *)priv) -#define nvkm_falcon_create(p,e,c,b,d,i,f,r) \ - nvkm_falcon_create_((p), (e), (c), (b), (d), (i), (f), \ +#define nvkm_falcon_create(a,p,e,c,b,d,i,f,r) \ + nvkm_falcon_create_((a), (p), (e), (c), (b), (d), (i), (f), \ sizeof(**r),(void **)r) #define nvkm_falcon_destroy(p) \ nvkm_engine_destroy(&(p)->engine) @@ -67,12 +73,10 @@ struct nvkm_falcon { _nvkm_falcon_fini(nv_object(_falcon), (s)); \ }) -int nvkm_falcon_create_(struct nvkm_object *, struct nvkm_object *, - struct nvkm_oclass *, u32, bool, const char *, - const char *, int, void **); - -void nvkm_falcon_intr(struct nvkm_subdev *subdev); - +int nvkm_falcon_create_(const struct nvkm_falcon_func *, + struct nvkm_object *, struct nvkm_object *, + struct nvkm_oclass *, u32, bool, const char *, + const char *, int, void **); #define _nvkm_falcon_dtor _nvkm_engine_dtor int _nvkm_falcon_init(struct nvkm_object *); int _nvkm_falcon_fini(struct nvkm_object *, bool); |