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 #include "dcn10/dcn10_cm_common.h"
0027
0028 #ifndef __DAL_DCN30_CM_COMMON_H__
0029 #define __DAL_DCN30_CM_COMMON_H__
0030
0031 #define TF_HELPER_REG_FIELD_LIST_DCN3(type) \
0032 TF_HELPER_REG_FIELD_LIST(type);\
0033 type field_region_start_base;\
0034 type field_offset
0035
0036 struct DCN3_xfer_func_shift {
0037 TF_HELPER_REG_FIELD_LIST_DCN3(uint8_t);
0038 };
0039
0040 struct DCN3_xfer_func_mask {
0041 TF_HELPER_REG_FIELD_LIST_DCN3(uint32_t);
0042 };
0043
0044 struct dcn3_xfer_func_reg {
0045 struct DCN3_xfer_func_shift shifts;
0046 struct DCN3_xfer_func_mask masks;
0047
0048 TF_HELPER_REG_LIST;
0049 uint32_t offset_b;
0050 uint32_t offset_g;
0051 uint32_t offset_r;
0052 uint32_t start_base_cntl_b;
0053 uint32_t start_base_cntl_g;
0054 uint32_t start_base_cntl_r;
0055 };
0056
0057 void cm_helper_program_gamcor_xfer_func(
0058 struct dc_context *ctx,
0059 const struct pwl_params *params,
0060 const struct dcn3_xfer_func_reg *reg);
0061
0062 bool cm3_helper_translate_curve_to_hw_format(
0063 const struct dc_transfer_func *output_tf,
0064 struct pwl_params *lut_params, bool fixpoint);
0065
0066 bool cm3_helper_translate_curve_to_degamma_hw_format(
0067 const struct dc_transfer_func *output_tf,
0068 struct pwl_params *lut_params);
0069
0070 bool cm3_helper_convert_to_custom_float(
0071 struct pwl_result_data *rgb_resulted,
0072 struct curve_points3 *corner_points,
0073 uint32_t hw_points_num,
0074 bool fixpoint);
0075
0076 bool is_rgb_equal(const struct pwl_result_data *rgb, uint32_t num);
0077
0078 #endif