1 #ifndef __NOUVEAU_ENGCTX_H__
2 #define __NOUVEAU_ENGCTX_H__
4 #include <core/object.h>
5 #include <core/gpuobj.h>
9 #define NV_ENGCTX_(eng,var) (NV_ENGCTX_CLASS | ((var) << 8) | (eng))
10 #define NV_ENGCTX(name,var) NV_ENGCTX_(NVDEV_ENGINE_##name, (var))
12 struct nouveau_engctx
{
13 struct nouveau_gpuobj gpuobj
;
14 struct nouveau_vma vma
;
15 struct list_head head
;
20 static inline struct nouveau_engctx
*
23 #if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
24 if (unlikely(!nv_iclass(obj
, NV_ENGCTX_CLASS
)))
25 nv_assert("BAD CAST -> NvEngCtx, %08x", nv_hclass(obj
));
30 #define nouveau_engctx_create(p,e,c,g,s,a,f,d) \
31 nouveau_engctx_create_((p), (e), (c), (g), (s), (a), (f), \
32 sizeof(**d), (void **)d)
34 int nouveau_engctx_create_(struct nouveau_object
*, struct nouveau_object
*,
35 struct nouveau_oclass
*, struct nouveau_object
*,
36 u32 size
, u32 align
, u32 flags
,
37 int length
, void **data
);
38 void nouveau_engctx_destroy(struct nouveau_engctx
*);
39 int nouveau_engctx_init(struct nouveau_engctx
*);
40 int nouveau_engctx_fini(struct nouveau_engctx
*, bool suspend
);
42 int _nouveau_engctx_ctor(struct nouveau_object
*, struct nouveau_object
*,
43 struct nouveau_oclass
*, void *, u32
,
44 struct nouveau_object
**);
45 void _nouveau_engctx_dtor(struct nouveau_object
*);
46 int _nouveau_engctx_init(struct nouveau_object
*);
47 int _nouveau_engctx_fini(struct nouveau_object
*, bool suspend
);
48 #define _nouveau_engctx_rd32 _nouveau_gpuobj_rd32
49 #define _nouveau_engctx_wr32 _nouveau_gpuobj_wr32
51 struct nouveau_object
*nouveau_engctx_get(struct nouveau_engine
*, u64 addr
);
52 void nouveau_engctx_put(struct nouveau_object
*);
This page took 0.034313 seconds and 5 git commands to generate.