2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #include "ia_css_types.h"
16 #include "sh_css_defs.h"
18 #ifndef IA_CSS_NO_DEBUG
19 /* FIXME: See BZ 4427 */
20 #include "ia_css_debug.h"
23 #include "ia_css_macc1_5.host.h"
25 const struct ia_css_macc1_5_config default_macc1_5_config = {
30 ia_css_macc1_5_encode(
31 struct sh_css_isp_macc1_5_params *to,
32 const struct ia_css_macc1_5_config *from,
40 ia_css_macc1_5_vmem_encode(
41 struct sh_css_isp_macc1_5_vmem_params *params,
42 const struct ia_css_macc1_5_table *from,
45 unsigned int i, j, k, idx;
46 unsigned int idx_map[] = {
47 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8};
51 for (k = 0; k < 4; k++)
52 for (i = 0; i < IA_CSS_MACC_NUM_AXES; i++) {
53 idx = idx_map[i] + (k * IA_CSS_MACC_NUM_AXES);
56 params->data[0][(idx)] = from->data[j];
57 params->data[1][(idx)] = from->data[j + 1];
58 params->data[2][(idx)] = from->data[j + 2];
59 params->data[3][(idx)] = from->data[j + 3];
64 #ifndef IA_CSS_NO_DEBUG
66 ia_css_macc1_5_debug_dtrace(
67 const struct ia_css_macc1_5_config *config,
70 ia_css_debug_dtrace(level,