Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
engctx.h
Go to the documentation of this file.
1 #ifndef __NOUVEAU_ENGCTX_H__
2 #define __NOUVEAU_ENGCTX_H__
3 
4 #include <core/object.h>
5 #include <core/gpuobj.h>
6 
7 #include <subdev/vm.h>
8 
9 #define NV_ENGCTX_(eng,var) (NV_ENGCTX_CLASS | ((var) << 8) | (eng))
10 #define NV_ENGCTX(name,var) NV_ENGCTX_(NVDEV_ENGINE_##name, (var))
11 
14  struct nouveau_vma vma;
15  struct list_head head;
16  unsigned long save;
18 };
19 
20 static inline struct nouveau_engctx *
21 nv_engctx(void *obj)
22 {
23 #if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
25  nv_assert("BAD CAST -> NvEngCtx, %08x", nv_hclass(obj));
26 #endif
27  return obj;
28 }
29 
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)
33 
35  struct nouveau_oclass *, struct nouveau_object *,
37  int length, void **data);
40 int nouveau_engctx_fini(struct nouveau_engctx *, bool suspend);
41 
44 int _nouveau_engctx_fini(struct nouveau_object *, bool suspend);
45 #define _nouveau_engctx_rd32 _nouveau_gpuobj_rd32
46 #define _nouveau_engctx_wr32 _nouveau_gpuobj_wr32
47 
49 void nouveau_engctx_put(struct nouveau_object *);
50 
51 #endif