0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef __DAL_IPP_H__
0027 #define __DAL_IPP_H__
0028
0029 #include "hw_shared.h"
0030 #include "dc_hw_types.h"
0031
0032 #define MAXTRIX_COEFFICIENTS_NUMBER 12
0033 #define MAXTRIX_COEFFICIENTS_WRAP_NUMBER (MAXTRIX_COEFFICIENTS_NUMBER + 4)
0034 #define MAX_OVL_MATRIX_COUNT 12
0035
0036
0037 struct input_pixel_processor {
0038 struct dc_context *ctx;
0039 unsigned int inst;
0040 const struct ipp_funcs *funcs;
0041 };
0042
0043 enum ipp_prescale_mode {
0044 IPP_PRESCALE_MODE_BYPASS,
0045 IPP_PRESCALE_MODE_FIXED_SIGNED,
0046 IPP_PRESCALE_MODE_FLOAT_SIGNED,
0047 IPP_PRESCALE_MODE_FIXED_UNSIGNED,
0048 IPP_PRESCALE_MODE_FLOAT_UNSIGNED
0049 };
0050
0051 struct ipp_prescale_params {
0052 enum ipp_prescale_mode mode;
0053 uint16_t bias;
0054 uint16_t scale;
0055 };
0056
0057
0058
0059 enum ovl_color_space {
0060 OVL_COLOR_SPACE_UNKNOWN = 0,
0061 OVL_COLOR_SPACE_RGB,
0062 OVL_COLOR_SPACE_YUV601,
0063 OVL_COLOR_SPACE_YUV709
0064 };
0065
0066
0067 struct ipp_funcs {
0068
0069
0070 void (*ipp_cursor_set_position)(
0071 struct input_pixel_processor *ipp,
0072 const struct dc_cursor_position *position,
0073 const struct dc_cursor_mi_param *param);
0074
0075 void (*ipp_cursor_set_attributes)(
0076 struct input_pixel_processor *ipp,
0077 const struct dc_cursor_attributes *attributes);
0078
0079
0080
0081
0082 void (*ipp_full_bypass)(
0083 struct input_pixel_processor *ipp);
0084
0085
0086 void (*ipp_setup)(
0087 struct input_pixel_processor *ipp,
0088 enum surface_pixel_format format,
0089 enum expansion_mode mode,
0090 struct dc_csc_transform input_csc_color_matrix,
0091 enum dc_color_space input_color_space);
0092
0093
0094 void (*ipp_program_prescale)(
0095 struct input_pixel_processor *ipp,
0096 struct ipp_prescale_params *params);
0097
0098 void (*ipp_program_input_lut)(
0099 struct input_pixel_processor *ipp,
0100 const struct dc_gamma *gamma);
0101
0102
0103 void (*ipp_set_degamma)(
0104 struct input_pixel_processor *ipp,
0105 enum ipp_degamma_mode mode);
0106
0107 void (*ipp_program_degamma_pwl)(
0108 struct input_pixel_processor *ipp,
0109 const struct pwl_params *params);
0110
0111 void (*ipp_destroy)(struct input_pixel_processor **ipp);
0112 };
0113
0114 #endif