105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/****************************************************************************
205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ****************************************************************************
305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   This header was automatically generated from a Linux kernel header
505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   of the same name, to make information necessary for userspace to
605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   call into the kernel available to libc.  It contains only constants,
705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   structures, and macros generated from the original header, and thus,
805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   contains no copyrightable information.
905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
1005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   To edit the content of this header, modify the corresponding
1105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   source file (e.g. under external/kernel-headers/original/) then
1205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   run bionic/libc/kernel/tools/update_all.py
1305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
1405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   Any manual change here will be lost the next time this script will
1505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***   be run. You've been warned!
1605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ***
1705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ****************************************************************************
1805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris ****************************************************************************/
1905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#ifndef __AMDGPU_DRM_H__
2005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define __AMDGPU_DRM_H__
2105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#include "drm.h"
2205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_GEM_CREATE 0x00
2305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
2405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_GEM_MMAP 0x01
2505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_CTX 0x02
2605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_BO_LIST 0x03
2705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_CS 0x04
2805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
2905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_INFO 0x05
3005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_GEM_METADATA 0x06
3105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_GEM_WAIT_IDLE 0x07
3205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_GEM_VA 0x08
3305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
3405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_WAIT_CS 0x09
3505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_GEM_OP 0x10
3605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_AMDGPU_GEM_USERPTR 0x11
3705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
3805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
3905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
4005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx)
4105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list)
4205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs)
4305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
4405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info)
4505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata)
4605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle)
4705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va)
4805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
4905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs)
5005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op)
5105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr)
5205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_DOMAIN_CPU 0x1
5305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
5405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_DOMAIN_GTT 0x2
5505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_DOMAIN_VRAM 0x4
5605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_DOMAIN_GDS 0x8
5705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_DOMAIN_GWS 0x10
5805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
5905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_DOMAIN_OA 0x20
6005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
6105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1)
6205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2)
6305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
6405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_create_in {
6505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t bo_size;
6605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t alignment;
6705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t domains;
6805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
6905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t domain_flags;
7005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
7105d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_create_out {
7205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
7305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
7405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
7505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
7605d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_gem_create {
7705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_gem_create_in in;
7805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
7905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_gem_create_out out;
8005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
8105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_BO_LIST_OP_CREATE 0
8205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_BO_LIST_OP_DESTROY 1
8305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
8405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_BO_LIST_OP_UPDATE 2
8505d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_bo_list_in {
8605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t operation;
8705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t list_handle;
8805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
8905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t bo_number;
9005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t bo_info_size;
9105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t bo_info_ptr;
9205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
9305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
9405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_bo_list_entry {
9505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t bo_handle;
9605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t bo_priority;
9705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
9805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
9905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_bo_list_out {
10005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t list_handle;
10105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
10205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
10305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
10405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_bo_list {
10505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_bo_list_in in;
10605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_bo_list_out out;
10705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
10805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
10905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CTX_OP_ALLOC_CTX 1
11005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CTX_OP_FREE_CTX 2
11105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CTX_OP_QUERY_STATE 3
11205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CTX_NO_RESET 0
11305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
11405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CTX_GUILTY_RESET 1
11505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CTX_INNOCENT_RESET 2
11605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CTX_UNKNOWN_RESET 3
11705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_ctx_in {
11805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
11905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t op;
12005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t flags;
12105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ctx_id;
12205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
12305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
12405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
12505d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_ctx_out {
12605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct {
12705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint32_t ctx_id;
12805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
12905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint32_t _pad;
13005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  } alloc;
13105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct {
13205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint64_t flags;
13305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
13405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint32_t hangs;
13505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint32_t reset_status;
13605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  } state;
13705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
13805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
13905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_ctx {
14005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_ctx_in in;
14105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  union drm_amdgpu_ctx_out out;
14205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
14305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
14405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_USERPTR_READONLY (1 << 0)
14505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1)
14605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2)
14705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_USERPTR_REGISTER (1 << 3)
14805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
14905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_userptr {
15005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t addr;
15105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t size;
15205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t flags;
15305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
15405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
15505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
15605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_ARRAY_MODE_SHIFT 0
15705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_ARRAY_MODE_MASK 0xf
15805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
15905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4
16005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f
16105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_TILE_SPLIT_SHIFT 9
16205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_TILE_SPLIT_MASK 0x7
16305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
16405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12
16505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7
16605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_BANK_WIDTH_SHIFT 15
16705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_BANK_WIDTH_MASK 0x3
16805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
16905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17
17005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3
17105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19
17205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3
17305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
17405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_NUM_BANKS_SHIFT 21
17505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_NUM_BANKS_MASK 0x3
17605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_SET(field,value) (((value) & AMDGPU_TILING_ ##field ##_MASK) << AMDGPU_TILING_ ##field ##_SHIFT)
17705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_TILING_GET(value,field) (((value) >> AMDGPU_TILING_ ##field ##_SHIFT) & AMDGPU_TILING_ ##field ##_MASK)
17805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
17905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_METADATA_OP_SET_METADATA 1
18005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_METADATA_OP_GET_METADATA 2
18105d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_metadata {
18205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
18305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
18405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t op;
18505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct {
18605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint64_t flags;
18705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint64_t tiling_info;
18805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
18905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint32_t data_size_bytes;
19005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    uint32_t data[64];
19105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  } data;
19205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
19305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
19405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_mmap_in {
19505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
19605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
19705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
19805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
19905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_mmap_out {
20005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t addr_ptr;
20105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
20205d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_gem_mmap {
20305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
20405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_gem_mmap_in in;
20505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_gem_mmap_out out;
20605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
20705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_wait_idle_in {
20805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
20905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
21005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t flags;
21105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t timeout;
21205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
21305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
21405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_wait_idle_out {
21505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t status;
21605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t domain;
21705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
21805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
21905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_gem_wait_idle {
22005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_gem_wait_idle_in in;
22105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_gem_wait_idle_out out;
22205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
22305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
22405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_wait_cs_in {
22505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t handle;
22605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t timeout;
22705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ip_type;
22805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
22905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ip_instance;
23005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ring;
23105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ctx_id;
23205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
23305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
23405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_wait_cs_out {
23505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t status;
23605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
23705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_wait_cs {
23805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
23905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_wait_cs_in in;
24005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_wait_cs_out out;
24105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
24205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0
24305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_GEM_OP_SET_PLACEMENT 1
24505d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_op {
24605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
24705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t op;
24805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t value;
25005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
25105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VA_OP_MAP 1
25205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VA_OP_UNMAP 2
25305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
25405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VM_DELAY_UPDATE (1 << 0)
25505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VM_PAGE_READABLE (1 << 1)
25605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)
25705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)
25805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
25905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_gem_va {
26005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
26105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
26205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t operation;
26305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
26405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t flags;
26505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t va_address;
26605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t offset_in_bo;
26705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t map_size;
26805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
26905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
27005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_HW_IP_GFX 0
27105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_HW_IP_COMPUTE 1
27205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_HW_IP_DMA 2
27305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
27405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_HW_IP_UVD 3
27505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_HW_IP_VCE 4
27605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_HW_IP_NUM 5
27705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1
27805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
27905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CHUNK_ID_IB 0x01
28005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CHUNK_ID_FENCE 0x02
28105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03
28205d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_cs_chunk {
28305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
28405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t chunk_id;
28505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t length_dw;
28605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t chunk_data;
28705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
28805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
28905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_cs_in {
29005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ctx_id;
29105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t bo_list_handle;
29205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t num_chunks;
29305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
29505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t chunks;
29605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
29705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_cs_out {
29805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t handle;
30005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
30105d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisunion drm_amdgpu_cs {
30205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_cs_in in;
30305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
30405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_amdgpu_cs_out out;
30505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
30605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_IB_FLAG_CE (1 << 0)
30705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_IB_FLAG_PREAMBLE (1 << 1)
30805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
30905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_cs_chunk_ib {
31005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
31105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t flags;
31205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t va_start;
31305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
31405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ib_bytes;
31505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ip_type;
31605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ip_instance;
31705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ring;
31805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
31905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
32005d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_cs_chunk_dep {
32105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ip_type;
32205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ip_instance;
32305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
32405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ring;
32505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ctx_id;
32605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t handle;
32705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
32805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
32905d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_cs_chunk_fence {
33005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t handle;
33105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t offset;
33205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
33305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
33405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_cs_chunk_data {
33505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  union {
33605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    struct drm_amdgpu_cs_chunk_ib ib_data;
33705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    struct drm_amdgpu_cs_chunk_fence fence_data;
33805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
33905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  };
34005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
34105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_IDS_FLAGS_FUSION 0x1
34205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_ACCEL_WORKING 0x00
34305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_CRTC_FROM_ID 0x01
34505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_HW_IP_INFO 0x02
34605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_HW_IP_COUNT 0x03
34705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_TIMESTAMP 0x05
34805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_VERSION 0x0e
35005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_VCE 0x1
35105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_UVD 0x2
35205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_GMC 0x03
35305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
35405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_GFX_ME 0x04
35505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_GFX_PFP 0x05
35605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_GFX_CE 0x06
35705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_GFX_RLC 0x07
35805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
35905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_GFX_MEC 0x08
36005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_SMC 0x0a
36105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_FW_SDMA 0x0b
36205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f
36305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
36405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_VRAM_USAGE 0x10
36505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_GTT_USAGE 0x11
36605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_GDS_CONFIG 0x13
36705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_VRAM_GTT 0x14
36805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
36905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_READ_MMR_REG 0x15
37005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_DEV_INFO 0x16
37105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17
37205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0
37305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
37405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff
37505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8
37605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff
37705d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_info {
37805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
37905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t return_pointer;
38005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t return_size;
38105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t query;
38205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  union {
38305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
38405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    struct {
38505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t id;
38605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t _pad;
38705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    } mode_crtc;
38805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
38905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    struct {
39005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t type;
39105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t ip_instance;
39205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    } query_hw_ip;
39305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    struct {
39505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t dword_offset;
39605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t count;
39705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t instance;
39805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t flags;
40005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    } read_mmr_reg;
40105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    struct {
40205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t fw_type;
40305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
40405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t ip_instance;
40505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t index;
40605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris      uint32_t _pad;
40705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris    } query_fw;
40805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
40905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  };
41005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
41105d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_info_gds {
41205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gds_gfx_partition_size;
41305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
41405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t compute_partition_size;
41505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gds_total_size;
41605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gws_per_gfx_partition;
41705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gws_per_compute_partition;
41805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
41905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t oa_per_gfx_partition;
42005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t oa_per_compute_partition;
42105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
42205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
42305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
42405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_info_vram_gtt {
42505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t vram_size;
42605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t vram_cpu_accessible_size;
42705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t gtt_size;
42805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
42905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
43005d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_info_firmware {
43105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ver;
43205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t feature;
43305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
43405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
43505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_UNKNOWN 0
43605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_GDDR1 1
43705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_DDR2 2
43805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
43905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_GDDR3 3
44005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_GDDR4 4
44105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_GDDR5 5
44205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_HBM 6
44305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_VRAM_TYPE_DDR3 7
44505d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_info_device {
44605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t device_id;
44705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t chip_rev;
44805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t external_rev;
45005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pci_rev;
45105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t family;
45205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t num_shader_engines;
45305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
45405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t num_shader_arrays_per_engine;
45505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gpu_counter_freq;
45605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t max_engine_clock;
45705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t max_memory_clock;
45805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
45905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t cu_active_number;
46005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t cu_ao_mask;
46105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t cu_bitmap[4][4];
46205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t enabled_rb_pipes_mask;
46305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
46405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t num_rb_pipes;
46505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t num_hw_gfx_contexts;
46605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
46705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t ids_flags;
46805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
46905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t virtual_address_offset;
47005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t virtual_address_max;
47105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t virtual_address_alignment;
47205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t pte_fragment_size;
47305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
47405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t gart_page_size;
47505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ce_ram_size;
47605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t vram_type;
47705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t vram_bit_width;
47805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
47905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t vce_harvest_config;
48005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
48105d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisstruct drm_amdgpu_info_hw_ip {
48205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t hw_ip_version_major;
48305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
48405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t hw_ip_version_minor;
48505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint64_t capabilities_flags;
48605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ib_start_alignment;
48705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t ib_size_alignment;
48805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
48905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t available_rings;
49005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  uint32_t _pad;
49105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
49205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_FAMILY_UNKNOWN 0
49305d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_FAMILY_CI 120
49505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_FAMILY_KV 125
49605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_FAMILY_VI 130
49705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define AMDGPU_FAMILY_CZ 135
49805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#endif
500