Home | History | Annotate | Download | only in video
      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 _UAPI_VIDEO_ADF_H_
     20 #define _UAPI_VIDEO_ADF_H_
     21 #include <linux/ioctl.h>
     22 #include <linux/types.h>
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #include <drm/drm_fourcc.h>
     25 #include <drm/drm_mode.h>
     26 #define ADF_NAME_LEN 32
     27 #define ADF_MAX_CUSTOM_DATA_SIZE 4096
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 enum adf_interface_type {
     30   ADF_INTF_DSI = 0,
     31   ADF_INTF_eDP = 1,
     32   ADF_INTF_DPI = 2,
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34   ADF_INTF_VGA = 3,
     35   ADF_INTF_DVI = 4,
     36   ADF_INTF_HDMI = 5,
     37   ADF_INTF_MEMORY = 6,
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39   ADF_INTF_TYPE_DEVICE_CUSTOM = 128,
     40   ADF_INTF_TYPE_MAX = (~(__u32) 0),
     41 };
     42 #define ADF_INTF_FLAG_PRIMARY (1 << 0)
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define ADF_INTF_FLAG_EXTERNAL (1 << 1)
     45 enum adf_event_type {
     46   ADF_EVENT_VSYNC = 0,
     47   ADF_EVENT_HOTPLUG = 1,
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49   ADF_EVENT_DEVICE_CUSTOM = 128,
     50   ADF_EVENT_TYPE_MAX = 255,
     51 };
     52 enum adf_complete_fence_type {
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54   ADF_COMPLETE_FENCE_NONE = 0,
     55   ADF_COMPLETE_FENCE_PRESENT = 1,
     56   ADF_COMPLETE_FENCE_RELEASE = 2,
     57 };
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 struct adf_set_event {
     60   __u8 type;
     61   __u8 enabled;
     62 };
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64 struct adf_event {
     65   __u8 type;
     66   __u32 length;
     67 };
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69 struct adf_vsync_event {
     70   struct adf_event base;
     71   __aligned_u64 timestamp;
     72 };
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 struct adf_hotplug_event {
     75   struct adf_event base;
     76   __u8 connected;
     77 };
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 #define ADF_MAX_PLANES 4
     80 struct adf_buffer_config {
     81   __u32 overlay_engine;
     82   __u32 w;
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84   __u32 h;
     85   __u32 format;
     86   __s32 fd[ADF_MAX_PLANES];
     87   __u32 offset[ADF_MAX_PLANES];
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89   __u32 pitch[ADF_MAX_PLANES];
     90   __u8 n_planes;
     91   __s32 acquire_fence;
     92 };
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94 #define ADF_MAX_BUFFERS (4096 / sizeof(struct adf_buffer_config))
     95 struct adf_post_config {
     96   size_t n_interfaces;
     97   __u32 __user * interfaces;
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99   size_t n_bufs;
    100   struct adf_buffer_config __user * bufs;
    101   size_t custom_data_size;
    102   void __user * custom_data;
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104   __s32 complete_fence;
    105 };
    106 struct adf_post_config_v2 {
    107   __u32 n_interfaces;
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109   __u64 interfaces;
    110   __u32 n_bufs;
    111   __u64 bufs;
    112   __u64 custom_data_size;
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114   __u64 custom_data;
    115   __s32 complete_fence;
    116   __u8 complete_fence_type;
    117 };
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119 #define ADF_MAX_INTERFACES (4096 / sizeof(__u32))
    120 struct adf_simple_buffer_alloc {
    121   __u16 w;
    122   __u16 h;
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124   __u32 format;
    125   __s32 fd;
    126   __u32 offset;
    127   __u32 pitch;
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129 };
    130 struct adf_simple_post_config {
    131   struct adf_buffer_config buf;
    132   __s32 complete_fence;
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134 };
    135 struct adf_simple_post_config_v2 {
    136   struct adf_buffer_config buf;
    137   __s32 complete_fence;
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139   __u8 complete_fence_type;
    140 };
    141 struct adf_attachment_config {
    142   __u32 overlay_engine;
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144   __u32 interface;
    145 };
    146 struct adf_device_data {
    147   char name[ADF_NAME_LEN];
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149   size_t n_attachments;
    150   struct adf_attachment_config __user * attachments;
    151   size_t n_allowed_attachments;
    152   struct adf_attachment_config __user * allowed_attachments;
    153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    154   size_t custom_data_size;
    155   void __user * custom_data;
    156 };
    157 #define ADF_MAX_ATTACHMENTS (4096 / sizeof(struct adf_attachment_config))
    158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    159 struct adf_interface_data {
    160   char name[ADF_NAME_LEN];
    161   __u32 type;
    162   __u32 id;
    163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    164   __u32 flags;
    165   __u8 dpms_state;
    166   __u8 hotplug_detect;
    167   __u16 width_mm;
    168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    169   __u16 height_mm;
    170   struct drm_mode_modeinfo current_mode;
    171   size_t n_available_modes;
    172   struct drm_mode_modeinfo __user * available_modes;
    173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    174   size_t custom_data_size;
    175   void __user * custom_data;
    176 };
    177 #define ADF_MAX_MODES (4096 / sizeof(struct drm_mode_modeinfo))
    178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    179 struct adf_overlay_engine_data {
    180   char name[ADF_NAME_LEN];
    181   size_t n_supported_formats;
    182   __u32 __user * supported_formats;
    183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    184   size_t custom_data_size;
    185   void __user * custom_data;
    186 };
    187 #define ADF_MAX_SUPPORTED_FORMATS (4096 / sizeof(__u32))
    188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    189 #define ADF_IOCTL_TYPE 'D'
    190 #define ADF_IOCTL_NR_CUSTOM 128
    191 #define ADF_SET_EVENT _IOW(ADF_IOCTL_TYPE, 0, struct adf_set_event)
    192 #define ADF_BLANK _IOW(ADF_IOCTL_TYPE, 1, __u8)
    193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    194 #define ADF_POST_CONFIG _IOW(ADF_IOCTL_TYPE, 2, struct adf_post_config)
    195 #define ADF_SET_MODE _IOW(ADF_IOCTL_TYPE, 3, struct drm_mode_modeinfo)
    196 #define ADF_GET_DEVICE_DATA _IOR(ADF_IOCTL_TYPE, 4, struct adf_device_data)
    197 #define ADF_GET_INTERFACE_DATA _IOR(ADF_IOCTL_TYPE, 5, struct adf_interface_data)
    198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    199 #define ADF_GET_OVERLAY_ENGINE_DATA _IOR(ADF_IOCTL_TYPE, 6, struct adf_overlay_engine_data)
    200 #define ADF_SIMPLE_POST_CONFIG _IOW(ADF_IOCTL_TYPE, 7, struct adf_simple_post_config)
    201 #define ADF_SIMPLE_BUFFER_ALLOC _IOW(ADF_IOCTL_TYPE, 8, struct adf_simple_buffer_alloc)
    202 #define ADF_ATTACH _IOW(ADF_IOCTL_TYPE, 9, struct adf_attachment_config)
    203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    204 #define ADF_DETACH _IOW(ADF_IOCTL_TYPE, 10, struct adf_attachment_config)
    205 #define ADF_POST_CONFIG_V2 _IOW(ADF_IOCTL_TYPE, 11, struct adf_post_config_v2)
    206 #define ADF_SIMPLE_POST_CONFIG_V2 _IOW(ADF_IOCTL_TYPE, 12, struct adf_simple_post_config_v2)
    207 #endif
    208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    209 
    210