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 _MSM_DRM_PP_H_ 20 #define _MSM_DRM_PP_H_ 21 #include <linux/types.h> 22 struct drm_msm_pcc_coeff { 23 __u32 c; 24 __u32 r; 25 __u32 g; 26 __u32 b; 27 __u32 rg; 28 __u32 gb; 29 __u32 rb; 30 __u32 rgb; 31 }; 32 #define DRM_MSM_PCC3 33 struct drm_msm_pcc { 34 __u64 flags; 35 struct drm_msm_pcc_coeff r; 36 struct drm_msm_pcc_coeff g; 37 struct drm_msm_pcc_coeff b; 38 __u32 r_rr; 39 __u32 r_gg; 40 __u32 r_bb; 41 __u32 g_rr; 42 __u32 g_gg; 43 __u32 g_bb; 44 __u32 b_rr; 45 __u32 b_gg; 46 __u32 b_bb; 47 }; 48 #define PA_VLUT_SIZE 256 49 struct drm_msm_pa_vlut { 50 __u64 flags; 51 __u32 val[PA_VLUT_SIZE]; 52 }; 53 #define PA_HSIC_HUE_ENABLE (1 << 0) 54 #define PA_HSIC_SAT_ENABLE (1 << 1) 55 #define PA_HSIC_VAL_ENABLE (1 << 2) 56 #define PA_HSIC_CONT_ENABLE (1 << 3) 57 #define DRM_MSM_PA_HSIC 58 struct drm_msm_pa_hsic { 59 __u64 flags; 60 __u32 hue; 61 __u32 saturation; 62 __u32 value; 63 __u32 contrast; 64 }; 65 #define MEMCOL_PROT_HUE (1 << 0) 66 #define MEMCOL_PROT_SAT (1 << 1) 67 #define MEMCOL_PROT_VAL (1 << 2) 68 #define MEMCOL_PROT_CONT (1 << 3) 69 #define MEMCOL_PROT_SIXZONE (1 << 4) 70 #define MEMCOL_PROT_BLEND (1 << 5) 71 #define DRM_MSM_MEMCOL 72 struct drm_msm_memcol { 73 __u64 prot_flags; 74 __u32 color_adjust_p0; 75 __u32 color_adjust_p1; 76 __u32 color_adjust_p2; 77 __u32 blend_gain; 78 __u32 sat_hold; 79 __u32 val_hold; 80 __u32 hue_region; 81 __u32 sat_region; 82 __u32 val_region; 83 }; 84 #define DRM_MSM_SIXZONE 85 #define SIXZONE_LUT_SIZE 384 86 #define SIXZONE_HUE_ENABLE (1 << 0) 87 #define SIXZONE_SAT_ENABLE (1 << 1) 88 #define SIXZONE_VAL_ENABLE (1 << 2) 89 struct drm_msm_sixzone_curve { 90 __u32 p1; 91 __u32 p0; 92 }; 93 struct drm_msm_sixzone { 94 __u64 flags; 95 __u32 threshold; 96 __u32 adjust_p0; 97 __u32 adjust_p1; 98 __u32 sat_hold; 99 __u32 val_hold; 100 struct drm_msm_sixzone_curve curve[SIXZONE_LUT_SIZE]; 101 }; 102 #define GAMUT_3D_MODE_17 1 103 #define GAMUT_3D_MODE_5 2 104 #define GAMUT_3D_MODE_13 3 105 #define GAMUT_3D_MODE17_TBL_SZ 1229 106 #define GAMUT_3D_MODE5_TBL_SZ 32 107 #define GAMUT_3D_MODE13_TBL_SZ 550 108 #define GAMUT_3D_SCALE_OFF_SZ 16 109 #define GAMUT_3D_SCALEB_OFF_SZ 12 110 #define GAMUT_3D_TBL_NUM 4 111 #define GAMUT_3D_SCALE_OFF_TBL_NUM 3 112 #define GAMUT_3D_MAP_EN (1 << 0) 113 struct drm_msm_3d_col { 114 __u32 c2_c1; 115 __u32 c0; 116 }; 117 struct drm_msm_3d_gamut { 118 __u64 flags; 119 __u32 mode; 120 __u32 scale_off[GAMUT_3D_SCALE_OFF_TBL_NUM][GAMUT_3D_SCALE_OFF_SZ]; 121 struct drm_msm_3d_col col[GAMUT_3D_TBL_NUM][GAMUT_3D_MODE17_TBL_SZ]; 122 }; 123 #define PGC_TBL_LEN 512 124 #define PGC_8B_ROUND (1 << 0) 125 struct drm_msm_pgc_lut { 126 __u64 flags; 127 __u32 c0[PGC_TBL_LEN]; 128 __u32 c1[PGC_TBL_LEN]; 129 __u32 c2[PGC_TBL_LEN]; 130 }; 131 #define IGC_TBL_LEN 256 132 #define IGC_DITHER_ENABLE (1 << 0) 133 struct drm_msm_igc_lut { 134 __u64 flags; 135 __u32 c0[IGC_TBL_LEN]; 136 __u32 c1[IGC_TBL_LEN]; 137 __u32 c2[IGC_TBL_LEN]; 138 __u32 strength; 139 __u32 c0_last; 140 __u32 c1_last; 141 __u32 c2_last; 142 }; 143 #define LAST_LUT 2 144 #define HIST_V_SIZE 256 145 struct drm_msm_hist { 146 __u64 flags; 147 __u32 data[HIST_V_SIZE]; 148 }; 149 #define AD4_LUT_GRP0_SIZE 33 150 #define AD4_LUT_GRP1_SIZE 32 151 struct drm_msm_ad4_init { 152 __u32 init_param_001[AD4_LUT_GRP0_SIZE]; 153 __u32 init_param_002[AD4_LUT_GRP0_SIZE]; 154 __u32 init_param_003[AD4_LUT_GRP0_SIZE]; 155 __u32 init_param_004[AD4_LUT_GRP0_SIZE]; 156 __u32 init_param_005[AD4_LUT_GRP1_SIZE]; 157 __u32 init_param_006[AD4_LUT_GRP1_SIZE]; 158 __u32 init_param_007[AD4_LUT_GRP0_SIZE]; 159 __u32 init_param_008[AD4_LUT_GRP0_SIZE]; 160 __u32 init_param_009; 161 __u32 init_param_010; 162 __u32 init_param_011; 163 __u32 init_param_012; 164 __u32 init_param_013; 165 __u32 init_param_014; 166 __u32 init_param_015; 167 __u32 init_param_016; 168 __u32 init_param_017; 169 __u32 init_param_018; 170 __u32 init_param_019; 171 __u32 init_param_020; 172 __u32 init_param_021; 173 __u32 init_param_022; 174 __u32 init_param_023; 175 __u32 init_param_024; 176 __u32 init_param_025; 177 __u32 init_param_026; 178 __u32 init_param_027; 179 __u32 init_param_028; 180 __u32 init_param_029; 181 __u32 init_param_030; 182 __u32 init_param_031; 183 __u32 init_param_032; 184 __u32 init_param_033; 185 __u32 init_param_034; 186 __u32 init_param_035; 187 __u32 init_param_036; 188 __u32 init_param_037; 189 __u32 init_param_038; 190 __u32 init_param_039; 191 __u32 init_param_040; 192 __u32 init_param_041; 193 __u32 init_param_042; 194 __u32 init_param_043; 195 __u32 init_param_044; 196 __u32 init_param_045; 197 __u32 init_param_046; 198 __u32 init_param_047; 199 __u32 init_param_048; 200 __u32 init_param_049; 201 __u32 init_param_050; 202 __u32 init_param_051; 203 __u32 init_param_052; 204 __u32 init_param_053; 205 __u32 init_param_054; 206 __u32 init_param_055; 207 __u32 init_param_056; 208 __u32 init_param_057; 209 __u32 init_param_058; 210 __u32 init_param_059; 211 __u32 init_param_060; 212 __u32 init_param_061; 213 __u32 init_param_062; 214 __u32 init_param_063; 215 __u32 init_param_064; 216 __u32 init_param_065; 217 __u32 init_param_066; 218 __u32 init_param_067; 219 __u32 init_param_068; 220 __u32 init_param_069; 221 __u32 init_param_070; 222 __u32 init_param_071; 223 __u32 init_param_072; 224 __u32 init_param_073; 225 __u32 init_param_074; 226 __u32 init_param_075; 227 }; 228 struct drm_msm_ad4_cfg { 229 __u32 cfg_param_001; 230 __u32 cfg_param_002; 231 __u32 cfg_param_003; 232 __u32 cfg_param_004; 233 __u32 cfg_param_005; 234 __u32 cfg_param_006; 235 __u32 cfg_param_007; 236 __u32 cfg_param_008; 237 __u32 cfg_param_009; 238 __u32 cfg_param_010; 239 __u32 cfg_param_011; 240 __u32 cfg_param_012; 241 __u32 cfg_param_013; 242 __u32 cfg_param_014; 243 __u32 cfg_param_015; 244 __u32 cfg_param_016; 245 __u32 cfg_param_017; 246 __u32 cfg_param_018; 247 __u32 cfg_param_019; 248 __u32 cfg_param_020; 249 __u32 cfg_param_021; 250 __u32 cfg_param_022; 251 __u32 cfg_param_023; 252 __u32 cfg_param_024; 253 __u32 cfg_param_025; 254 __u32 cfg_param_026; 255 __u32 cfg_param_027; 256 __u32 cfg_param_028; 257 __u32 cfg_param_029; 258 __u32 cfg_param_030; 259 __u32 cfg_param_031; 260 __u32 cfg_param_032; 261 __u32 cfg_param_033; 262 __u32 cfg_param_034; 263 __u32 cfg_param_035; 264 __u32 cfg_param_036; 265 __u32 cfg_param_037; 266 __u32 cfg_param_038; 267 __u32 cfg_param_039; 268 __u32 cfg_param_040; 269 __u32 cfg_param_041; 270 __u32 cfg_param_042; 271 __u32 cfg_param_043; 272 __u32 cfg_param_044; 273 __u32 cfg_param_045; 274 __u32 cfg_param_046; 275 __u32 cfg_param_047; 276 __u32 cfg_param_048; 277 __u32 cfg_param_049; 278 __u32 cfg_param_050; 279 __u32 cfg_param_051; 280 __u32 cfg_param_052; 281 __u32 cfg_param_053; 282 }; 283 #define DITHER_MATRIX_SZ 16 284 struct drm_msm_dither { 285 __u64 flags; 286 __u32 temporal_en; 287 __u32 c0_bitdepth; 288 __u32 c1_bitdepth; 289 __u32 c2_bitdepth; 290 __u32 c3_bitdepth; 291 __u32 matrix[DITHER_MATRIX_SZ]; 292 }; 293 #define DRM_MSM_PA_DITHER 294 struct drm_msm_pa_dither { 295 __u64 flags; 296 __u32 strength; 297 __u32 offset_en; 298 __u32 matrix[DITHER_MATRIX_SZ]; 299 }; 300 #define DRM_MSM_AD4_ROI 301 struct drm_msm_ad4_roi_cfg { 302 __u32 h_x; 303 __u32 h_y; 304 __u32 v_x; 305 __u32 v_y; 306 __u32 factor_in; 307 __u32 factor_out; 308 }; 309 #define DRM_MSM_AD4_MANUAL_STRENGTH 310 struct drm_msm_ad4_manual_str_cfg { 311 __u32 in_str; 312 __u32 out_str; 313 }; 314 #endif 315