aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Glisse2013-04-08 12:34:54 -0500
committerJerome Glisse2013-04-12 08:46:20 -0500
commit309cb649a380d25a0eced4f3a0edb55d6b577099 (patch)
tree222dfaaf3de7383d6ba8364c8600694d4bd7692f /include/drm/radeon_drm.h
parentb7bb9e929786eb8bae86cf50f54dcb94bfa7ad46 (diff)
downloadexternal-libgbm-309cb649a380d25a0eced4f3a0edb55d6b577099.tar.gz
external-libgbm-309cb649a380d25a0eced4f3a0edb55d6b577099.tar.xz
external-libgbm-309cb649a380d25a0eced4f3a0edb55d6b577099.zip
radeon: update radeon_drm.h to kernel last API additions v2
v2: sync with radeon-next tree for 3.10 http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.10-wip Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'include/drm/radeon_drm.h')
-rw-r--r--include/drm/radeon_drm.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index 00d66b32..86cef15d 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -509,6 +509,7 @@ typedef struct {
509#define DRM_RADEON_GEM_SET_TILING 0x28 509#define DRM_RADEON_GEM_SET_TILING 0x28
510#define DRM_RADEON_GEM_GET_TILING 0x29 510#define DRM_RADEON_GEM_GET_TILING 0x29
511#define DRM_RADEON_GEM_BUSY 0x2a 511#define DRM_RADEON_GEM_BUSY 0x2a
512#define DRM_RADEON_GEM_VA 0x2b
512 513
513#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) 514#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t)
514#define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) 515#define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START)
@@ -550,6 +551,7 @@ typedef struct {
550#define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) 551#define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling)
551#define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) 552#define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling)
552#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) 553#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy)
554#define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va)
553 555
554typedef struct drm_radeon_init { 556typedef struct drm_radeon_init {
555 enum { 557 enum {
@@ -882,8 +884,43 @@ struct drm_radeon_gem_pwrite {
882 uint64_t data_ptr; 884 uint64_t data_ptr;
883}; 885};
884 886
887#define RADEON_VA_MAP 1
888#define RADEON_VA_UNMAP 2
889
890#define RADEON_VA_RESULT_OK 0
891#define RADEON_VA_RESULT_ERROR 1
892#define RADEON_VA_RESULT_VA_EXIST 2
893
894#define RADEON_VM_PAGE_VALID (1 << 0)
895#define RADEON_VM_PAGE_READABLE (1 << 1)
896#define RADEON_VM_PAGE_WRITEABLE (1 << 2)
897#define RADEON_VM_PAGE_SYSTEM (1 << 3)
898#define RADEON_VM_PAGE_SNOOPED (1 << 4)
899
900struct drm_radeon_gem_va {
901 uint32_t handle;
902 uint32_t operation;
903 uint32_t vm_id;
904 uint32_t flags;
905 uint64_t offset;
906};
907
885#define RADEON_CHUNK_ID_RELOCS 0x01 908#define RADEON_CHUNK_ID_RELOCS 0x01
886#define RADEON_CHUNK_ID_IB 0x02 909#define RADEON_CHUNK_ID_IB 0x02
910#define RADEON_CHUNK_ID_FLAGS 0x03
911#define RADEON_CHUNK_ID_CONST_IB 0x04
912
913/* The first dword of RADEON_CHUNK_ID_FLAGS is a uint32 of these flags: */
914#define RADEON_CS_KEEP_TILING_FLAGS 0x01
915#define RADEON_CS_USE_VM 0x02
916#define RADEON_CS_END_OF_FRAME 0x04 /* a hint from userspace which CS is the last one */
917/* The second dword of RADEON_CHUNK_ID_FLAGS is a uint32 that sets the ring type */
918#define RADEON_CS_RING_GFX 0
919#define RADEON_CS_RING_COMPUTE 1
920#define RADEON_CS_RING_DMA 2
921#define RADEON_CS_RING_UVD 3
922/* The third dword of RADEON_CHUNK_ID_FLAGS is a sint32 that sets the priority */
923/* 0 = normal, + = higher priority, - = lower priority */
887 924
888struct drm_radeon_cs_chunk { 925struct drm_radeon_cs_chunk {
889 uint32_t chunk_id; 926 uint32_t chunk_id;
@@ -891,6 +928,8 @@ struct drm_radeon_cs_chunk {
891 uint64_t chunk_data; 928 uint64_t chunk_data;
892}; 929};
893 930
931/* drm_radeon_cs_reloc.flags */
932
894struct drm_radeon_cs_reloc { 933struct drm_radeon_cs_reloc {
895 uint32_t handle; 934 uint32_t handle;
896 uint32_t read_domains; 935 uint32_t read_domains;
@@ -916,6 +955,30 @@ struct drm_radeon_cs {
916#define RADEON_INFO_ACCEL_WORKING2 0x05 955#define RADEON_INFO_ACCEL_WORKING2 0x05
917#define RADEON_INFO_TILING_CONFIG 0x06 956#define RADEON_INFO_TILING_CONFIG 0x06
918#define RADEON_INFO_WANT_HYPERZ 0x07 957#define RADEON_INFO_WANT_HYPERZ 0x07
958#define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */
959#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */
960#define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */
961#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */
962#define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */
963#define RADEON_INFO_BACKEND_MAP 0x0d /* pipe to backend map, needed by mesa */
964/* virtual address start, va < start are reserved by the kernel */
965#define RADEON_INFO_VA_START 0x0e
966/* maximum size of ib using the virtual memory cs */
967#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f
968/* max pipes - needed for compute shaders */
969#define RADEON_INFO_MAX_PIPES 0x10
970/* timestamp for GL_ARB_timer_query (OpenGL), returns the current GPU clock */
971#define RADEON_INFO_TIMESTAMP 0x11
972/* max shader engines (SE) - needed for geometry shaders, etc. */
973#define RADEON_INFO_MAX_SE 0x12
974/* max SH per SE */
975#define RADEON_INFO_MAX_SH_PER_SE 0x13
976/* fast fb access is enabled */
977#define RADEON_INFO_FASTFB_WORKING 0x14
978/* query if a RADEON_CS_RING_* submission is supported */
979#define RADEON_INFO_RING_WORKING 0x15
980/* SI tile mode array */
981#define RADEON_INFO_SI_TILE_MODE_ARRAY 0x16
919 982
920struct drm_radeon_info { 983struct drm_radeon_info {
921 uint32_t request; 984 uint32_t request;
@@ -923,4 +986,22 @@ struct drm_radeon_info {
923 uint64_t value; 986 uint64_t value;
924}; 987};
925 988
989/* Those correspond to the tile index to use, this is to explicitly state
990 * the API that is implicitly defined by the tile mode array.
991 */
992#define SI_TILE_MODE_COLOR_LINEAR_ALIGNED 8
993#define SI_TILE_MODE_COLOR_1D 13
994#define SI_TILE_MODE_COLOR_1D_SCANOUT 9
995#define SI_TILE_MODE_COLOR_2D_8BPP 14
996#define SI_TILE_MODE_COLOR_2D_16BPP 15
997#define SI_TILE_MODE_COLOR_2D_32BPP 16
998#define SI_TILE_MODE_COLOR_2D_64BPP 17
999#define SI_TILE_MODE_COLOR_2D_SCANOUT_16BPP 11
1000#define SI_TILE_MODE_COLOR_2D_SCANOUT_32BPP 12
1001#define SI_TILE_MODE_DEPTH_STENCIL_1D 4
1002#define SI_TILE_MODE_DEPTH_STENCIL_2D 0
1003#define SI_TILE_MODE_DEPTH_STENCIL_2D_2AA 3
1004#define SI_TILE_MODE_DEPTH_STENCIL_2D_4AA 3
1005#define SI_TILE_MODE_DEPTH_STENCIL_2D_8AA 2
1006
926#endif 1007#endif