1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2, as published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 * more details. 14 */ 15 16 #include "ia_css_types.h" 17 #include "sh_css_defs.h" 18 19 #ifndef IA_CSS_NO_DEBUG 20 /* FIXME: See BZ 4427 */ 21 #include "ia_css_debug.h" 22 #endif 23 24 #include "ia_css_macc1_5.host.h" 25 26 const struct ia_css_macc1_5_config default_macc1_5_config = { 27 1 28 }; 29 30 void 31 ia_css_macc1_5_encode( 32 struct sh_css_isp_macc1_5_params *to, 33 const struct ia_css_macc1_5_config *from, 34 unsigned int size) 35 { 36 (void)size; 37 to->exp = from->exp; 38 } 39 40 void 41 ia_css_macc1_5_vmem_encode( 42 struct sh_css_isp_macc1_5_vmem_params *params, 43 const struct ia_css_macc1_5_table *from, 44 unsigned int size) 45 { 46 unsigned int i, j, k, idx; 47 unsigned int idx_map[] = { 48 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8 49 }; 50 51 (void)size; 52 53 for (k = 0; k < 4; k++) 54 for (i = 0; i < IA_CSS_MACC_NUM_AXES; i++) { 55 idx = idx_map[i] + (k * IA_CSS_MACC_NUM_AXES); 56 j = 4 * i; 57 58 params->data[0][(idx)] = from->data[j]; 59 params->data[1][(idx)] = from->data[j + 1]; 60 params->data[2][(idx)] = from->data[j + 2]; 61 params->data[3][(idx)] = from->data[j + 3]; 62 } 63 } 64 65 #ifndef IA_CSS_NO_DEBUG 66 void 67 ia_css_macc1_5_debug_dtrace( 68 const struct ia_css_macc1_5_config *config, 69 unsigned int level) 70 { 71 ia_css_debug_dtrace(level, 72 "config.exp=%d\n", 73 config->exp); 74 } 75 #endif 76