diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-05-13 20:26:02 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-06-11 02:10:35 -0400 |
commit | 377b1f165c22ab1f74d62fbfce3d0b900e03193c (patch) | |
tree | 82b7c9c9a9cf582c78ace77dbe52633ddd27d181 /drivers/gpu/drm/nouveau | |
parent | 37da5b87ac5abfdb26445cfe24830e15a2dc2758 (diff) |
drm/nouveau/disp: nothing to see here
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/disp/base.c | 21 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/disp/priv.h | 23 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/engine/disp.h | 19 |
3 files changed, 42 insertions, 21 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/base.c b/drivers/gpu/drm/nouveau/core/engine/disp/base.c index ade59eb92fd9..7c34cf33be85 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/base.c | |||
@@ -22,7 +22,20 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <engine/disp.h> | 25 | #include "priv.h" |
26 | |||
27 | int | ||
28 | _nouveau_disp_fini(struct nouveau_object *object, bool suspend) | ||
29 | { | ||
30 | struct nouveau_disp *disp = (void *)object; | ||
31 | return nouveau_engine_fini(&disp->base, suspend); | ||
32 | } | ||
33 | |||
34 | int | ||
35 | _nouveau_disp_init(struct nouveau_object *object) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
26 | 39 | ||
27 | void | 40 | void |
28 | _nouveau_disp_dtor(struct nouveau_object *object) | 41 | _nouveau_disp_dtor(struct nouveau_object *object) |
@@ -48,5 +61,9 @@ nouveau_disp_create_(struct nouveau_object *parent, | |||
48 | if (ret) | 61 | if (ret) |
49 | return ret; | 62 | return ret; |
50 | 63 | ||
51 | return nouveau_event_create(1, heads, &disp->vblank); | 64 | ret = nouveau_event_create(1, heads, &disp->vblank); |
65 | if (ret) | ||
66 | return ret; | ||
67 | |||
68 | return 0; | ||
52 | } | 69 | } |
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/priv.h b/drivers/gpu/drm/nouveau/core/engine/disp/priv.h index cc3c7a4ca747..66901d28a966 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/priv.h +++ b/drivers/gpu/drm/nouveau/core/engine/disp/priv.h | |||
@@ -7,4 +7,27 @@ struct nouveau_disp_impl { | |||
7 | struct nouveau_oclass base; | 7 | struct nouveau_oclass base; |
8 | }; | 8 | }; |
9 | 9 | ||
10 | #define nouveau_disp_create(p,e,c,h,i,x,d) \ | ||
11 | nouveau_disp_create_((p), (e), (c), (h), (i), (x), \ | ||
12 | sizeof(**d), (void **)d) | ||
13 | #define nouveau_disp_destroy(d) ({ \ | ||
14 | struct nouveau_disp *disp = (d); \ | ||
15 | _nouveau_disp_dtor(nv_object(disp)); \ | ||
16 | }) | ||
17 | #define nouveau_disp_init(d) ({ \ | ||
18 | struct nouveau_disp *disp = (d); \ | ||
19 | _nouveau_disp_init(nv_object(disp)); \ | ||
20 | }) | ||
21 | #define nouveau_disp_fini(d,s) ({ \ | ||
22 | struct nouveau_disp *disp = (d); \ | ||
23 | _nouveau_disp_fini(nv_object(disp), (s)); \ | ||
24 | }) | ||
25 | |||
26 | int nouveau_disp_create_(struct nouveau_object *, struct nouveau_object *, | ||
27 | struct nouveau_oclass *, int heads, | ||
28 | const char *, const char *, int, void **); | ||
29 | void _nouveau_disp_dtor(struct nouveau_object *); | ||
30 | int _nouveau_disp_init(struct nouveau_object *); | ||
31 | int _nouveau_disp_fini(struct nouveau_object *, bool); | ||
32 | |||
10 | #endif | 33 | #endif |
diff --git a/drivers/gpu/drm/nouveau/core/include/engine/disp.h b/drivers/gpu/drm/nouveau/core/include/engine/disp.h index fd0c68804de3..1089faec373f 100644 --- a/drivers/gpu/drm/nouveau/core/include/engine/disp.h +++ b/drivers/gpu/drm/nouveau/core/include/engine/disp.h | |||
@@ -17,25 +17,6 @@ nouveau_disp(void *obj) | |||
17 | return (void *)nv_device(obj)->subdev[NVDEV_ENGINE_DISP]; | 17 | return (void *)nv_device(obj)->subdev[NVDEV_ENGINE_DISP]; |
18 | } | 18 | } |
19 | 19 | ||
20 | #define nouveau_disp_create(p,e,c,h,i,x,d) \ | ||
21 | nouveau_disp_create_((p), (e), (c), (h), (i), (x), \ | ||
22 | sizeof(**d), (void **)d) | ||
23 | #define nouveau_disp_destroy(d) ({ \ | ||
24 | struct nouveau_disp *disp = (d); \ | ||
25 | _nouveau_disp_dtor(nv_object(disp)); \ | ||
26 | }) | ||
27 | #define nouveau_disp_init(d) \ | ||
28 | nouveau_engine_init(&(d)->base) | ||
29 | #define nouveau_disp_fini(d,s) \ | ||
30 | nouveau_engine_fini(&(d)->base, (s)) | ||
31 | |||
32 | int nouveau_disp_create_(struct nouveau_object *, struct nouveau_object *, | ||
33 | struct nouveau_oclass *, int heads, | ||
34 | const char *, const char *, int, void **); | ||
35 | void _nouveau_disp_dtor(struct nouveau_object *); | ||
36 | #define _nouveau_disp_init _nouveau_engine_init | ||
37 | #define _nouveau_disp_fini _nouveau_engine_fini | ||
38 | |||
39 | extern struct nouveau_oclass *nv04_disp_oclass; | 20 | extern struct nouveau_oclass *nv04_disp_oclass; |
40 | extern struct nouveau_oclass *nv50_disp_oclass; | 21 | extern struct nouveau_oclass *nv50_disp_oclass; |
41 | extern struct nouveau_oclass *nv84_disp_oclass; | 22 | extern struct nouveau_oclass *nv84_disp_oclass; |