]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/gpu/drm/nouveau/core/subdev/pwr/priv.h
ddc614f9a99de551c42b47bc593d35d1de2d12c9
[mirror_ubuntu-artful-kernel.git] / drivers / gpu / drm / nouveau / core / subdev / pwr / priv.h
1 #ifndef __NVKM_PWR_PRIV_H__
2 #define __NVKM_PWR_PRIV_H__
3
4 #include <subdev/pwr.h>
5 #include <subdev/pwr/fuc/os.h>
6
7 #define nouveau_pwr_create(p, e, o, d) \
8 nouveau_pwr_create_((p), (e), (o), sizeof(**d), (void **)d)
9 #define nouveau_pwr_destroy(p) \
10 nouveau_subdev_destroy(&(p)->base)
11 #define nouveau_pwr_init(p) ({ \
12 struct nouveau_pwr *_ppwr = (p); \
13 _nouveau_pwr_init(nv_object(_ppwr)); \
14 })
15 #define nouveau_pwr_fini(p,s) ({ \
16 struct nouveau_pwr *_ppwr = (p); \
17 _nouveau_pwr_fini(nv_object(_ppwr), (s)); \
18 })
19
20 int nouveau_pwr_create_(struct nouveau_object *, struct nouveau_object *,
21 struct nouveau_oclass *, int, void **);
22
23 int _nouveau_pwr_ctor(struct nouveau_object *, struct nouveau_object *,
24 struct nouveau_oclass *, void *, u32,
25 struct nouveau_object **);
26 #define _nouveau_pwr_dtor _nouveau_subdev_dtor
27 int _nouveau_pwr_init(struct nouveau_object *);
28 int _nouveau_pwr_fini(struct nouveau_object *, bool);
29
30 struct nvkm_pwr_impl {
31 struct nouveau_oclass base;
32 struct {
33 u32 *data;
34 u32 size;
35 } code;
36 struct {
37 u32 *data;
38 u32 size;
39 } data;
40 };
41
42 #endif