Commit | Line | Data |
---|---|---|
94580299 BS |
1 | #ifndef __NOUVEAU_DRMCLI_H__ |
2 | #define __NOUVEAU_DRMCLI_H__ | |
3 | ||
4 | #include <core/client.h> | |
5 | ||
6 | #include <drmP.h> | |
7 | #include <drm/nouveau_drm.h> | |
8 | ||
9 | enum nouveau_drm_handle { | |
10 | NVDRM_CLIENT = 0xffffffff, | |
11 | NVDRM_DEVICE = 0xdddddddd, | |
12 | }; | |
13 | ||
14 | struct nouveau_cli { | |
15 | struct nouveau_client base; | |
16 | struct list_head head; | |
17 | struct mutex mutex; | |
18 | }; | |
19 | ||
20 | struct nouveau_drm { | |
21 | struct nouveau_cli client; | |
22 | struct drm_device *dev; | |
23 | ||
24 | struct nouveau_object *device; | |
25 | struct list_head clients; | |
cb75d97e BS |
26 | |
27 | struct { | |
28 | enum { | |
29 | UNKNOWN = 0, | |
30 | DISABLE = 1, | |
31 | ENABLED = 2 | |
32 | } stat; | |
33 | u32 base; | |
34 | u32 size; | |
35 | } agp; | |
94580299 BS |
36 | }; |
37 | ||
38 | int nouveau_drm_suspend(struct pci_dev *, pm_message_t); | |
39 | int nouveau_drm_resume(struct pci_dev *); | |
40 | ||
41 | #define NV_PRINTK(level, code, drm, fmt, args...) \ | |
42 | printk(level "nouveau " code "[ DRM][%s] " fmt, \ | |
43 | pci_name((drm)->dev->pdev), ##args) | |
44 | #define NV_FATAL(drm, fmt, args...) \ | |
45 | NV_PRINTK(KERN_CRIT, "!", (drm), fmt, ##args) | |
46 | #define NV_ERROR(drm, fmt, args...) \ | |
47 | NV_PRINTK(KERN_ERR, "E", (drm), fmt, ##args) | |
48 | #define NV_WARN(drm, fmt, args...) \ | |
49 | NV_PRINTK(KERN_WARNING, "W", (drm), fmt, ##args) | |
50 | #define NV_INFO(drm, fmt, args...) \ | |
51 | NV_PRINTK(KERN_INFO, " ", (drm), fmt, ##args) | |
52 | #define NV_DEBUG(drm, fmt, args...) do { \ | |
53 | if (drm_debug & DRM_UT_DRIVER) \ | |
54 | NV_PRINTK(KERN_DEBUG, "D", drm, fmt, ##args); \ | |
55 | } while (0) | |
56 | ||
57 | #endif |