diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-05-14 10:26:02 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-06-11 16:02:08 +1000 |
commit | 43a33e1db3a142239aecaff02228f6cdaa1d52c9 (patch) | |
tree | cba235a4fa36d3f1095f4dd7b06771d5f8e281f9 | |
parent | 6620441a385974d7bc2bfea6043c8ed4453da65c (diff) |
disp: nothing to see here
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | nvkm/engine/disp/base.c | 21 | ||||
-rw-r--r-- | nvkm/engine/disp/priv.h | 23 | ||||
-rw-r--r-- | nvkm/include/engine/disp.h | 19 |
3 files changed, 42 insertions, 21 deletions
diff --git a/nvkm/engine/disp/base.c b/nvkm/engine/disp/base.c index ade59eb9..7c34cf33 100644 --- a/nvkm/engine/disp/base.c +++ b/nvkm/engine/disp/base.c @@ -22,7 +22,20 @@ * Authors: Ben Skeggs */ -#include <engine/disp.h> +#include "priv.h" + +int +_nouveau_disp_fini(struct nouveau_object *object, bool suspend) +{ + struct nouveau_disp *disp = (void *)object; + return nouveau_engine_fini(&disp->base, suspend); +} + +int +_nouveau_disp_init(struct nouveau_object *object) +{ + return 0; +} void _nouveau_disp_dtor(struct nouveau_object *object) @@ -48,5 +61,9 @@ nouveau_disp_create_(struct nouveau_object *parent, if (ret) return ret; - return nouveau_event_create(1, heads, &disp->vblank); + ret = nouveau_event_create(1, heads, &disp->vblank); + if (ret) + return ret; + + return 0; } diff --git a/nvkm/engine/disp/priv.h b/nvkm/engine/disp/priv.h index cc3c7a4c..66901d28 100644 --- a/nvkm/engine/disp/priv.h +++ b/nvkm/engine/disp/priv.h @@ -7,4 +7,27 @@ struct nouveau_disp_impl { struct nouveau_oclass base; }; +#define nouveau_disp_create(p,e,c,h,i,x,d) \ + nouveau_disp_create_((p), (e), (c), (h), (i), (x), \ + sizeof(**d), (void **)d) +#define nouveau_disp_destroy(d) ({ \ + struct nouveau_disp *disp = (d); \ + _nouveau_disp_dtor(nv_object(disp)); \ +}) +#define nouveau_disp_init(d) ({ \ + struct nouveau_disp *disp = (d); \ + _nouveau_disp_init(nv_object(disp)); \ +}) +#define nouveau_disp_fini(d,s) ({ \ + struct nouveau_disp *disp = (d); \ + _nouveau_disp_fini(nv_object(disp), (s)); \ +}) + +int nouveau_disp_create_(struct nouveau_object *, struct nouveau_object *, + struct nouveau_oclass *, int heads, + const char *, const char *, int, void **); +void _nouveau_disp_dtor(struct nouveau_object *); +int _nouveau_disp_init(struct nouveau_object *); +int _nouveau_disp_fini(struct nouveau_object *, bool); + #endif diff --git a/nvkm/include/engine/disp.h b/nvkm/include/engine/disp.h index fd0c6880..1089faec 100644 --- a/nvkm/include/engine/disp.h +++ b/nvkm/include/engine/disp.h @@ -17,25 +17,6 @@ nouveau_disp(void *obj) return (void *)nv_device(obj)->subdev[NVDEV_ENGINE_DISP]; } -#define nouveau_disp_create(p,e,c,h,i,x,d) \ - nouveau_disp_create_((p), (e), (c), (h), (i), (x), \ - sizeof(**d), (void **)d) -#define nouveau_disp_destroy(d) ({ \ - struct nouveau_disp *disp = (d); \ - _nouveau_disp_dtor(nv_object(disp)); \ -}) -#define nouveau_disp_init(d) \ - nouveau_engine_init(&(d)->base) -#define nouveau_disp_fini(d,s) \ - nouveau_engine_fini(&(d)->base, (s)) - -int nouveau_disp_create_(struct nouveau_object *, struct nouveau_object *, - struct nouveau_oclass *, int heads, - const char *, const char *, int, void **); -void _nouveau_disp_dtor(struct nouveau_object *); -#define _nouveau_disp_init _nouveau_engine_init -#define _nouveau_disp_fini _nouveau_engine_fini - extern struct nouveau_oclass *nv04_disp_oclass; extern struct nouveau_oclass *nv50_disp_oclass; extern struct nouveau_oclass *nv84_disp_oclass; |