Home | History | Annotate | Download | only in drm
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef __NOUVEAU_DRM_H__
     20 #define __NOUVEAU_DRM_H__
     21 #define DRM_NOUVEAU_EVENT_NVIF 0x80000000
     22 #include "drm.h"
     23 #ifdef __cplusplus
     24 extern "C" {
     25 #endif
     26 #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
     27 #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
     28 #define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
     29 #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)
     30 #define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4)
     31 #define NOUVEAU_GEM_TILE_COMP 0x00030000
     32 #define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00
     33 #define NOUVEAU_GEM_TILE_16BPP 0x00000001
     34 #define NOUVEAU_GEM_TILE_32BPP 0x00000002
     35 #define NOUVEAU_GEM_TILE_ZETA 0x00000004
     36 #define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008
     37 struct drm_nouveau_gem_info {
     38   __u32 handle;
     39   __u32 domain;
     40   __u64 size;
     41   __u64 offset;
     42   __u64 map_handle;
     43   __u32 tile_mode;
     44   __u32 tile_flags;
     45 };
     46 struct drm_nouveau_gem_new {
     47   struct drm_nouveau_gem_info info;
     48   __u32 channel_hint;
     49   __u32 align;
     50 };
     51 #define NOUVEAU_GEM_MAX_BUFFERS 1024
     52 struct drm_nouveau_gem_pushbuf_bo_presumed {
     53   __u32 valid;
     54   __u32 domain;
     55   __u64 offset;
     56 };
     57 struct drm_nouveau_gem_pushbuf_bo {
     58   __u64 user_priv;
     59   __u32 handle;
     60   __u32 read_domains;
     61   __u32 write_domains;
     62   __u32 valid_domains;
     63   struct drm_nouveau_gem_pushbuf_bo_presumed presumed;
     64 };
     65 #define NOUVEAU_GEM_RELOC_LOW (1 << 0)
     66 #define NOUVEAU_GEM_RELOC_HIGH (1 << 1)
     67 #define NOUVEAU_GEM_RELOC_OR (1 << 2)
     68 #define NOUVEAU_GEM_MAX_RELOCS 1024
     69 struct drm_nouveau_gem_pushbuf_reloc {
     70   __u32 reloc_bo_index;
     71   __u32 reloc_bo_offset;
     72   __u32 bo_index;
     73   __u32 flags;
     74   __u32 data;
     75   __u32 vor;
     76   __u32 tor;
     77 };
     78 #define NOUVEAU_GEM_MAX_PUSH 512
     79 struct drm_nouveau_gem_pushbuf_push {
     80   __u32 bo_index;
     81   __u32 pad;
     82   __u64 offset;
     83   __u64 length;
     84 };
     85 struct drm_nouveau_gem_pushbuf {
     86   __u32 channel;
     87   __u32 nr_buffers;
     88   __u64 buffers;
     89   __u32 nr_relocs;
     90   __u32 nr_push;
     91   __u64 relocs;
     92   __u64 push;
     93   __u32 suffix0;
     94   __u32 suffix1;
     95   __u64 vram_available;
     96   __u64 gart_available;
     97 };
     98 #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001
     99 #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004
    100 struct drm_nouveau_gem_cpu_prep {
    101   __u32 handle;
    102   __u32 flags;
    103 };
    104 struct drm_nouveau_gem_cpu_fini {
    105   __u32 handle;
    106 };
    107 #define DRM_NOUVEAU_GETPARAM 0x00
    108 #define DRM_NOUVEAU_SETPARAM 0x01
    109 #define DRM_NOUVEAU_CHANNEL_ALLOC 0x02
    110 #define DRM_NOUVEAU_CHANNEL_FREE 0x03
    111 #define DRM_NOUVEAU_GROBJ_ALLOC 0x04
    112 #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05
    113 #define DRM_NOUVEAU_GPUOBJ_FREE 0x06
    114 #define DRM_NOUVEAU_NVIF 0x07
    115 #define DRM_NOUVEAU_GEM_NEW 0x40
    116 #define DRM_NOUVEAU_GEM_PUSHBUF 0x41
    117 #define DRM_NOUVEAU_GEM_CPU_PREP 0x42
    118 #define DRM_NOUVEAU_GEM_CPU_FINI 0x43
    119 #define DRM_NOUVEAU_GEM_INFO 0x44
    120 #define DRM_IOCTL_NOUVEAU_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, struct drm_nouveau_gem_new)
    121 #define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, struct drm_nouveau_gem_pushbuf)
    122 #define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, struct drm_nouveau_gem_cpu_prep)
    123 #define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini)
    124 #define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info)
    125 #ifdef __cplusplus
    126 }
    127 #endif
    128 #endif
    129