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 #ifndef __DC_MCIF_WB_H__
0026 #define __DC_MCIF_WB_H__
0027
0028 #include "dc_hw_types.h"
0029
0030
0031 enum mmhubbub_wbif_mode {
0032 PACKED_444 = 0,
0033 PACKED_444_FP16 = 1,
0034 PLANAR_420_8BPC = 2,
0035 PLANAR_420_10BPC = 3
0036 };
0037
0038 struct mcif_arb_params {
0039
0040 unsigned int time_per_pixel;
0041 unsigned int cli_watermark[4];
0042 unsigned int pstate_watermark[4];
0043 unsigned int arbitration_slice;
0044 unsigned int slice_lines;
0045 unsigned int max_scaled_time;
0046 unsigned int dram_speed_change_duration;
0047 };
0048
0049 struct mcif_irq_params {
0050 unsigned int sw_int_en;
0051 unsigned int sw_slice_int_en;
0052 unsigned int sw_overrun_int_en;
0053 unsigned int vce_int_en;
0054 unsigned int vce_slice_int_en;
0055 };
0056
0057
0058
0059 struct mcif_wb_frame_dump_info {
0060 unsigned int size;
0061 unsigned int width;
0062 unsigned int height;
0063 unsigned int luma_pitch;
0064 unsigned int chroma_pitch;
0065 enum dwb_scaler_mode format;
0066 };
0067
0068 struct mcif_wb {
0069 const struct mcif_wb_funcs *funcs;
0070 struct dc_context *ctx;
0071 int inst;
0072 };
0073
0074 struct mcif_wb_funcs {
0075
0076 void (*warmup_mcif)(
0077 struct mcif_wb *mcif_wb,
0078 struct mcif_warmup_params *params);
0079 void (*enable_mcif)(struct mcif_wb *mcif_wb);
0080
0081 void (*disable_mcif)(struct mcif_wb *mcif_wb);
0082
0083 void (*config_mcif_buf)(
0084 struct mcif_wb *mcif_wb,
0085 struct mcif_buf_params *params,
0086 unsigned int dest_height);
0087
0088 void (*config_mcif_arb)(
0089 struct mcif_wb *mcif_wb,
0090 struct mcif_arb_params *params);
0091
0092 void (*config_mcif_irq)(
0093 struct mcif_wb *mcif_wb,
0094 struct mcif_irq_params *params);
0095
0096 void (*dump_frame)(
0097 struct mcif_wb *mcif_wb,
0098 struct mcif_buf_params *mcif_params,
0099 enum dwb_scaler_mode out_format,
0100 unsigned int dest_width,
0101 unsigned int dest_height,
0102 struct mcif_wb_frame_dump_info *dump_info,
0103 unsigned char *luma_buffer,
0104 unsigned char *chroma_buffer,
0105 unsigned char *dest_luma_buffer,
0106 unsigned char *dest_chroma_buffer);
0107 };
0108
0109 #endif