1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26#ifndef __DAL_IPP_H__
27#define __DAL_IPP_H__
28
29#include "hw_shared.h"
30#include "dc_hw_types.h"
31
32#define MAXTRIX_COEFFICIENTS_NUMBER 12
33#define MAXTRIX_COEFFICIENTS_WRAP_NUMBER (MAXTRIX_COEFFICIENTS_NUMBER + 4)
34#define MAX_OVL_MATRIX_COUNT 12
35
36
37struct input_pixel_processor {
38 struct dc_context *ctx;
39 unsigned int inst;
40 const struct ipp_funcs *funcs;
41};
42
43enum ipp_prescale_mode {
44 IPP_PRESCALE_MODE_BYPASS,
45 IPP_PRESCALE_MODE_FIXED_SIGNED,
46 IPP_PRESCALE_MODE_FLOAT_SIGNED,
47 IPP_PRESCALE_MODE_FIXED_UNSIGNED,
48 IPP_PRESCALE_MODE_FLOAT_UNSIGNED
49};
50
51struct ipp_prescale_params {
52 enum ipp_prescale_mode mode;
53 uint16_t bias;
54 uint16_t scale;
55};
56
57
58
59enum ovl_color_space {
60 OVL_COLOR_SPACE_UNKNOWN = 0,
61 OVL_COLOR_SPACE_RGB,
62 OVL_COLOR_SPACE_YUV601,
63 OVL_COLOR_SPACE_YUV709
64};
65
66
67struct ipp_funcs {
68
69
70 void (*ipp_cursor_set_position)(
71 struct input_pixel_processor *ipp,
72 const struct dc_cursor_position *position,
73 const struct dc_cursor_mi_param *param);
74
75 void (*ipp_cursor_set_attributes)(
76 struct input_pixel_processor *ipp,
77 const struct dc_cursor_attributes *attributes);
78
79
80
81
82 void (*ipp_full_bypass)(
83 struct input_pixel_processor *ipp);
84
85
86 void (*ipp_setup)(
87 struct input_pixel_processor *ipp,
88 enum surface_pixel_format format,
89 enum expansion_mode mode,
90 struct dc_csc_transform input_csc_color_matrix,
91 enum dc_color_space input_color_space);
92
93
94 void (*ipp_program_prescale)(
95 struct input_pixel_processor *ipp,
96 struct ipp_prescale_params *params);
97
98 void (*ipp_program_input_lut)(
99 struct input_pixel_processor *ipp,
100 const struct dc_gamma *gamma);
101
102
103 void (*ipp_set_degamma)(
104 struct input_pixel_processor *ipp,
105 enum ipp_degamma_mode mode);
106
107 void (*ipp_program_degamma_pwl)(
108 struct input_pixel_processor *ipp,
109 const struct pwl_params *params);
110
111 void (*ipp_destroy)(struct input_pixel_processor **ipp);
112};
113
114#endif
115