HID: picolcd: sanity check report size in raw_event() callback
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / nouveau / core / include / engine / dmaobj.h
1 #ifndef __NOUVEAU_DMAOBJ_H__
2 #define __NOUVEAU_DMAOBJ_H__
3
4 #include <core/object.h>
5 #include <core/engine.h>
6
7 struct nouveau_gpuobj;
8
9 struct nouveau_dmaobj {
10         struct nouveau_object base;
11         u32 target;
12         u32 access;
13         u64 start;
14         u64 limit;
15         u32 conf0;
16 };
17
18 struct nouveau_dmaeng {
19         struct nouveau_engine base;
20
21         /* creates a "physical" dma object from a struct nouveau_dmaobj */
22         int (*bind)(struct nouveau_dmaeng *dmaeng,
23                     struct nouveau_object *parent,
24                     struct nouveau_dmaobj *dmaobj,
25                     struct nouveau_gpuobj **);
26 };
27
28 #define nouveau_dmaeng_create(p,e,c,d)                                         \
29         nouveau_engine_create((p), (e), (c), true, "DMAOBJ", "dmaobj", (d))
30 #define nouveau_dmaeng_destroy(p)                                              \
31         nouveau_engine_destroy(&(p)->base)
32 #define nouveau_dmaeng_init(p)                                                 \
33         nouveau_engine_init(&(p)->base)
34 #define nouveau_dmaeng_fini(p,s)                                               \
35         nouveau_engine_fini(&(p)->base, (s))
36
37 #define _nouveau_dmaeng_dtor _nouveau_engine_dtor
38 #define _nouveau_dmaeng_init _nouveau_engine_init
39 #define _nouveau_dmaeng_fini _nouveau_engine_fini
40
41 extern struct nouveau_oclass nv04_dmaeng_oclass;
42 extern struct nouveau_oclass nv50_dmaeng_oclass;
43 extern struct nouveau_oclass nvc0_dmaeng_oclass;
44 extern struct nouveau_oclass nvd0_dmaeng_oclass;
45
46 extern struct nouveau_oclass nouveau_dmaobj_sclass[];
47
48 #endif