Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef __H_VIDC_HFI_HELPER_H__ |
| 15 | #define __H_VIDC_HFI_HELPER_H__ |
| 16 | |
| 17 | #define HFI_COMMON_BASE (0) |
| 18 | #define HFI_OX_BASE (0x01000000) |
| 19 | |
| 20 | #define HFI_VIDEO_DOMAIN_ENCODER (HFI_COMMON_BASE + 0x1) |
| 21 | #define HFI_VIDEO_DOMAIN_DECODER (HFI_COMMON_BASE + 0x2) |
| 22 | #define HFI_VIDEO_DOMAIN_VPE (HFI_COMMON_BASE + 0x4) |
| 23 | #define HFI_VIDEO_DOMAIN_MBI (HFI_COMMON_BASE + 0x8) |
| 24 | |
| 25 | #define HFI_DOMAIN_BASE_COMMON (HFI_COMMON_BASE + 0) |
| 26 | #define HFI_DOMAIN_BASE_VDEC (HFI_COMMON_BASE + 0x01000000) |
| 27 | #define HFI_DOMAIN_BASE_VENC (HFI_COMMON_BASE + 0x02000000) |
| 28 | #define HFI_DOMAIN_BASE_VPE (HFI_COMMON_BASE + 0x03000000) |
| 29 | |
| 30 | #define HFI_VIDEO_ARCH_OX (HFI_COMMON_BASE + 0x1) |
| 31 | |
| 32 | #define HFI_ARCH_COMMON_OFFSET (0) |
| 33 | #define HFI_ARCH_OX_OFFSET (0x00200000) |
| 34 | |
| 35 | #define HFI_CMD_START_OFFSET (0x00010000) |
| 36 | #define HFI_MSG_START_OFFSET (0x00020000) |
| 37 | |
| 38 | #define HFI_ERR_NONE HFI_COMMON_BASE |
| 39 | #define HFI_ERR_SYS_FATAL (HFI_COMMON_BASE + 0x1) |
| 40 | #define HFI_ERR_SYS_INVALID_PARAMETER (HFI_COMMON_BASE + 0x2) |
| 41 | #define HFI_ERR_SYS_VERSION_MISMATCH (HFI_COMMON_BASE + 0x3) |
| 42 | #define HFI_ERR_SYS_INSUFFICIENT_RESOURCES (HFI_COMMON_BASE + 0x4) |
| 43 | #define HFI_ERR_SYS_MAX_SESSIONS_REACHED (HFI_COMMON_BASE + 0x5) |
| 44 | #define HFI_ERR_SYS_UNSUPPORTED_CODEC (HFI_COMMON_BASE + 0x6) |
| 45 | #define HFI_ERR_SYS_SESSION_IN_USE (HFI_COMMON_BASE + 0x7) |
| 46 | #define HFI_ERR_SYS_SESSION_ID_OUT_OF_RANGE (HFI_COMMON_BASE + 0x8) |
| 47 | #define HFI_ERR_SYS_UNSUPPORTED_DOMAIN (HFI_COMMON_BASE + 0x9) |
| 48 | |
| 49 | #define HFI_ERR_SESSION_FATAL (HFI_COMMON_BASE + 0x1001) |
| 50 | #define HFI_ERR_SESSION_INVALID_PARAMETER (HFI_COMMON_BASE + 0x1002) |
| 51 | #define HFI_ERR_SESSION_BAD_POINTER (HFI_COMMON_BASE + 0x1003) |
| 52 | #define HFI_ERR_SESSION_INVALID_SESSION_ID (HFI_COMMON_BASE + 0x1004) |
| 53 | #define HFI_ERR_SESSION_INVALID_STREAM_ID (HFI_COMMON_BASE + 0x1005) |
| 54 | #define HFI_ERR_SESSION_INCORRECT_STATE_OPERATION \ |
| 55 | (HFI_COMMON_BASE + 0x1006) |
| 56 | #define HFI_ERR_SESSION_UNSUPPORTED_PROPERTY (HFI_COMMON_BASE + 0x1007) |
| 57 | |
| 58 | #define HFI_ERR_SESSION_UNSUPPORTED_SETTING (HFI_COMMON_BASE + 0x1008) |
| 59 | |
| 60 | #define HFI_ERR_SESSION_INSUFFICIENT_RESOURCES (HFI_COMMON_BASE + 0x1009) |
| 61 | |
| 62 | #define HFI_ERR_SESSION_STREAM_CORRUPT_OUTPUT_STALLED \ |
| 63 | (HFI_COMMON_BASE + 0x100A) |
| 64 | |
| 65 | #define HFI_ERR_SESSION_STREAM_CORRUPT (HFI_COMMON_BASE + 0x100B) |
| 66 | #define HFI_ERR_SESSION_ENC_OVERFLOW (HFI_COMMON_BASE + 0x100C) |
| 67 | #define HFI_ERR_SESSION_UNSUPPORTED_STREAM (HFI_COMMON_BASE + 0x100D) |
| 68 | #define HFI_ERR_SESSION_CMDSIZE (HFI_COMMON_BASE + 0x100E) |
| 69 | #define HFI_ERR_SESSION_UNSUPPORT_CMD (HFI_COMMON_BASE + 0x100F) |
| 70 | #define HFI_ERR_SESSION_UNSUPPORT_BUFFERTYPE (HFI_COMMON_BASE + 0x1010) |
| 71 | #define HFI_ERR_SESSION_BUFFERCOUNT_TOOSMALL (HFI_COMMON_BASE + 0x1011) |
| 72 | #define HFI_ERR_SESSION_INVALID_SCALE_FACTOR (HFI_COMMON_BASE + 0x1012) |
| 73 | #define HFI_ERR_SESSION_UPSCALE_NOT_SUPPORTED (HFI_COMMON_BASE + 0x1013) |
| 74 | |
| 75 | #define HFI_EVENT_SYS_ERROR (HFI_COMMON_BASE + 0x1) |
| 76 | #define HFI_EVENT_SESSION_ERROR (HFI_COMMON_BASE + 0x2) |
| 77 | |
| 78 | #define HFI_VIDEO_CODEC_H264 0x00000002 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 79 | #define HFI_VIDEO_CODEC_MPEG1 0x00000008 |
| 80 | #define HFI_VIDEO_CODEC_MPEG2 0x00000010 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 81 | #define HFI_VIDEO_CODEC_VP8 0x00001000 |
| 82 | #define HFI_VIDEO_CODEC_HEVC 0x00002000 |
| 83 | #define HFI_VIDEO_CODEC_VP9 0x00004000 |
Surajit Podder | 285ff28 | 2017-05-26 09:24:10 +0530 | [diff] [blame] | 84 | #define HFI_VIDEO_CODEC_TME 0x00008000 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 85 | |
Umesh Pandey | 3cfce63 | 2017-03-02 13:56:18 -0800 | [diff] [blame] | 86 | #define HFI_PROFILE_UNKNOWN 0x00000000 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 87 | #define HFI_H264_PROFILE_BASELINE 0x00000001 |
| 88 | #define HFI_H264_PROFILE_MAIN 0x00000002 |
| 89 | #define HFI_H264_PROFILE_HIGH 0x00000004 |
| 90 | #define HFI_H264_PROFILE_STEREO_HIGH 0x00000008 |
| 91 | #define HFI_H264_PROFILE_MULTIVIEW_HIGH 0x00000010 |
| 92 | #define HFI_H264_PROFILE_CONSTRAINED_BASE 0x00000020 |
| 93 | #define HFI_H264_PROFILE_CONSTRAINED_HIGH 0x00000040 |
| 94 | |
Umesh Pandey | 3cfce63 | 2017-03-02 13:56:18 -0800 | [diff] [blame] | 95 | #define HFI_LEVEL_UNKNOWN 0x00000000 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 96 | #define HFI_H264_LEVEL_1 0x00000001 |
| 97 | #define HFI_H264_LEVEL_1b 0x00000002 |
| 98 | #define HFI_H264_LEVEL_11 0x00000004 |
| 99 | #define HFI_H264_LEVEL_12 0x00000008 |
| 100 | #define HFI_H264_LEVEL_13 0x00000010 |
| 101 | #define HFI_H264_LEVEL_2 0x00000020 |
| 102 | #define HFI_H264_LEVEL_21 0x00000040 |
| 103 | #define HFI_H264_LEVEL_22 0x00000080 |
| 104 | #define HFI_H264_LEVEL_3 0x00000100 |
| 105 | #define HFI_H264_LEVEL_31 0x00000200 |
| 106 | #define HFI_H264_LEVEL_32 0x00000400 |
| 107 | #define HFI_H264_LEVEL_4 0x00000800 |
| 108 | #define HFI_H264_LEVEL_41 0x00001000 |
| 109 | #define HFI_H264_LEVEL_42 0x00002000 |
| 110 | #define HFI_H264_LEVEL_5 0x00004000 |
| 111 | #define HFI_H264_LEVEL_51 0x00008000 |
Chinmay Sawarkar | 2de3f77 | 2017-02-07 12:03:44 -0800 | [diff] [blame] | 112 | #define HFI_H264_LEVEL_52 0x00010000 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 113 | |
| 114 | #define HFI_MPEG2_PROFILE_SIMPLE 0x00000001 |
| 115 | #define HFI_MPEG2_PROFILE_MAIN 0x00000002 |
| 116 | #define HFI_MPEG2_PROFILE_422 0x00000004 |
| 117 | #define HFI_MPEG2_PROFILE_SNR 0x00000008 |
| 118 | #define HFI_MPEG2_PROFILE_SPATIAL 0x00000010 |
| 119 | #define HFI_MPEG2_PROFILE_HIGH 0x00000020 |
| 120 | |
| 121 | #define HFI_MPEG2_LEVEL_LL 0x00000001 |
| 122 | #define HFI_MPEG2_LEVEL_ML 0x00000002 |
| 123 | #define HFI_MPEG2_LEVEL_H14 0x00000004 |
| 124 | #define HFI_MPEG2_LEVEL_HL 0x00000008 |
| 125 | |
Chinmay Sawarkar | 7f1cc15 | 2017-05-05 18:16:36 -0700 | [diff] [blame] | 126 | #define HFI_VPX_PROFILE_MAIN 0x00000001 |
| 127 | |
| 128 | #define HFI_VPX_LEVEL_VERSION_0 0x00000001 |
| 129 | #define HFI_VPX_LEVEL_VERSION_1 0x00000002 |
| 130 | #define HFI_VPX_LEVEL_VERSION_2 0x00000004 |
| 131 | #define HFI_VPX_LEVEL_VERSION_3 0x00000008 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 132 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 133 | #define HFI_HEVC_PROFILE_MAIN 0x00000001 |
| 134 | #define HFI_HEVC_PROFILE_MAIN10 0x00000002 |
| 135 | #define HFI_HEVC_PROFILE_MAIN_STILL_PIC 0x00000004 |
| 136 | |
| 137 | #define HFI_HEVC_LEVEL_1 0x00000001 |
| 138 | #define HFI_HEVC_LEVEL_2 0x00000002 |
| 139 | #define HFI_HEVC_LEVEL_21 0x00000004 |
| 140 | #define HFI_HEVC_LEVEL_3 0x00000008 |
| 141 | #define HFI_HEVC_LEVEL_31 0x00000010 |
| 142 | #define HFI_HEVC_LEVEL_4 0x00000020 |
| 143 | #define HFI_HEVC_LEVEL_41 0x00000040 |
| 144 | #define HFI_HEVC_LEVEL_5 0x00000080 |
| 145 | #define HFI_HEVC_LEVEL_51 0x00000100 |
| 146 | #define HFI_HEVC_LEVEL_52 0x00000200 |
| 147 | #define HFI_HEVC_LEVEL_6 0x00000400 |
| 148 | #define HFI_HEVC_LEVEL_61 0x00000800 |
| 149 | #define HFI_HEVC_LEVEL_62 0x00001000 |
| 150 | |
| 151 | #define HFI_HEVC_TIER_MAIN 0x1 |
| 152 | #define HFI_HEVC_TIER_HIGH0 0x2 |
| 153 | |
Surajit Podder | 285ff28 | 2017-05-26 09:24:10 +0530 | [diff] [blame] | 154 | #define HFI_TME_PROFILE_DEFAULT 0x00000001 |
| 155 | #define HFI_TME_PROFILE_FRC 0x00000002 |
| 156 | #define HFI_TME_PROFILE_ASW 0x00000004 |
| 157 | #define HFI_TME_PROFILE_DFS_BOKEH 0x00000008 |
| 158 | |
| 159 | #define HFI_TME_LEVEL_INTEGER 0x00000001 |
| 160 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 161 | #define HFI_BUFFER_INPUT (HFI_COMMON_BASE + 0x1) |
| 162 | #define HFI_BUFFER_OUTPUT (HFI_COMMON_BASE + 0x2) |
| 163 | #define HFI_BUFFER_OUTPUT2 (HFI_COMMON_BASE + 0x3) |
| 164 | #define HFI_BUFFER_INTERNAL_PERSIST (HFI_COMMON_BASE + 0x4) |
| 165 | #define HFI_BUFFER_INTERNAL_PERSIST_1 (HFI_COMMON_BASE + 0x5) |
Chinmay Sawarkar | e6468ec | 2017-05-23 18:20:51 -0700 | [diff] [blame] | 166 | #define HFI_BUFFER_COMMON_INTERNAL_SCRATCH (HFI_COMMON_BASE + 0x6) |
| 167 | #define HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1 (HFI_COMMON_BASE + 0x7) |
| 168 | #define HFI_BUFFER_COMMON_INTERNAL_SCRATCH_2 (HFI_COMMON_BASE + 0x8) |
| 169 | #define HFI_BUFFER_COMMON_INTERNAL_RECON (HFI_COMMON_BASE + 0x9) |
| 170 | #define HFI_BUFFER_EXTRADATA_OUTPUT (HFI_COMMON_BASE + 0xA) |
| 171 | #define HFI_BUFFER_EXTRADATA_OUTPUT2 (HFI_COMMON_BASE + 0xB) |
| 172 | #define HFI_BUFFER_EXTRADATA_INPUT (HFI_COMMON_BASE + 0xC) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 173 | |
| 174 | #define HFI_BITDEPTH_8 (HFI_COMMON_BASE + 0x0) |
| 175 | #define HFI_BITDEPTH_9 (HFI_COMMON_BASE + 0x1) |
| 176 | #define HFI_BITDEPTH_10 (HFI_COMMON_BASE + 0x2) |
| 177 | |
| 178 | #define HFI_VENC_PERFMODE_MAX_QUALITY 0x1 |
| 179 | #define HFI_VENC_PERFMODE_POWER_SAVE 0x2 |
| 180 | |
Praneeth Paladugu | 238977b | 2016-12-06 12:51:26 -0800 | [diff] [blame] | 181 | #define HFI_WORKMODE_1 (HFI_COMMON_BASE + 0x1) |
| 182 | #define HFI_WORKMODE_2 (HFI_COMMON_BASE + 0x2) |
| 183 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 184 | struct hfi_buffer_info { |
| 185 | u32 buffer_addr; |
| 186 | u32 extra_data_addr; |
| 187 | }; |
| 188 | |
| 189 | #define HFI_PROPERTY_SYS_COMMON_START \ |
| 190 | (HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + 0x0000) |
| 191 | #define HFI_PROPERTY_SYS_DEBUG_CONFIG \ |
| 192 | (HFI_PROPERTY_SYS_COMMON_START + 0x001) |
| 193 | #define HFI_PROPERTY_SYS_RESOURCE_OCMEM_REQUIREMENT_INFO \ |
| 194 | (HFI_PROPERTY_SYS_COMMON_START + 0x002) |
| 195 | #define HFI_PROPERTY_SYS_CONFIG_VCODEC_CLKFREQ \ |
| 196 | (HFI_PROPERTY_SYS_COMMON_START + 0x003) |
| 197 | #define HFI_PROPERTY_SYS_IDLE_INDICATOR \ |
| 198 | (HFI_PROPERTY_SYS_COMMON_START + 0x004) |
| 199 | #define HFI_PROPERTY_SYS_CODEC_POWER_PLANE_CTRL \ |
| 200 | (HFI_PROPERTY_SYS_COMMON_START + 0x005) |
| 201 | #define HFI_PROPERTY_SYS_IMAGE_VERSION \ |
| 202 | (HFI_PROPERTY_SYS_COMMON_START + 0x006) |
| 203 | #define HFI_PROPERTY_SYS_CONFIG_COVERAGE \ |
| 204 | (HFI_PROPERTY_SYS_COMMON_START + 0x007) |
| 205 | |
| 206 | #define HFI_PROPERTY_PARAM_COMMON_START \ |
| 207 | (HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + 0x1000) |
| 208 | #define HFI_PROPERTY_PARAM_FRAME_SIZE \ |
| 209 | (HFI_PROPERTY_PARAM_COMMON_START + 0x001) |
| 210 | #define HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_INFO \ |
| 211 | (HFI_PROPERTY_PARAM_COMMON_START + 0x002) |
| 212 | #define HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SELECT \ |
| 213 | (HFI_PROPERTY_PARAM_COMMON_START + 0x003) |
| 214 | #define HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SUPPORTED \ |
| 215 | (HFI_PROPERTY_PARAM_COMMON_START + 0x004) |
| 216 | #define HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT \ |
| 217 | (HFI_PROPERTY_PARAM_COMMON_START + 0x005) |
| 218 | #define HFI_PROPERTY_PARAM_PROFILE_LEVEL_SUPPORTED \ |
| 219 | (HFI_PROPERTY_PARAM_COMMON_START + 0x006) |
| 220 | #define HFI_PROPERTY_PARAM_CAPABILITY_SUPPORTED \ |
| 221 | (HFI_PROPERTY_PARAM_COMMON_START + 0x007) |
| 222 | #define HFI_PROPERTY_PARAM_PROPERTIES_SUPPORTED \ |
| 223 | (HFI_PROPERTY_PARAM_COMMON_START + 0x008) |
| 224 | #define HFI_PROPERTY_PARAM_CODEC_SUPPORTED \ |
| 225 | (HFI_PROPERTY_PARAM_COMMON_START + 0x009) |
| 226 | #define HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SUPPORTED \ |
| 227 | (HFI_PROPERTY_PARAM_COMMON_START + 0x00A) |
| 228 | #define HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SELECT \ |
| 229 | (HFI_PROPERTY_PARAM_COMMON_START + 0x00B) |
| 230 | #define HFI_PROPERTY_PARAM_MULTI_VIEW_FORMAT \ |
| 231 | (HFI_PROPERTY_PARAM_COMMON_START + 0x00C) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 232 | #define HFI_PROPERTY_PARAM_CODEC_MASK_SUPPORTED \ |
| 233 | (HFI_PROPERTY_PARAM_COMMON_START + 0x00E) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 234 | #define HFI_PROPERTY_PARAM_MAX_SESSIONS_SUPPORTED \ |
| 235 | (HFI_PROPERTY_PARAM_COMMON_START + 0x010) |
Karthikeyan Periasamy | a0e4bad | 2017-04-26 12:51:10 -0700 | [diff] [blame] | 236 | #define HFI_PROPERTY_PARAM_SECURE_SESSION \ |
| 237 | (HFI_PROPERTY_PARAM_COMMON_START + 0x011) |
Praneeth Paladugu | 238977b | 2016-12-06 12:51:26 -0800 | [diff] [blame] | 238 | #define HFI_PROPERTY_PARAM_WORK_MODE \ |
| 239 | (HFI_PROPERTY_PARAM_COMMON_START + 0x015) |
Surajit Podder | 285ff28 | 2017-05-26 09:24:10 +0530 | [diff] [blame] | 240 | #define HFI_PROPERTY_TME_VERSION_SUPPORTED \ |
| 241 | (HFI_PROPERTY_PARAM_COMMON_START + 0x016) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 242 | |
| 243 | #define HFI_PROPERTY_CONFIG_COMMON_START \ |
| 244 | (HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + 0x2000) |
| 245 | #define HFI_PROPERTY_CONFIG_FRAME_RATE \ |
| 246 | (HFI_PROPERTY_CONFIG_COMMON_START + 0x001) |
Praneeth Paladugu | 238977b | 2016-12-06 12:51:26 -0800 | [diff] [blame] | 247 | #define HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE \ |
| 248 | (HFI_PROPERTY_CONFIG_COMMON_START + 0x002) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 249 | |
| 250 | #define HFI_PROPERTY_PARAM_VDEC_COMMON_START \ |
| 251 | (HFI_DOMAIN_BASE_VDEC + HFI_ARCH_COMMON_OFFSET + 0x3000) |
| 252 | #define HFI_PROPERTY_PARAM_VDEC_MULTI_STREAM \ |
| 253 | (HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x001) |
| 254 | #define HFI_PROPERTY_PARAM_VDEC_CONCEAL_COLOR \ |
| 255 | (HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x002) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 256 | #define HFI_PROPERTY_PARAM_VDEC_PIXEL_BITDEPTH \ |
| 257 | (HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x007) |
| 258 | #define HFI_PROPERTY_PARAM_VDEC_PIC_STRUCT \ |
| 259 | (HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x009) |
| 260 | #define HFI_PROPERTY_PARAM_VDEC_COLOUR_SPACE \ |
| 261 | (HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x00A) |
| 262 | |
| 263 | |
| 264 | #define HFI_PROPERTY_CONFIG_VDEC_COMMON_START \ |
| 265 | (HFI_DOMAIN_BASE_VDEC + HFI_ARCH_COMMON_OFFSET + 0x4000) |
| 266 | |
| 267 | #define HFI_PROPERTY_PARAM_VENC_COMMON_START \ |
| 268 | (HFI_DOMAIN_BASE_VENC + HFI_ARCH_COMMON_OFFSET + 0x5000) |
| 269 | #define HFI_PROPERTY_PARAM_VENC_SLICE_DELIVERY_MODE \ |
| 270 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x001) |
| 271 | #define HFI_PROPERTY_PARAM_VENC_H264_ENTROPY_CONTROL \ |
| 272 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x002) |
| 273 | #define HFI_PROPERTY_PARAM_VENC_H264_DEBLOCK_CONTROL \ |
| 274 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x003) |
| 275 | #define HFI_PROPERTY_PARAM_VENC_RATE_CONTROL \ |
| 276 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x004) |
Umesh Pandey | 3cfce63 | 2017-03-02 13:56:18 -0800 | [diff] [blame] | 277 | #define HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE \ |
| 278 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x009) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 279 | #define HFI_PROPERTY_PARAM_VENC_OPEN_GOP \ |
| 280 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00C) |
| 281 | #define HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH \ |
| 282 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00D) |
| 283 | #define HFI_PROPERTY_PARAM_VENC_MULTI_SLICE_CONTROL \ |
| 284 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00E) |
| 285 | #define HFI_PROPERTY_PARAM_VENC_VBV_HRD_BUF_SIZE \ |
| 286 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00F) |
| 287 | #define HFI_PROPERTY_PARAM_VENC_QUALITY_VS_SPEED \ |
| 288 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x010) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 289 | #define HFI_PROPERTY_PARAM_VENC_H264_SPS_ID \ |
| 290 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x014) |
| 291 | #define HFI_PROPERTY_PARAM_VENC_H264_PPS_ID \ |
| 292 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x015) |
Umesh Pandey | 7fce7ee | 2017-03-13 17:59:48 -0700 | [diff] [blame] | 293 | #define HFI_PROPERTY_PARAM_VENC_GENERATE_AUDNAL \ |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 294 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x016) |
| 295 | #define HFI_PROPERTY_PARAM_VENC_ASPECT_RATIO \ |
| 296 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x017) |
| 297 | #define HFI_PROPERTY_PARAM_VENC_NUMREF \ |
| 298 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x018) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 299 | #define HFI_PROPERTY_PARAM_VENC_LTRMODE \ |
| 300 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x01C) |
| 301 | #define HFI_PROPERTY_PARAM_VENC_VIDEO_SIGNAL_INFO \ |
| 302 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x01D) |
Chinmay Sawarkar | d005462 | 2017-05-04 13:50:59 -0700 | [diff] [blame] | 303 | #define HFI_PROPERTY_PARAM_VENC_VUI_TIMING_INFO \ |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 304 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x01E) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 305 | #define HFI_PROPERTY_PARAM_VENC_LOW_LATENCY_MODE \ |
| 306 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x022) |
| 307 | #define HFI_PROPERTY_PARAM_VENC_PRESERVE_TEXT_QUALITY \ |
| 308 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x023) |
| 309 | #define HFI_PROPERTY_PARAM_VENC_H264_8X8_TRANSFORM \ |
| 310 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x025) |
| 311 | #define HFI_PROPERTY_PARAM_VENC_HIER_P_MAX_NUM_ENH_LAYER \ |
| 312 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x026) |
| 313 | #define HFI_PROPERTY_PARAM_VENC_DISABLE_RC_TIMESTAMP \ |
| 314 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x027) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 315 | #define HFI_PROPERTY_PARAM_VENC_VPX_ERROR_RESILIENCE_MODE \ |
| 316 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x029) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 317 | #define HFI_PROPERTY_PARAM_VENC_HIER_B_MAX_NUM_ENH_LAYER \ |
| 318 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x02C) |
| 319 | #define HFI_PROPERTY_PARAM_VENC_HIER_P_HYBRID_MODE \ |
| 320 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x02F) |
| 321 | #define HFI_PROPERTY_PARAM_VENC_BITRATE_TYPE \ |
| 322 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x031) |
| 323 | #define HFI_PROPERTY_PARAM_VENC_VQZIP_SEI_TYPE \ |
| 324 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x033) |
| 325 | #define HFI_PROPERTY_PARAM_VENC_IFRAMESIZE \ |
| 326 | (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x034) |
| 327 | |
| 328 | #define HFI_PROPERTY_CONFIG_VENC_COMMON_START \ |
| 329 | (HFI_DOMAIN_BASE_VENC + HFI_ARCH_COMMON_OFFSET + 0x6000) |
| 330 | #define HFI_PROPERTY_CONFIG_VENC_TARGET_BITRATE \ |
| 331 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x001) |
| 332 | #define HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD \ |
| 333 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x002) |
| 334 | #define HFI_PROPERTY_CONFIG_VENC_INTRA_PERIOD \ |
| 335 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x003) |
| 336 | #define HFI_PROPERTY_CONFIG_VENC_REQUEST_SYNC_FRAME \ |
| 337 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x004) |
| 338 | #define HFI_PROPERTY_CONFIG_VENC_SLICE_SIZE \ |
| 339 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x005) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 340 | #define HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER \ |
| 341 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x008) |
| 342 | #define HFI_PROPERTY_CONFIG_VENC_MARKLTRFRAME \ |
| 343 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x009) |
| 344 | #define HFI_PROPERTY_CONFIG_VENC_USELTRFRAME \ |
| 345 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00A) |
| 346 | #define HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER \ |
| 347 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00B) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 348 | #define HFI_PROPERTY_CONFIG_VENC_PERF_MODE \ |
| 349 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00E) |
| 350 | #define HFI_PROPERTY_CONFIG_VENC_BASELAYER_PRIORITYID \ |
| 351 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00F) |
Chinmay Sawarkar | 79f56a6 | 2017-06-30 12:46:39 -0700 | [diff] [blame] | 352 | #define HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE \ |
| 353 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x010) |
Shivendra Kakrania | 90cf3c7 | 2017-06-23 13:35:11 -0700 | [diff] [blame] | 354 | #define HFI_PROPERTY_CONFIG_VENC_FRAME_QP \ |
Praneeth Paladugu | 7fbd279 | 2017-01-27 13:39:03 -0800 | [diff] [blame] | 355 | (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x012) |
| 356 | |
Chinmay Sawarkar | 582c72a | 2017-05-24 14:29:12 -0700 | [diff] [blame] | 357 | #define HFI_PROPERTY_PARAM_VPE_COMMON_START \ |
| 358 | (HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x7000) |
| 359 | #define HFI_PROPERTY_PARAM_VPE_ROTATION \ |
| 360 | (HFI_PROPERTY_PARAM_VPE_COMMON_START + 0x001) |
Chinmay Sawarkar | ddd1d97 | 2017-08-15 10:10:06 -0700 | [diff] [blame^] | 361 | #define HFI_PROPERTY_PARAM_VPE_COLOR_SPACE_CONVERSION \ |
| 362 | (HFI_PROPERTY_PARAM_VPE_COMMON_START + 0x002) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 363 | |
| 364 | #define HFI_PROPERTY_CONFIG_VPE_COMMON_START \ |
| 365 | (HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x8000) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 366 | |
| 367 | struct hfi_pic_struct { |
| 368 | u32 progressive_only; |
| 369 | }; |
| 370 | |
| 371 | struct hfi_bitrate { |
| 372 | u32 bit_rate; |
| 373 | u32 layer_id; |
| 374 | }; |
| 375 | |
| 376 | struct hfi_colour_space { |
| 377 | u32 colour_space; |
| 378 | }; |
| 379 | |
| 380 | #define HFI_CAPABILITY_FRAME_WIDTH (HFI_COMMON_BASE + 0x1) |
| 381 | #define HFI_CAPABILITY_FRAME_HEIGHT (HFI_COMMON_BASE + 0x2) |
| 382 | #define HFI_CAPABILITY_MBS_PER_FRAME (HFI_COMMON_BASE + 0x3) |
| 383 | #define HFI_CAPABILITY_MBS_PER_SECOND (HFI_COMMON_BASE + 0x4) |
| 384 | #define HFI_CAPABILITY_FRAMERATE (HFI_COMMON_BASE + 0x5) |
| 385 | #define HFI_CAPABILITY_SCALE_X (HFI_COMMON_BASE + 0x6) |
| 386 | #define HFI_CAPABILITY_SCALE_Y (HFI_COMMON_BASE + 0x7) |
| 387 | #define HFI_CAPABILITY_BITRATE (HFI_COMMON_BASE + 0x8) |
| 388 | #define HFI_CAPABILITY_BFRAME (HFI_COMMON_BASE + 0x9) |
| 389 | #define HFI_CAPABILITY_PEAKBITRATE (HFI_COMMON_BASE + 0xa) |
| 390 | #define HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS (HFI_COMMON_BASE + 0x10) |
| 391 | #define HFI_CAPABILITY_ENC_LTR_COUNT (HFI_COMMON_BASE + 0x11) |
| 392 | #define HFI_CAPABILITY_CP_OUTPUT2_THRESH (HFI_COMMON_BASE + 0x12) |
| 393 | #define HFI_CAPABILITY_HIER_B_NUM_ENH_LAYERS (HFI_COMMON_BASE + 0x13) |
| 394 | #define HFI_CAPABILITY_LCU_SIZE (HFI_COMMON_BASE + 0x14) |
| 395 | #define HFI_CAPABILITY_HIER_P_HYBRID_NUM_ENH_LAYERS (HFI_COMMON_BASE + 0x15) |
| 396 | #define HFI_CAPABILITY_MBS_PER_SECOND_POWERSAVE (HFI_COMMON_BASE + 0x16) |
Praneeth Paladugu | 520c759 | 2017-01-26 13:53:14 -0800 | [diff] [blame] | 397 | #define HFI_CAPABILITY_EXTRADATA (HFI_COMMON_BASE + 0X17) |
| 398 | #define HFI_CAPABILITY_PROFILE (HFI_COMMON_BASE + 0X18) |
| 399 | #define HFI_CAPABILITY_LEVEL (HFI_COMMON_BASE + 0X19) |
| 400 | #define HFI_CAPABILITY_I_FRAME_QP (HFI_COMMON_BASE + 0X20) |
| 401 | #define HFI_CAPABILITY_P_FRAME_QP (HFI_COMMON_BASE + 0X21) |
| 402 | #define HFI_CAPABILITY_B_FRAME_QP (HFI_COMMON_BASE + 0X22) |
| 403 | #define HFI_CAPABILITY_RATE_CONTROL_MODES (HFI_COMMON_BASE + 0X23) |
| 404 | #define HFI_CAPABILITY_BLUR_WIDTH (HFI_COMMON_BASE + 0X24) |
| 405 | #define HFI_CAPABILITY_BLUR_HEIGHT (HFI_COMMON_BASE + 0X25) |
| 406 | #define HFI_CAPABILITY_SLICE_DELIVERY_MODES (HFI_COMMON_BASE + 0X26) |
| 407 | #define HFI_CAPABILITY_SLICE_BYTE (HFI_COMMON_BASE + 0X27) |
| 408 | #define HFI_CAPABILITY_SLICE_MB (HFI_COMMON_BASE + 0X28) |
| 409 | #define HFI_CAPABILITY_SECURE (HFI_COMMON_BASE + 0X29) |
| 410 | #define HFI_CAPABILITY_MAX_NUM_B_FRAMES (HFI_COMMON_BASE + 0X2A) |
| 411 | #define HFI_CAPABILITY_MAX_VIDEOCORES (HFI_COMMON_BASE + 0X2B) |
| 412 | #define HFI_CAPABILITY_MAX_WORKMODES (HFI_COMMON_BASE + 0X2C) |
| 413 | #define HFI_CAPABILITY_UBWC_CR_STATS (HFI_COMMON_BASE + 0X2D) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 414 | |
| 415 | struct hfi_capability_supported { |
| 416 | u32 capability_type; |
| 417 | u32 min; |
| 418 | u32 max; |
| 419 | u32 step_size; |
| 420 | }; |
| 421 | |
| 422 | struct hfi_capability_supported_info { |
| 423 | u32 num_capabilities; |
| 424 | struct hfi_capability_supported rg_data[1]; |
| 425 | }; |
| 426 | |
| 427 | #define HFI_DEBUG_MSG_LOW 0x00000001 |
| 428 | #define HFI_DEBUG_MSG_MEDIUM 0x00000002 |
| 429 | #define HFI_DEBUG_MSG_HIGH 0x00000004 |
| 430 | #define HFI_DEBUG_MSG_ERROR 0x00000008 |
| 431 | #define HFI_DEBUG_MSG_FATAL 0x00000010 |
| 432 | #define HFI_DEBUG_MSG_PERF 0x00000020 |
| 433 | |
| 434 | #define HFI_DEBUG_MODE_QUEUE 0x00000001 |
| 435 | #define HFI_DEBUG_MODE_QDSS 0x00000002 |
| 436 | |
| 437 | struct hfi_debug_config { |
| 438 | u32 debug_config; |
| 439 | u32 debug_mode; |
| 440 | }; |
| 441 | |
| 442 | struct hfi_enable { |
| 443 | u32 enable; |
| 444 | }; |
| 445 | |
| 446 | #define HFI_H264_DB_MODE_DISABLE (HFI_COMMON_BASE + 0x1) |
| 447 | #define HFI_H264_DB_MODE_SKIP_SLICE_BOUNDARY \ |
| 448 | (HFI_COMMON_BASE + 0x2) |
| 449 | #define HFI_H264_DB_MODE_ALL_BOUNDARY (HFI_COMMON_BASE + 0x3) |
| 450 | |
| 451 | struct hfi_h264_db_control { |
| 452 | u32 mode; |
| 453 | u32 slice_alpha_offset; |
| 454 | u32 slice_beta_offset; |
| 455 | }; |
| 456 | |
| 457 | #define HFI_H264_ENTROPY_CAVLC (HFI_COMMON_BASE + 0x1) |
| 458 | #define HFI_H264_ENTROPY_CABAC (HFI_COMMON_BASE + 0x2) |
| 459 | |
| 460 | #define HFI_H264_CABAC_MODEL_0 (HFI_COMMON_BASE + 0x1) |
| 461 | #define HFI_H264_CABAC_MODEL_1 (HFI_COMMON_BASE + 0x2) |
| 462 | #define HFI_H264_CABAC_MODEL_2 (HFI_COMMON_BASE + 0x3) |
| 463 | |
| 464 | struct hfi_h264_entropy_control { |
| 465 | u32 entropy_mode; |
| 466 | u32 cabac_model; |
| 467 | }; |
| 468 | |
| 469 | struct hfi_frame_rate { |
| 470 | u32 buffer_type; |
| 471 | u32 frame_rate; |
| 472 | }; |
| 473 | |
| 474 | #define HFI_INTRA_REFRESH_NONE (HFI_COMMON_BASE + 0x1) |
| 475 | #define HFI_INTRA_REFRESH_CYCLIC (HFI_COMMON_BASE + 0x2) |
Saurabh Kothawade | 11e0572 | 2017-05-16 19:07:58 -0700 | [diff] [blame] | 476 | #define HFI_INTRA_REFRESH_RANDOM (HFI_COMMON_BASE + 0x5) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 477 | |
| 478 | struct hfi_intra_refresh { |
| 479 | u32 mode; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 480 | u32 mbs; |
| 481 | }; |
| 482 | |
| 483 | struct hfi_idr_period { |
| 484 | u32 idr_period; |
| 485 | }; |
| 486 | |
Chinmay Sawarkar | 582c72a | 2017-05-24 14:29:12 -0700 | [diff] [blame] | 487 | struct hfi_vpe_rotation_type { |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 488 | u32 rotation; |
| 489 | u32 flip; |
| 490 | }; |
| 491 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 492 | struct hfi_conceal_color { |
Umesh Pandey | 42313a7 | 2017-07-05 18:20:06 -0700 | [diff] [blame] | 493 | u32 conceal_color_8bit; |
| 494 | u32 conceal_color_10bit; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 495 | }; |
| 496 | |
| 497 | struct hfi_intra_period { |
| 498 | u32 pframes; |
| 499 | u32 bframes; |
| 500 | }; |
| 501 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 502 | struct hfi_multi_stream { |
| 503 | u32 buffer_type; |
| 504 | u32 enable; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 505 | }; |
| 506 | |
| 507 | struct hfi_multi_view_format { |
| 508 | u32 views; |
| 509 | u32 rg_view_order[1]; |
| 510 | }; |
| 511 | |
| 512 | #define HFI_MULTI_SLICE_OFF (HFI_COMMON_BASE + 0x1) |
| 513 | #define HFI_MULTI_SLICE_BY_MB_COUNT (HFI_COMMON_BASE + 0x2) |
| 514 | #define HFI_MULTI_SLICE_BY_BYTE_COUNT (HFI_COMMON_BASE + 0x3) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 515 | |
| 516 | struct hfi_multi_slice_control { |
| 517 | u32 multi_slice; |
| 518 | u32 slice_size; |
| 519 | }; |
| 520 | |
| 521 | #define HFI_NAL_FORMAT_STARTCODES 0x00000001 |
| 522 | #define HFI_NAL_FORMAT_ONE_NAL_PER_BUFFER 0x00000002 |
| 523 | #define HFI_NAL_FORMAT_ONE_BYTE_LENGTH 0x00000004 |
| 524 | #define HFI_NAL_FORMAT_TWO_BYTE_LENGTH 0x00000008 |
| 525 | #define HFI_NAL_FORMAT_FOUR_BYTE_LENGTH 0x00000010 |
| 526 | |
| 527 | struct hfi_nal_stream_format_supported { |
| 528 | u32 nal_stream_format_supported; |
| 529 | }; |
| 530 | |
| 531 | struct hfi_nal_stream_format_select { |
| 532 | u32 nal_stream_format_select; |
| 533 | }; |
| 534 | #define HFI_PICTURE_TYPE_I 0x01 |
| 535 | #define HFI_PICTURE_TYPE_P 0x02 |
| 536 | #define HFI_PICTURE_TYPE_B 0x04 |
| 537 | #define HFI_PICTURE_TYPE_IDR 0x08 |
| 538 | #define HFI_PICTURE_TYPE_CRA 0x10 |
| 539 | |
| 540 | struct hfi_profile_level { |
| 541 | u32 profile; |
| 542 | u32 level; |
| 543 | }; |
| 544 | |
| 545 | struct hfi_profile_level_supported { |
| 546 | u32 profile_count; |
| 547 | struct hfi_profile_level rg_profile_level[1]; |
| 548 | }; |
| 549 | |
| 550 | struct hfi_quality_vs_speed { |
| 551 | u32 quality_vs_speed; |
| 552 | }; |
| 553 | |
| 554 | struct hfi_quantization { |
Chinmay Sawarkar | 2de3f77 | 2017-02-07 12:03:44 -0800 | [diff] [blame] | 555 | u32 qp_packed; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 556 | u32 layer_id; |
Vaibhav Deshu Venkatesh | 3a14716 | 2017-04-27 16:21:12 -0700 | [diff] [blame] | 557 | u32 enable; |
| 558 | u32 reserved[3]; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 559 | }; |
| 560 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 561 | struct hfi_quantization_range { |
Chinmay Sawarkar | 2de3f77 | 2017-02-07 12:03:44 -0800 | [diff] [blame] | 562 | struct hfi_quantization min_qp; |
| 563 | struct hfi_quantization max_qp; |
Umesh Pandey | 3cfce63 | 2017-03-02 13:56:18 -0800 | [diff] [blame] | 564 | u32 reserved[4]; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 565 | }; |
| 566 | |
| 567 | #define HFI_LTR_MODE_DISABLE 0x0 |
| 568 | #define HFI_LTR_MODE_MANUAL 0x1 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 569 | |
| 570 | struct hfi_ltr_mode { |
| 571 | u32 ltr_mode; |
| 572 | u32 ltr_count; |
| 573 | u32 trust_mode; |
| 574 | }; |
| 575 | |
| 576 | struct hfi_ltr_use { |
| 577 | u32 ref_ltr; |
| 578 | u32 use_constrnt; |
| 579 | u32 frames; |
| 580 | }; |
| 581 | |
| 582 | struct hfi_ltr_mark { |
| 583 | u32 mark_frame; |
| 584 | }; |
| 585 | |
| 586 | struct hfi_frame_size { |
| 587 | u32 buffer_type; |
| 588 | u32 width; |
| 589 | u32 height; |
| 590 | }; |
| 591 | |
Praneeth Paladugu | 238977b | 2016-12-06 12:51:26 -0800 | [diff] [blame] | 592 | struct hfi_videocores_usage_type { |
| 593 | u32 video_core_enable_mask; |
| 594 | }; |
| 595 | |
| 596 | struct hfi_video_work_mode { |
| 597 | u32 video_work_mode; |
| 598 | }; |
| 599 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 600 | struct hfi_video_signal_metadata { |
| 601 | u32 enable; |
| 602 | u32 video_format; |
| 603 | u32 video_full_range; |
| 604 | u32 color_description; |
| 605 | u32 color_primaries; |
| 606 | u32 transfer_characteristics; |
| 607 | u32 matrix_coeffs; |
| 608 | }; |
| 609 | |
Chinmay Sawarkar | d005462 | 2017-05-04 13:50:59 -0700 | [diff] [blame] | 610 | struct hfi_vui_timing_info { |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 611 | u32 enable; |
| 612 | u32 fixed_frame_rate; |
| 613 | u32 time_scale; |
| 614 | }; |
| 615 | |
| 616 | struct hfi_bit_depth { |
| 617 | u32 buffer_type; |
| 618 | u32 bit_depth; |
| 619 | }; |
| 620 | |
| 621 | struct hfi_picture_type { |
| 622 | u32 is_sync_frame; |
| 623 | u32 picture_type; |
| 624 | }; |
| 625 | |
| 626 | /* Base Offset for UBWC color formats */ |
| 627 | #define HFI_COLOR_FORMAT_UBWC_BASE (0x8000) |
| 628 | /* Base Offset for 10-bit color formats */ |
| 629 | #define HFI_COLOR_FORMAT_10_BIT_BASE (0x4000) |
| 630 | |
| 631 | #define HFI_COLOR_FORMAT_MONOCHROME (HFI_COMMON_BASE + 0x1) |
| 632 | #define HFI_COLOR_FORMAT_NV12 (HFI_COMMON_BASE + 0x2) |
| 633 | #define HFI_COLOR_FORMAT_NV21 (HFI_COMMON_BASE + 0x3) |
| 634 | #define HFI_COLOR_FORMAT_NV12_4x4TILE (HFI_COMMON_BASE + 0x4) |
| 635 | #define HFI_COLOR_FORMAT_NV21_4x4TILE (HFI_COMMON_BASE + 0x5) |
| 636 | #define HFI_COLOR_FORMAT_YUYV (HFI_COMMON_BASE + 0x6) |
| 637 | #define HFI_COLOR_FORMAT_YVYU (HFI_COMMON_BASE + 0x7) |
| 638 | #define HFI_COLOR_FORMAT_UYVY (HFI_COMMON_BASE + 0x8) |
| 639 | #define HFI_COLOR_FORMAT_VYUY (HFI_COMMON_BASE + 0x9) |
| 640 | #define HFI_COLOR_FORMAT_RGB565 (HFI_COMMON_BASE + 0xA) |
| 641 | #define HFI_COLOR_FORMAT_BGR565 (HFI_COMMON_BASE + 0xB) |
| 642 | #define HFI_COLOR_FORMAT_RGB888 (HFI_COMMON_BASE + 0xC) |
| 643 | #define HFI_COLOR_FORMAT_BGR888 (HFI_COMMON_BASE + 0xD) |
| 644 | #define HFI_COLOR_FORMAT_YUV444 (HFI_COMMON_BASE + 0xE) |
| 645 | #define HFI_COLOR_FORMAT_RGBA8888 (HFI_COMMON_BASE + 0x10) |
| 646 | |
Chinmay Sawarkar | 2de3f77 | 2017-02-07 12:03:44 -0800 | [diff] [blame] | 647 | #define HFI_COLOR_FORMAT_YUV420_TP10 \ |
Umesh Pandey | 3cfce63 | 2017-03-02 13:56:18 -0800 | [diff] [blame] | 648 | (HFI_COLOR_FORMAT_10_BIT_BASE + HFI_COLOR_FORMAT_NV12) |
| 649 | #define HFI_COLOR_FORMAT_P010 \ |
| 650 | (HFI_COLOR_FORMAT_10_BIT_BASE + HFI_COLOR_FORMAT_NV12 + 0x1) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 651 | |
| 652 | #define HFI_COLOR_FORMAT_NV12_UBWC \ |
| 653 | (HFI_COLOR_FORMAT_UBWC_BASE + HFI_COLOR_FORMAT_NV12) |
| 654 | |
| 655 | #define HFI_COLOR_FORMAT_YUV420_TP10_UBWC \ |
| 656 | (HFI_COLOR_FORMAT_UBWC_BASE + HFI_COLOR_FORMAT_YUV420_TP10) |
| 657 | |
| 658 | #define HFI_COLOR_FORMAT_RGBA8888_UBWC \ |
| 659 | (HFI_COLOR_FORMAT_UBWC_BASE + HFI_COLOR_FORMAT_RGBA8888) |
| 660 | |
| 661 | #define HFI_MAX_MATRIX_COEFFS 9 |
| 662 | #define HFI_MAX_BIAS_COEFFS 3 |
| 663 | #define HFI_MAX_LIMIT_COEFFS 6 |
| 664 | |
| 665 | #define HFI_STATISTICS_MODE_DEFAULT 0x10 |
| 666 | #define HFI_STATISTICS_MODE_1 0x11 |
| 667 | #define HFI_STATISTICS_MODE_2 0x12 |
| 668 | #define HFI_STATISTICS_MODE_3 0x13 |
| 669 | |
| 670 | struct hfi_uncompressed_format_select { |
| 671 | u32 buffer_type; |
| 672 | u32 format; |
| 673 | }; |
| 674 | |
| 675 | struct hfi_uncompressed_format_supported { |
| 676 | u32 buffer_type; |
| 677 | u32 format_entries; |
| 678 | u32 rg_format_info[1]; |
| 679 | }; |
| 680 | |
| 681 | struct hfi_uncompressed_plane_actual { |
| 682 | u32 actual_stride; |
| 683 | u32 actual_plane_buffer_height; |
| 684 | }; |
| 685 | |
| 686 | struct hfi_uncompressed_plane_actual_info { |
| 687 | u32 buffer_type; |
| 688 | u32 num_planes; |
| 689 | struct hfi_uncompressed_plane_actual rg_plane_format[1]; |
| 690 | }; |
| 691 | |
| 692 | struct hfi_uncompressed_plane_constraints { |
| 693 | u32 stride_multiples; |
| 694 | u32 max_stride; |
| 695 | u32 min_plane_buffer_height_multiple; |
| 696 | u32 buffer_alignment; |
| 697 | }; |
| 698 | |
| 699 | struct hfi_uncompressed_plane_info { |
| 700 | u32 format; |
| 701 | u32 num_planes; |
| 702 | struct hfi_uncompressed_plane_constraints rg_plane_format[1]; |
| 703 | }; |
| 704 | |
| 705 | struct hfi_codec_supported { |
| 706 | u32 decoder_codec_supported; |
| 707 | u32 encoder_codec_supported; |
| 708 | }; |
| 709 | |
| 710 | struct hfi_properties_supported { |
| 711 | u32 num_properties; |
| 712 | u32 rg_properties[1]; |
| 713 | }; |
| 714 | |
| 715 | struct hfi_max_sessions_supported { |
| 716 | u32 max_sessions; |
| 717 | }; |
| 718 | |
| 719 | struct hfi_vpe_color_space_conversion { |
Chinmay Sawarkar | ddd1d97 | 2017-08-15 10:10:06 -0700 | [diff] [blame^] | 720 | u32 input_color_primaries; |
| 721 | u32 custom_matrix_enabled; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 722 | u32 csc_matrix[HFI_MAX_MATRIX_COEFFS]; |
| 723 | u32 csc_bias[HFI_MAX_BIAS_COEFFS]; |
| 724 | u32 csc_limit[HFI_MAX_LIMIT_COEFFS]; |
| 725 | }; |
| 726 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 727 | #define HFI_ROTATE_NONE (HFI_COMMON_BASE + 0x1) |
| 728 | #define HFI_ROTATE_90 (HFI_COMMON_BASE + 0x2) |
| 729 | #define HFI_ROTATE_180 (HFI_COMMON_BASE + 0x3) |
| 730 | #define HFI_ROTATE_270 (HFI_COMMON_BASE + 0x4) |
| 731 | |
| 732 | #define HFI_FLIP_NONE (HFI_COMMON_BASE + 0x1) |
| 733 | #define HFI_FLIP_HORIZONTAL (HFI_COMMON_BASE + 0x2) |
Chinmay Sawarkar | 582c72a | 2017-05-24 14:29:12 -0700 | [diff] [blame] | 734 | #define HFI_FLIP_VERTICAL (HFI_COMMON_BASE + 0x4) |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 735 | |
Shivendra Kakrania | c1f60e0 | 2017-04-13 00:07:26 -0700 | [diff] [blame] | 736 | #define HFI_RESOURCE_SYSCACHE 0x00000002 |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 737 | |
Shivendra Kakrania | c1f60e0 | 2017-04-13 00:07:26 -0700 | [diff] [blame] | 738 | struct hfi_resource_subcache_type { |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 739 | u32 size; |
Shivendra Kakrania | c1f60e0 | 2017-04-13 00:07:26 -0700 | [diff] [blame] | 740 | u32 sc_id; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 741 | }; |
| 742 | |
Shivendra Kakrania | c1f60e0 | 2017-04-13 00:07:26 -0700 | [diff] [blame] | 743 | struct hfi_resource_syscache_info_type { |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 744 | u32 num_entries; |
Shivendra Kakrania | c1f60e0 | 2017-04-13 00:07:26 -0700 | [diff] [blame] | 745 | struct hfi_resource_subcache_type rg_subcache_entries[1]; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 746 | }; |
| 747 | |
| 748 | struct hfi_property_sys_image_version_info_type { |
| 749 | u32 string_size; |
| 750 | u8 str_image_version[1]; |
| 751 | }; |
| 752 | |
| 753 | struct hfi_venc_config_advanced { |
| 754 | u8 pipe2d; |
| 755 | u8 hw_mode; |
| 756 | u8 low_delay_enforce; |
| 757 | u8 worker_vppsg_delay; |
| 758 | u32 close_gop; |
| 759 | u32 h264_constrain_intra_pred; |
| 760 | u32 h264_transform_8x8_flag; |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 761 | u32 multi_refp_en; |
| 762 | u32 qmatrix_en; |
| 763 | u8 vpp_info_packet_mode; |
| 764 | u8 ref_tile_mode; |
| 765 | u8 bitstream_flush_mode; |
| 766 | u32 vppsg_vspap_fb_sync_delay; |
| 767 | u32 rc_initial_delay; |
| 768 | u32 peak_bitrate_constraint; |
| 769 | u32 ds_display_frame_width; |
| 770 | u32 ds_display_frame_height; |
| 771 | u32 perf_tune_param_ptr; |
| 772 | u32 input_x_offset; |
| 773 | u32 input_y_offset; |
| 774 | u32 input_roi_width; |
| 775 | u32 input_roi_height; |
| 776 | u32 vsp_fifo_dma_sel; |
| 777 | u32 h264_num_ref_frames; |
| 778 | }; |
| 779 | |
| 780 | struct hfi_vbv_hrd_bufsize { |
| 781 | u32 buffer_size; |
| 782 | }; |
| 783 | |
| 784 | struct hfi_codec_mask_supported { |
| 785 | u32 codecs; |
| 786 | u32 video_domains; |
| 787 | }; |
| 788 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 789 | struct hfi_aspect_ratio { |
| 790 | u32 aspect_width; |
| 791 | u32 aspect_height; |
| 792 | }; |
| 793 | |
| 794 | #define HFI_IFRAME_SIZE_DEFAULT (HFI_COMMON_BASE + 0x1) |
| 795 | #define HFI_IFRAME_SIZE_MEDIUM (HFI_COMMON_BASE + 0x2) |
| 796 | #define HFI_IFRAME_SIZE_HIGH (HFI_COMMON_BASE + 0x3) |
| 797 | #define HFI_IFRAME_SIZE_UNLIMITED (HFI_COMMON_BASE + 0x4) |
| 798 | struct hfi_iframe_size { |
| 799 | u32 type; |
| 800 | }; |
| 801 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 802 | |
| 803 | #define HFI_CMD_SYS_COMMON_START \ |
| 804 | (HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + HFI_CMD_START_OFFSET \ |
| 805 | + 0x0000) |
| 806 | #define HFI_CMD_SYS_INIT (HFI_CMD_SYS_COMMON_START + 0x001) |
| 807 | #define HFI_CMD_SYS_PC_PREP (HFI_CMD_SYS_COMMON_START + 0x002) |
| 808 | #define HFI_CMD_SYS_SET_RESOURCE (HFI_CMD_SYS_COMMON_START + 0x003) |
| 809 | #define HFI_CMD_SYS_RELEASE_RESOURCE (HFI_CMD_SYS_COMMON_START + 0x004) |
| 810 | #define HFI_CMD_SYS_SET_PROPERTY (HFI_CMD_SYS_COMMON_START + 0x005) |
| 811 | #define HFI_CMD_SYS_GET_PROPERTY (HFI_CMD_SYS_COMMON_START + 0x006) |
| 812 | #define HFI_CMD_SYS_SESSION_INIT (HFI_CMD_SYS_COMMON_START + 0x007) |
| 813 | #define HFI_CMD_SYS_SESSION_END (HFI_CMD_SYS_COMMON_START + 0x008) |
| 814 | #define HFI_CMD_SYS_SET_BUFFERS (HFI_CMD_SYS_COMMON_START + 0x009) |
| 815 | #define HFI_CMD_SYS_TEST_START (HFI_CMD_SYS_COMMON_START + 0x100) |
| 816 | |
| 817 | #define HFI_CMD_SESSION_COMMON_START \ |
| 818 | (HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + \ |
| 819 | HFI_CMD_START_OFFSET + 0x1000) |
| 820 | #define HFI_CMD_SESSION_SET_PROPERTY \ |
| 821 | (HFI_CMD_SESSION_COMMON_START + 0x001) |
| 822 | #define HFI_CMD_SESSION_SET_BUFFERS \ |
| 823 | (HFI_CMD_SESSION_COMMON_START + 0x002) |
| 824 | #define HFI_CMD_SESSION_GET_SEQUENCE_HEADER \ |
| 825 | (HFI_CMD_SESSION_COMMON_START + 0x003) |
| 826 | |
| 827 | #define HFI_MSG_SYS_COMMON_START \ |
| 828 | (HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + \ |
| 829 | HFI_MSG_START_OFFSET + 0x0000) |
| 830 | #define HFI_MSG_SYS_INIT_DONE (HFI_MSG_SYS_COMMON_START + 0x1) |
| 831 | #define HFI_MSG_SYS_PC_PREP_DONE (HFI_MSG_SYS_COMMON_START + 0x2) |
| 832 | #define HFI_MSG_SYS_RELEASE_RESOURCE (HFI_MSG_SYS_COMMON_START + 0x3) |
| 833 | #define HFI_MSG_SYS_DEBUG (HFI_MSG_SYS_COMMON_START + 0x4) |
| 834 | #define HFI_MSG_SYS_SESSION_INIT_DONE (HFI_MSG_SYS_COMMON_START + 0x6) |
| 835 | #define HFI_MSG_SYS_SESSION_END_DONE (HFI_MSG_SYS_COMMON_START + 0x7) |
| 836 | #define HFI_MSG_SYS_IDLE (HFI_MSG_SYS_COMMON_START + 0x8) |
| 837 | #define HFI_MSG_SYS_COV (HFI_MSG_SYS_COMMON_START + 0x9) |
| 838 | #define HFI_MSG_SYS_PROPERTY_INFO (HFI_MSG_SYS_COMMON_START + 0xA) |
| 839 | #define HFI_MSG_SESSION_SYNC_DONE (HFI_MSG_SESSION_OX_START + 0xD) |
| 840 | |
| 841 | #define HFI_MSG_SESSION_COMMON_START \ |
| 842 | (HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + \ |
| 843 | HFI_MSG_START_OFFSET + 0x1000) |
| 844 | #define HFI_MSG_EVENT_NOTIFY (HFI_MSG_SESSION_COMMON_START + 0x1) |
| 845 | #define HFI_MSG_SESSION_GET_SEQUENCE_HEADER_DONE \ |
| 846 | (HFI_MSG_SESSION_COMMON_START + 0x2) |
| 847 | |
| 848 | #define HFI_CMD_SYS_TEST_SSR (HFI_CMD_SYS_TEST_START + 0x1) |
| 849 | #define HFI_TEST_SSR_SW_ERR_FATAL 0x1 |
| 850 | #define HFI_TEST_SSR_SW_DIV_BY_ZERO 0x2 |
| 851 | #define HFI_TEST_SSR_HW_WDOG_IRQ 0x3 |
| 852 | |
| 853 | struct vidc_hal_cmd_pkt_hdr { |
| 854 | u32 size; |
| 855 | u32 packet_type; |
| 856 | }; |
| 857 | |
| 858 | struct vidc_hal_msg_pkt_hdr { |
| 859 | u32 size; |
| 860 | u32 packet; |
| 861 | }; |
| 862 | |
| 863 | struct vidc_hal_session_cmd_pkt { |
| 864 | u32 size; |
| 865 | u32 packet_type; |
| 866 | u32 session_id; |
| 867 | }; |
| 868 | |
| 869 | struct hfi_cmd_sys_init_packet { |
| 870 | u32 size; |
| 871 | u32 packet_type; |
| 872 | u32 arch_type; |
| 873 | }; |
| 874 | |
| 875 | struct hfi_cmd_sys_pc_prep_packet { |
| 876 | u32 size; |
| 877 | u32 packet_type; |
| 878 | }; |
| 879 | |
| 880 | struct hfi_cmd_sys_set_resource_packet { |
| 881 | u32 size; |
| 882 | u32 packet_type; |
| 883 | u32 resource_handle; |
| 884 | u32 resource_type; |
| 885 | u32 rg_resource_data[1]; |
| 886 | }; |
| 887 | |
| 888 | struct hfi_cmd_sys_release_resource_packet { |
| 889 | u32 size; |
| 890 | u32 packet_type; |
| 891 | u32 resource_type; |
| 892 | u32 resource_handle; |
| 893 | }; |
| 894 | |
| 895 | struct hfi_cmd_sys_set_property_packet { |
| 896 | u32 size; |
| 897 | u32 packet_type; |
| 898 | u32 num_properties; |
| 899 | u32 rg_property_data[1]; |
| 900 | }; |
| 901 | |
| 902 | struct hfi_cmd_sys_get_property_packet { |
| 903 | u32 size; |
| 904 | u32 packet_type; |
| 905 | u32 num_properties; |
| 906 | u32 rg_property_data[1]; |
| 907 | }; |
| 908 | |
| 909 | struct hfi_cmd_sys_session_init_packet { |
| 910 | u32 size; |
| 911 | u32 packet_type; |
| 912 | u32 session_id; |
| 913 | u32 session_domain; |
| 914 | u32 session_codec; |
| 915 | }; |
| 916 | |
| 917 | struct hfi_cmd_sys_session_end_packet { |
| 918 | u32 size; |
| 919 | u32 packet_type; |
| 920 | u32 session_id; |
| 921 | }; |
| 922 | |
| 923 | struct hfi_cmd_sys_set_buffers_packet { |
| 924 | u32 size; |
| 925 | u32 packet_type; |
| 926 | u32 buffer_type; |
| 927 | u32 buffer_size; |
| 928 | u32 num_buffers; |
| 929 | u32 rg_buffer_addr[1]; |
| 930 | }; |
| 931 | |
| 932 | struct hfi_cmd_session_set_property_packet { |
| 933 | u32 size; |
| 934 | u32 packet_type; |
| 935 | u32 session_id; |
| 936 | u32 num_properties; |
| 937 | u32 rg_property_data[0]; |
| 938 | }; |
| 939 | |
| 940 | struct hfi_cmd_session_set_buffers_packet { |
| 941 | u32 size; |
| 942 | u32 packet_type; |
| 943 | u32 session_id; |
| 944 | u32 buffer_type; |
| 945 | u32 buffer_size; |
| 946 | u32 extra_data_size; |
| 947 | u32 min_buffer_size; |
| 948 | u32 num_buffers; |
| 949 | u32 rg_buffer_info[1]; |
| 950 | }; |
| 951 | |
Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame] | 952 | struct hfi_cmd_session_sync_process_packet { |
| 953 | u32 size; |
| 954 | u32 packet_type; |
| 955 | u32 session_id; |
| 956 | u32 sync_id; |
| 957 | u32 rg_data[1]; |
| 958 | }; |
| 959 | |
| 960 | struct hfi_msg_event_notify_packet { |
| 961 | u32 size; |
| 962 | u32 packet_type; |
| 963 | u32 session_id; |
| 964 | u32 event_id; |
| 965 | u32 event_data1; |
| 966 | u32 event_data2; |
| 967 | u32 rg_ext_event_data[1]; |
| 968 | }; |
| 969 | |
| 970 | struct hfi_msg_release_buffer_ref_event_packet { |
| 971 | u32 packet_buffer; |
| 972 | u32 extra_data_buffer; |
| 973 | u32 output_tag; |
| 974 | }; |
| 975 | |
| 976 | struct hfi_msg_sys_init_done_packet { |
| 977 | u32 size; |
| 978 | u32 packet_type; |
| 979 | u32 error_type; |
| 980 | u32 num_properties; |
| 981 | u32 rg_property_data[1]; |
| 982 | }; |
| 983 | |
| 984 | struct hfi_msg_sys_pc_prep_done_packet { |
| 985 | u32 size; |
| 986 | u32 packet_type; |
| 987 | u32 error_type; |
| 988 | }; |
| 989 | |
| 990 | struct hfi_msg_sys_release_resource_done_packet { |
| 991 | u32 size; |
| 992 | u32 packet_type; |
| 993 | u32 resource_handle; |
| 994 | u32 error_type; |
| 995 | }; |
| 996 | |
| 997 | struct hfi_msg_sys_session_init_done_packet { |
| 998 | u32 size; |
| 999 | u32 packet_type; |
| 1000 | u32 session_id; |
| 1001 | u32 error_type; |
| 1002 | u32 num_properties; |
| 1003 | u32 rg_property_data[1]; |
| 1004 | }; |
| 1005 | |
| 1006 | struct hfi_msg_sys_session_end_done_packet { |
| 1007 | u32 size; |
| 1008 | u32 packet_type; |
| 1009 | u32 session_id; |
| 1010 | u32 error_type; |
| 1011 | }; |
| 1012 | |
| 1013 | struct hfi_msg_session_get_sequence_header_done_packet { |
| 1014 | u32 size; |
| 1015 | u32 packet_type; |
| 1016 | u32 session_id; |
| 1017 | u32 error_type; |
| 1018 | u32 header_len; |
| 1019 | u32 sequence_header; |
| 1020 | }; |
| 1021 | |
| 1022 | struct hfi_msg_sys_debug_packet { |
| 1023 | u32 size; |
| 1024 | u32 packet_type; |
| 1025 | u32 msg_type; |
| 1026 | u32 msg_size; |
| 1027 | u32 time_stamp_hi; |
| 1028 | u32 time_stamp_lo; |
| 1029 | u8 rg_msg_data[1]; |
| 1030 | }; |
| 1031 | |
| 1032 | struct hfi_msg_sys_coverage_packet { |
| 1033 | u32 size; |
| 1034 | u32 packet_type; |
| 1035 | u32 msg_size; |
| 1036 | u32 time_stamp_hi; |
| 1037 | u32 time_stamp_lo; |
| 1038 | u8 rg_msg_data[1]; |
| 1039 | }; |
| 1040 | |
| 1041 | enum HFI_VENUS_QTBL_STATUS { |
| 1042 | HFI_VENUS_QTBL_DISABLED = 0x00, |
| 1043 | HFI_VENUS_QTBL_ENABLED = 0x01, |
| 1044 | HFI_VENUS_QTBL_INITIALIZING = 0x02, |
| 1045 | HFI_VENUS_QTBL_DEINITIALIZING = 0x03 |
| 1046 | }; |
| 1047 | |
| 1048 | enum HFI_VENUS_CTRL_INIT_STATUS { |
| 1049 | HFI_VENUS_CTRL_NOT_INIT = 0x0, |
| 1050 | HFI_VENUS_CTRL_READY = 0x1, |
| 1051 | HFI_VENUS_CTRL_ERROR_FATAL = 0x2 |
| 1052 | }; |
| 1053 | |
| 1054 | struct hfi_sfr_struct { |
| 1055 | u32 bufSize; |
| 1056 | u8 rg_data[1]; |
| 1057 | }; |
| 1058 | |
| 1059 | struct hfi_cmd_sys_test_ssr_packet { |
| 1060 | u32 size; |
| 1061 | u32 packet_type; |
| 1062 | u32 trigger_type; |
| 1063 | }; |
| 1064 | #endif |