1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099 |
- #ifndef __VMWGFX_DRM_H__
- #define __VMWGFX_DRM_H__
- #include "drm.h"
- #if defined(__cplusplus)
- extern "C" {
- #endif
- #define DRM_VMW_MAX_SURFACE_FACES 6
- #define DRM_VMW_MAX_MIP_LEVELS 24
- #define DRM_VMW_GET_PARAM 0
- #define DRM_VMW_ALLOC_DMABUF 1
- #define DRM_VMW_UNREF_DMABUF 2
- #define DRM_VMW_CURSOR_BYPASS 3
- #define DRM_VMW_CONTROL_STREAM 4
- #define DRM_VMW_CLAIM_STREAM 5
- #define DRM_VMW_UNREF_STREAM 6
- #define DRM_VMW_CREATE_CONTEXT 7
- #define DRM_VMW_UNREF_CONTEXT 8
- #define DRM_VMW_CREATE_SURFACE 9
- #define DRM_VMW_UNREF_SURFACE 10
- #define DRM_VMW_REF_SURFACE 11
- #define DRM_VMW_EXECBUF 12
- #define DRM_VMW_GET_3D_CAP 13
- #define DRM_VMW_FENCE_WAIT 14
- #define DRM_VMW_FENCE_SIGNALED 15
- #define DRM_VMW_FENCE_UNREF 16
- #define DRM_VMW_FENCE_EVENT 17
- #define DRM_VMW_PRESENT 18
- #define DRM_VMW_PRESENT_READBACK 19
- #define DRM_VMW_UPDATE_LAYOUT 20
- #define DRM_VMW_CREATE_SHADER 21
- #define DRM_VMW_UNREF_SHADER 22
- #define DRM_VMW_GB_SURFACE_CREATE 23
- #define DRM_VMW_GB_SURFACE_REF 24
- #define DRM_VMW_SYNCCPU 25
- #define DRM_VMW_CREATE_EXTENDED_CONTEXT 26
- #define DRM_VMW_PARAM_NUM_STREAMS 0
- #define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
- #define DRM_VMW_PARAM_3D 2
- #define DRM_VMW_PARAM_HW_CAPS 3
- #define DRM_VMW_PARAM_FIFO_CAPS 4
- #define DRM_VMW_PARAM_MAX_FB_SIZE 5
- #define DRM_VMW_PARAM_FIFO_HW_VERSION 6
- #define DRM_VMW_PARAM_MAX_SURF_MEMORY 7
- #define DRM_VMW_PARAM_3D_CAPS_SIZE 8
- #define DRM_VMW_PARAM_MAX_MOB_MEMORY 9
- #define DRM_VMW_PARAM_MAX_MOB_SIZE 10
- #define DRM_VMW_PARAM_SCREEN_TARGET 11
- #define DRM_VMW_PARAM_DX 12
- enum drm_vmw_handle_type {
- DRM_VMW_HANDLE_LEGACY = 0,
- DRM_VMW_HANDLE_PRIME = 1
- };
- struct drm_vmw_getparam_arg {
- __u64 value;
- __u32 param;
- __u32 pad64;
- };
- struct drm_vmw_context_arg {
- __s32 cid;
- __u32 pad64;
- };
- struct drm_vmw_surface_create_req {
- __u32 flags;
- __u32 format;
- __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES];
- __u64 size_addr;
- __s32 shareable;
- __s32 scanout;
- };
- struct drm_vmw_surface_arg {
- __s32 sid;
- enum drm_vmw_handle_type handle_type;
- };
- struct drm_vmw_size {
- __u32 width;
- __u32 height;
- __u32 depth;
- __u32 pad64;
- };
- union drm_vmw_surface_create_arg {
- struct drm_vmw_surface_arg rep;
- struct drm_vmw_surface_create_req req;
- };
- union drm_vmw_surface_reference_arg {
- struct drm_vmw_surface_create_req rep;
- struct drm_vmw_surface_arg req;
- };
- #define DRM_VMW_EXECBUF_VERSION 2
- struct drm_vmw_execbuf_arg {
- __u64 commands;
- __u32 command_size;
- __u32 throttle_us;
- __u64 fence_rep;
- __u32 version;
- __u32 flags;
- __u32 context_handle;
- __u32 pad64;
- };
- struct drm_vmw_fence_rep {
- __u32 handle;
- __u32 mask;
- __u32 seqno;
- __u32 passed_seqno;
- __u32 pad64;
- __s32 error;
- };
- struct drm_vmw_alloc_dmabuf_req {
- __u32 size;
- __u32 pad64;
- };
- struct drm_vmw_dmabuf_rep {
- __u64 map_handle;
- __u32 handle;
- __u32 cur_gmr_id;
- __u32 cur_gmr_offset;
- __u32 pad64;
- };
- union drm_vmw_alloc_dmabuf_arg {
- struct drm_vmw_alloc_dmabuf_req req;
- struct drm_vmw_dmabuf_rep rep;
- };
- struct drm_vmw_unref_dmabuf_arg {
- __u32 handle;
- __u32 pad64;
- };
- struct drm_vmw_rect {
- __s32 x;
- __s32 y;
- __u32 w;
- __u32 h;
- };
- struct drm_vmw_control_stream_arg {
- __u32 stream_id;
- __u32 enabled;
- __u32 flags;
- __u32 color_key;
- __u32 handle;
- __u32 offset;
- __s32 format;
- __u32 size;
- __u32 width;
- __u32 height;
- __u32 pitch[3];
- __u32 pad64;
- struct drm_vmw_rect src;
- struct drm_vmw_rect dst;
- };
- #define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0)
- #define DRM_VMW_CURSOR_BYPASS_FLAGS (1)
- struct drm_vmw_cursor_bypass_arg {
- __u32 flags;
- __u32 crtc_id;
- __s32 xpos;
- __s32 ypos;
- __s32 xhot;
- __s32 yhot;
- };
- struct drm_vmw_stream_arg {
- __u32 stream_id;
- __u32 pad64;
- };
- struct drm_vmw_get_3d_cap_arg {
- __u64 buffer;
- __u32 max_size;
- __u32 pad64;
- };
- #define DRM_VMW_FENCE_FLAG_EXEC (1 << 0)
- #define DRM_VMW_FENCE_FLAG_QUERY (1 << 1)
- #define DRM_VMW_WAIT_OPTION_UNREF (1 << 0)
- struct drm_vmw_fence_wait_arg {
- __u32 handle;
- __s32 cookie_valid;
- __u64 kernel_cookie;
- __u64 timeout_us;
- __s32 lazy;
- __s32 flags;
- __s32 wait_options;
- __s32 pad64;
- };
- struct drm_vmw_fence_signaled_arg {
- __u32 handle;
- __u32 flags;
- __s32 signaled;
- __u32 passed_seqno;
- __u32 signaled_flags;
- __u32 pad64;
- };
- struct drm_vmw_fence_arg {
- __u32 handle;
- __u32 pad64;
- };
- #define DRM_VMW_EVENT_FENCE_SIGNALED 0x80000000
- struct drm_vmw_event_fence {
- struct drm_event base;
- __u64 user_data;
- __u32 tv_sec;
- __u32 tv_usec;
- };
- #define DRM_VMW_FE_FLAG_REQ_TIME (1 << 0)
- struct drm_vmw_fence_event_arg {
- __u64 fence_rep;
- __u64 user_data;
- __u32 handle;
- __u32 flags;
- };
- struct drm_vmw_present_arg {
- __u32 fb_id;
- __u32 sid;
- __s32 dest_x;
- __s32 dest_y;
- __u64 clips_ptr;
- __u32 num_clips;
- __u32 pad64;
- };
- struct drm_vmw_present_readback_arg {
- __u32 fb_id;
- __u32 num_clips;
- __u64 clips_ptr;
- __u64 fence_rep;
- };
- struct drm_vmw_update_layout_arg {
- __u32 num_outputs;
- __u32 pad64;
- __u64 rects;
- };
- enum drm_vmw_shader_type {
- drm_vmw_shader_type_vs = 0,
- drm_vmw_shader_type_ps,
- };
- struct drm_vmw_shader_create_arg {
- enum drm_vmw_shader_type shader_type;
- __u32 size;
- __u32 buffer_handle;
- __u32 shader_handle;
- __u64 offset;
- };
- struct drm_vmw_shader_arg {
- __u32 handle;
- __u32 pad64;
- };
- enum drm_vmw_surface_flags {
- drm_vmw_surface_flag_shareable = (1 << 0),
- drm_vmw_surface_flag_scanout = (1 << 1),
- drm_vmw_surface_flag_create_buffer = (1 << 2)
- };
- struct drm_vmw_gb_surface_create_req {
- __u32 svga3d_flags;
- __u32 format;
- __u32 mip_levels;
- enum drm_vmw_surface_flags drm_surface_flags;
- __u32 multisample_count;
- __u32 autogen_filter;
- __u32 buffer_handle;
- __u32 array_size;
- struct drm_vmw_size base_size;
- };
- struct drm_vmw_gb_surface_create_rep {
- __u32 handle;
- __u32 backup_size;
- __u32 buffer_handle;
- __u32 buffer_size;
- __u64 buffer_map_handle;
- };
- union drm_vmw_gb_surface_create_arg {
- struct drm_vmw_gb_surface_create_rep rep;
- struct drm_vmw_gb_surface_create_req req;
- };
- struct drm_vmw_gb_surface_ref_rep {
- struct drm_vmw_gb_surface_create_req creq;
- struct drm_vmw_gb_surface_create_rep crep;
- };
- union drm_vmw_gb_surface_reference_arg {
- struct drm_vmw_gb_surface_ref_rep rep;
- struct drm_vmw_surface_arg req;
- };
- enum drm_vmw_synccpu_flags {
- drm_vmw_synccpu_read = (1 << 0),
- drm_vmw_synccpu_write = (1 << 1),
- drm_vmw_synccpu_dontblock = (1 << 2),
- drm_vmw_synccpu_allow_cs = (1 << 3)
- };
- enum drm_vmw_synccpu_op {
- drm_vmw_synccpu_grab,
- drm_vmw_synccpu_release
- };
- struct drm_vmw_synccpu_arg {
- enum drm_vmw_synccpu_op op;
- enum drm_vmw_synccpu_flags flags;
- __u32 handle;
- __u32 pad64;
- };
- enum drm_vmw_extended_context {
- drm_vmw_context_legacy,
- drm_vmw_context_dx
- };
- union drm_vmw_extended_context_arg {
- enum drm_vmw_extended_context req;
- struct drm_vmw_context_arg rep;
- };
- #if defined(__cplusplus)
- }
- #endif
- #endif
|