diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-11-15 20:50:09 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-03 00:11:59 -0500 |
commit | 7f4a195fcbd8b16f25f1de7f1419414d7505daa5 (patch) | |
tree | d54405e52a42c41f6e88ff3ae3685afe2aa57f34 /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | 6d6c5a157af45a5bd50ab913b07d826811a9ea0a (diff) |
drm/nouveau: tidy up and extend dma object creation interfaces
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index d76d2c09049d..a52b1da32031 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -886,12 +886,14 @@ extern int nouveau_gpuobj_new_fake(struct drm_device *, u32 pinst, u64 vinst, | |||
886 | extern int nouveau_gpuobj_dma_new(struct nouveau_channel *, int class, | 886 | extern int nouveau_gpuobj_dma_new(struct nouveau_channel *, int class, |
887 | uint64_t offset, uint64_t size, int access, | 887 | uint64_t offset, uint64_t size, int access, |
888 | int target, struct nouveau_gpuobj **); | 888 | int target, struct nouveau_gpuobj **); |
889 | extern int nouveau_gpuobj_gart_dma_new(struct nouveau_channel *, | ||
890 | uint64_t offset, uint64_t size, | ||
891 | int access, struct nouveau_gpuobj **, | ||
892 | uint32_t *o_ret); | ||
893 | extern int nouveau_gpuobj_gr_new(struct nouveau_channel *, int class, | 889 | extern int nouveau_gpuobj_gr_new(struct nouveau_channel *, int class, |
894 | struct nouveau_gpuobj **); | 890 | struct nouveau_gpuobj **); |
891 | extern int nv50_gpuobj_dma_new(struct nouveau_channel *, int class, u64 base, | ||
892 | u64 size, int target, int access, u32 type, | ||
893 | u32 comp, struct nouveau_gpuobj **pobj); | ||
894 | extern void nv50_gpuobj_dma_init(struct nouveau_gpuobj *, u32 offset, | ||
895 | int class, u64 base, u64 size, int target, | ||
896 | int access, u32 type, u32 comp); | ||
895 | extern int nouveau_ioctl_grobj_alloc(struct drm_device *, void *data, | 897 | extern int nouveau_ioctl_grobj_alloc(struct drm_device *, void *data, |
896 | struct drm_file *); | 898 | struct drm_file *); |
897 | extern int nouveau_ioctl_gpuobj_free(struct drm_device *, void *data, | 899 | extern int nouveau_ioctl_gpuobj_free(struct drm_device *, void *data, |
@@ -1545,6 +1547,22 @@ nv_match_device(struct drm_device *dev, unsigned device, | |||
1545 | dev->pdev->subsystem_device == sub_device; | 1547 | dev->pdev->subsystem_device == sub_device; |
1546 | } | 1548 | } |
1547 | 1549 | ||
1550 | /* memory type/access flags, do not match hardware values */ | ||
1551 | #define NV_MEM_ACCESS_RO 1 | ||
1552 | #define NV_MEM_ACCESS_WO 2 | ||
1553 | #define NV_MEM_ACCESS_RW (NV_MEM_ACCESS_RO | NV_MEM_ACCESS_WO) | ||
1554 | #define NV_MEM_ACCESS_VM 4 | ||
1555 | |||
1556 | #define NV_MEM_TARGET_VRAM 0 | ||
1557 | #define NV_MEM_TARGET_PCI 1 | ||
1558 | #define NV_MEM_TARGET_PCI_NOSNOOP 2 | ||
1559 | #define NV_MEM_TARGET_VM 3 | ||
1560 | #define NV_MEM_TARGET_GART 4 | ||
1561 | |||
1562 | #define NV_MEM_TYPE_VM 0x7f | ||
1563 | #define NV_MEM_COMP_VM 0x03 | ||
1564 | |||
1565 | /* NV_SW object class */ | ||
1548 | #define NV_SW 0x0000506e | 1566 | #define NV_SW 0x0000506e |
1549 | #define NV_SW_DMA_SEMAPHORE 0x00000060 | 1567 | #define NV_SW_DMA_SEMAPHORE 0x00000060 |
1550 | #define NV_SW_SEMAPHORE_OFFSET 0x00000064 | 1568 | #define NV_SW_SEMAPHORE_OFFSET 0x00000064 |