diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-07-06 12:14:00 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 13:12:44 +1000 |
commit | 9458029940ffc64bca0c5a30ea626c377205842e (patch) | |
tree | a677d326bca8e031d47b859006f9c6e71de225ad /drivers/gpu/drm/nouveau/nouveau_drm.h | |
parent | 9274f4a9ba7e70d1770e237fca16d52f27f0c728 (diff) | |
download | lwn-9458029940ffc64bca0c5a30ea626c377205842e.tar.gz lwn-9458029940ffc64bca0c5a30ea626c377205842e.zip |
drm/nouveau: implement module init functions in nouveau_drm.c
These currently just call the existing ones in nouveau_drv.c, but will be
extended in upcoming commits. This needed to be separated from the current
code as there will be some header clashes until things are ported.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h new file mode 100644 index 000000000000..ef5500f56864 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h @@ -0,0 +1,47 @@ +#ifndef __NOUVEAU_DRMCLI_H__ +#define __NOUVEAU_DRMCLI_H__ + +#include <core/client.h> + +#include <drmP.h> +#include <drm/nouveau_drm.h> + +enum nouveau_drm_handle { + NVDRM_CLIENT = 0xffffffff, + NVDRM_DEVICE = 0xdddddddd, +}; + +struct nouveau_cli { + struct nouveau_client base; + struct list_head head; + struct mutex mutex; +}; + +struct nouveau_drm { + struct nouveau_cli client; + struct drm_device *dev; + + struct nouveau_object *device; + struct list_head clients; +}; + +int nouveau_drm_suspend(struct pci_dev *, pm_message_t); +int nouveau_drm_resume(struct pci_dev *); + +#define NV_PRINTK(level, code, drm, fmt, args...) \ + printk(level "nouveau " code "[ DRM][%s] " fmt, \ + pci_name((drm)->dev->pdev), ##args) +#define NV_FATAL(drm, fmt, args...) \ + NV_PRINTK(KERN_CRIT, "!", (drm), fmt, ##args) +#define NV_ERROR(drm, fmt, args...) \ + NV_PRINTK(KERN_ERR, "E", (drm), fmt, ##args) +#define NV_WARN(drm, fmt, args...) \ + NV_PRINTK(KERN_WARNING, "W", (drm), fmt, ##args) +#define NV_INFO(drm, fmt, args...) \ + NV_PRINTK(KERN_INFO, " ", (drm), fmt, ##args) +#define NV_DEBUG(drm, fmt, args...) do { \ + if (drm_debug & DRM_UT_DRIVER) \ + NV_PRINTK(KERN_DEBUG, "D", drm, fmt, ##args); \ +} while (0) + +#endif |