Home | History | Annotate | Download | only in fb

Lines Matching refs:tokens

71 int HWInfo::ParseString(const char *input, char *tokens[], const uint32_t max_token,
81 tokens[index++] = tmp_token;
125 char *tokens[max_count] = { NULL };
128 if (!ParseString(line.c_str(), tokens, max_count, ":, =\n", &token_count)) {
129 if (!strncmp(tokens[0], "default_pipe", strlen("default_pipe"))) {
130 bw_info->pipe_bw_limit[kBwDefault] = UINT32(atoi(tokens[1]));
131 } else if (!strncmp(tokens[0], "camera_pipe", strlen("camera_pipe"))) {
132 bw_info->pipe_bw_limit[kBwCamera] = UINT32(atoi(tokens[1]));
133 } else if (!strncmp(tokens[0], "vflip_pipe", strlen("vflip_pipe"))) {
134 bw_info->pipe_bw_limit[kBwVFlip] = UINT32(atoi(tokens[1]));
135 } else if (!strncmp(tokens[0], "hflip_pipe", strlen("hflip_pipe"))) {
136 bw_info->pipe_bw_limit[kBwHFlip] = UINT32(atoi(tokens[1]));
137 } else if (!strncmp(tokens[0], "default", strlen("default"))) {
138 bw_info->total_bw_limit[kBwDefault] = UINT32(atoi(tokens[1]));
139 } else if (!strncmp(tokens[0], "camera", strlen("camera"))) {
140 bw_info->total_bw_limit[kBwCamera] = UINT32(atoi(tokens[1]));
141 } else if (!strncmp(tokens[0], "vflip", strlen("vflip"))) {
142 bw_info->total_bw_limit[kBwVFlip] = UINT32(atoi(tokens[1]));
143 } else if (!strncmp(tokens[0], "hflip", strlen("hflip"))) {
144 bw_info->total_bw_limit[kBwHFlip] = UINT32(atoi(tokens[1]));
167 char *tokens[max_count] = { NULL };
171 if (!ParseString(line.c_str(), tokens, max_count, ":, =\n", &token_count)) {
172 if (!strncmp(tokens[0], "hw_rev", strlen("hw_rev"))) {
173 hw_resource->hw_revision = UINT32(atoi(tokens[1])); // HW Rev, v1/v2
174 } else if (!strncmp(tokens[0], "rot_input_fmts", strlen("rot_input_fmts"))) {
175 ParseFormats(&tokens[1], (token_count - 1), kHWRotatorInput, hw_resource);
176 } else if (!strncmp(tokens[0], "rot_output_fmts", strlen("rot_output_fmts"))) {
177 ParseFormats(&tokens[1], (token_count - 1), kHWRotatorOutput, hw_resource);
178 } else if (!strncmp(tokens[0], "wb_output_fmts", strlen("wb_output_fmts"))) {
179 ParseFormats(&tokens[1], (token_count - 1), kHWWBIntfOutput, hw_resource);
180 } else if (!strncmp(tokens[0], "blending_stages", strlen("blending_stages"))) {
181 hw_resource->num_blending_stages = UINT8(atoi(tokens[1]));
182 } else if (!strncmp(tokens[0], "max_downscale_ratio", strlen("max_downscale_ratio"))) {
183 hw_resource->max_scale_down = UINT32(atoi(tokens[1]));
184 } else if (!strncmp(tokens[0], "max_upscale_ratio", strlen("max_upscale_ratio"))) {
185 hw_resource->max_scale_up = UINT32(atoi(tokens[1]));
186 } else if (!strncmp(tokens[0], "max_bandwidth_low", strlen("max_bandwidth_low"))) {
187 hw_resource->max_bandwidth_low = UINT64(atol(tokens[1]));
188 } else if (!strncmp(tokens[0], "max_bandwidth_high", strlen("max_bandwidth_high"))) {
189 hw_resource->max_bandwidth_high = UINT64(atol(tokens[1]));
190 } else if (!strncmp(tokens[0], "max_mixer_width", strlen("max_mixer_width"))) {
191 hw_resource->max_mixer_width = UINT32(atoi(tokens[1]));
192 } else if (!strncmp(tokens[0], "max_pipe_width", strlen("max_pipe_width"))) {
193 hw_resource->max_pipe_width = UINT32(atoi(tokens[1]));
194 } else if (!strncmp(tokens[0], "max_cursor_size", strlen("max_cursor_size"))) {
195 hw_resource->max_cursor_size = UINT32(atoi(tokens[1]));
196 } else if (!strncmp(tokens[0], "max_pipe_bw", strlen("max_pipe_bw"))) {
197 hw_resource->max_pipe_bw = UINT32(atoi(tokens[1]));
198 } else if (!strncmp(tokens[0], "max_mdp_clk", strlen("max_mdp_clk"))) {
199 hw_resource->max_sde_clk = UINT32(atoi(tokens[1]));
200 } else if (!strncmp(tokens[0], "clk_fudge_factor", strlen("clk_fudge_factor"))) {
201 hw_resource->clk_fudge_factor = FLOAT(atoi(tokens[1])) / FLOAT(atoi(tokens[2]));
202 } else if (!strncmp(tokens[0], "fmt_mt_nv12_factor", strlen("fmt_mt_nv12_factor"))) {
203 hw_resource->macrotile_nv12_factor = UINT32(atoi(tokens[1]));
204 } else if (!strncmp(tokens[0], "fmt_mt_factor", strlen("fmt_mt_factor"))) {
205 hw_resource->macrotile_factor = UINT32(atoi(tokens[1]));
206 } else if (!strncmp(tokens[0], "fmt_linear_factor", strlen("fmt_linear_factor"))) {
207 hw_resource->linear_factor = UINT32(atoi(tokens[1]));
208 } else if (!strncmp(tokens[0], "scale_factor", strlen("scale_factor"))) {
209 hw_resource->scale_factor = UINT32(atoi(tokens[1]));
210 } else if (!strncmp(tokens[0], "xtra_ff_factor", strlen("xtra_ff_factor"))) {
211 hw_resource->extra_fudge_factor = UINT32(atoi(tokens[1]));
212 } else if (!strncmp(tokens[0], "amortizable_threshold", strlen("amortizable_threshold"))) {
213 hw_resource->amortizable_threshold = UINT32(atoi(tokens[1]));
214 } else if (!strncmp(tokens[0], "system_overhead_lines", strlen("system_overhead_lines"))) {
215 hw_resource->system_overhead_lines = UINT32(atoi(tokens[1]));
216 } else if (!strncmp(tokens[0], "wb_intf_index", strlen("wb_intf_index"))) {
217 hw_resource->writeback_index = UINT32(atoi(tokens[1]));
218 } else if (!strncmp(tokens[0], "dest_scaler_count", strlen("dest_scaler_count"))) {
219 hw_resource->hw_dest_scalar_info.count = UINT32(atoi(tokens[1]));
220 } else if (!strncmp(tokens[0], "max_dest_scale_up", strlen("max_dest_scale_up"))) {
221 hw_resource->hw_dest_scalar_info.max_scale_up = UINT32(atoi(tokens[1]));
222 } else if (!strncmp(tokens[0], "max_dest_scaler_input_width",
224 hw_resource->hw_dest_scalar_info.max_input_width = UINT32(atoi(tokens[1]));
225 } else if (!strncmp(tokens[0], "max_dest_scaler_output_width",
227 hw_resource->hw_dest_scalar_info.max_output_width = UINT32(atoi(tokens[1]));
228 } else if (!strncmp(tokens[0], "features", strlen("features"))) {
230 if (!strncmp(tokens[i], "bwc", strlen("bwc"))) {
232 } else if (!strncmp(tokens[i], "ubwc", strlen("ubwc"))) {
234 } else if (!strncmp(tokens[i], "decimation", strlen("decimation"))) {
236 } else if (!strncmp(tokens[i], "tile_format", strlen("tile_format"))) {
238 } else if (!strncmp(tokens[i], "src_split", strlen("src_split"))) {
240 } else if (!strncmp(tokens[i], "non_scalar_rgb", strlen("non_scalar_rgb"))) {
242 } else if (!strncmp(tokens[i], "perf_calc", strlen("perf_calc"))) {
244 } else if (!strncmp(tokens[i], "dynamic_bw_limit", strlen("dynamic_bw_limit"))) {
246 } else if (!strncmp(tokens[i], "separate_rotator", strlen("separate_rotator"))) {
248 } else if (!strncmp(tokens[i], "qseed3", strlen("qseed3"))) {
250 } else if (!strncmp(tokens[i], "concurrent_writeback", strlen("concurrent_writeback"))) {
254 } else if (!strncmp(tokens[0], "pipe_count", strlen("pipe_count"))) {
255 uint32_t pipe_count = UINT8(atoi(tokens[1]));
258 if (!ParseString(line.c_str(), tokens, max_count, ": =\n", &token_count)) {
262 if (!strncmp(tokens[j], "pipe_type", strlen("pipe_type"))) {
263 if (!strncmp(tokens[j+1], "vig", strlen("vig"))) {
266 } else if (!strncmp(tokens[j+1], "rgb", strlen("rgb"))) {
269 } else if (!strncmp(tokens[j+1], "dma", strlen("dma"))) {
272 } else if (!strncmp(tokens[j+1], "cursor", strlen("cursor"))) {
276 } else if (!strncmp(tokens[j], "pipe_ndx", strlen("pipe_ndx"))) {
277 pipe_caps.id = UINT32(atoi(tokens[j+1]));
278 } else if (!strncmp(tokens[j], "rects", strlen("rects"))) {
279 pipe_caps.max_rects = UINT32(atoi(tokens[j+1]));
280 } else if (!strncmp(tokens[j], "fmts_supported", strlen("fmts_supported"))) {
283 if (!ParseString(tokens[j+1], tokens_fmt, max_count, ",\n", &token_fmt_count)) {
370 char *tokens[max_count] = { NULL };
375 if (!ParseString(line.c_str(), tokens, max_count, ":, =\n", &token_count)) {
376 if (!strncmp(tokens[0], "wb_count", strlen("wb_count"))) {
377 hw_resource->hw_rot_info.num_rotator = UINT8(atoi(tokens[1]));
379 } else if (!strncmp(tokens[0], "downscale", strlen("downscale"))) {
380 hw_resource->hw_rot_info.has_downscale = UINT8(atoi(tokens[1]));
475 void HWInfo::ParseFormats(char *tokens[], uint32_t token_count, HWSubBlockType sub_blk_type,
483 format_supported[i] = UINT8(atoi(tokens[i]));