diff options
author | Dave Airlie <airlied@redhat.com> | 2014-08-25 19:05:14 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-08-25 19:05:14 -0400 |
commit | 484048db6b4890bc433aac7f5e32fdcf1b2b4786 (patch) | |
tree | c6be2f9cbe71d6732975c987e1c814c0298b0b65 /include/uapi/drm | |
parent | d5a0f2e7be20d29c5a23fdbc65c1f8307690413c (diff) | |
parent | bd645e4314b95b21146aa6ff893d783de20c4e60 (diff) |
Merge branch 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux into drm-next
radeon userptr support.
* 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux:
drm/radeon: allow userptr write access under certain conditions
drm/radeon: add userptr flag to register MMU notifier v3
drm/radeon: add userptr flag to directly validate the BO to GTT
drm/radeon: add userptr flag to limit it to anonymous memory v2
drm/radeon: add userptr support v8
Conflicts:
drivers/gpu/drm/radeon/radeon_prime.c
Diffstat (limited to 'include/uapi/drm')
-rw-r--r-- | include/uapi/drm/radeon_drm.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h index fea6099608ef..375b6e656c54 100644 --- a/include/uapi/drm/radeon_drm.h +++ b/include/uapi/drm/radeon_drm.h | |||
@@ -511,6 +511,7 @@ typedef struct { | |||
511 | #define DRM_RADEON_GEM_BUSY 0x2a | 511 | #define DRM_RADEON_GEM_BUSY 0x2a |
512 | #define DRM_RADEON_GEM_VA 0x2b | 512 | #define DRM_RADEON_GEM_VA 0x2b |
513 | #define DRM_RADEON_GEM_OP 0x2c | 513 | #define DRM_RADEON_GEM_OP 0x2c |
514 | #define DRM_RADEON_GEM_USERPTR 0x2d | ||
514 | 515 | ||
515 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) | 516 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) |
516 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) | 517 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) |
@@ -554,6 +555,7 @@ typedef struct { | |||
554 | #define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) | 555 | #define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) |
555 | #define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va) | 556 | #define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va) |
556 | #define DRM_IOCTL_RADEON_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op) | 557 | #define DRM_IOCTL_RADEON_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op) |
558 | #define DRM_IOCTL_RADEON_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_USERPTR, struct drm_radeon_gem_userptr) | ||
557 | 559 | ||
558 | typedef struct drm_radeon_init { | 560 | typedef struct drm_radeon_init { |
559 | enum { | 561 | enum { |
@@ -808,6 +810,23 @@ struct drm_radeon_gem_create { | |||
808 | uint32_t flags; | 810 | uint32_t flags; |
809 | }; | 811 | }; |
810 | 812 | ||
813 | /* | ||
814 | * This is not a reliable API and you should expect it to fail for any | ||
815 | * number of reasons and have fallback path that do not use userptr to | ||
816 | * perform any operation. | ||
817 | */ | ||
818 | #define RADEON_GEM_USERPTR_READONLY (1 << 0) | ||
819 | #define RADEON_GEM_USERPTR_ANONONLY (1 << 1) | ||
820 | #define RADEON_GEM_USERPTR_VALIDATE (1 << 2) | ||
821 | #define RADEON_GEM_USERPTR_REGISTER (1 << 3) | ||
822 | |||
823 | struct drm_radeon_gem_userptr { | ||
824 | uint64_t addr; | ||
825 | uint64_t size; | ||
826 | uint32_t flags; | ||
827 | uint32_t handle; | ||
828 | }; | ||
829 | |||
811 | #define RADEON_TILING_MACRO 0x1 | 830 | #define RADEON_TILING_MACRO 0x1 |
812 | #define RADEON_TILING_MICRO 0x2 | 831 | #define RADEON_TILING_MICRO 0x2 |
813 | #define RADEON_TILING_SWAP_16BIT 0x4 | 832 | #define RADEON_TILING_SWAP_16BIT 0x4 |