19d4fa1a1SMauro Carvalho Chehab /* 29d4fa1a1SMauro Carvalho Chehab * Support for Intel Camera Imaging ISP subsystem. 39d4fa1a1SMauro Carvalho Chehab * Copyright (c) 2015, Intel Corporation. 49d4fa1a1SMauro Carvalho Chehab * 59d4fa1a1SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify it 69d4fa1a1SMauro Carvalho Chehab * under the terms and conditions of the GNU General Public License, 79d4fa1a1SMauro Carvalho Chehab * version 2, as published by the Free Software Foundation. 89d4fa1a1SMauro Carvalho Chehab * 99d4fa1a1SMauro Carvalho Chehab * This program is distributed in the hope it will be useful, but WITHOUT 109d4fa1a1SMauro Carvalho Chehab * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 119d4fa1a1SMauro Carvalho Chehab * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 129d4fa1a1SMauro Carvalho Chehab * more details. 139d4fa1a1SMauro Carvalho Chehab */ 149d4fa1a1SMauro Carvalho Chehab 159d4fa1a1SMauro Carvalho Chehab #ifndef __VAMEM_GLOBAL_H_INCLUDED__ 169d4fa1a1SMauro Carvalho Chehab #define __VAMEM_GLOBAL_H_INCLUDED__ 179d4fa1a1SMauro Carvalho Chehab 189d4fa1a1SMauro Carvalho Chehab #include <type_support.h> 199d4fa1a1SMauro Carvalho Chehab 209d4fa1a1SMauro Carvalho Chehab #define IS_VAMEM_VERSION_2 219d4fa1a1SMauro Carvalho Chehab 229d4fa1a1SMauro Carvalho Chehab /* (log) stepsize of linear interpolation */ 239d4fa1a1SMauro Carvalho Chehab #define VAMEM_INTERP_STEP_LOG2 4 249d4fa1a1SMauro Carvalho Chehab #define VAMEM_INTERP_STEP BIT(VAMEM_INTERP_STEP_LOG2) 259d4fa1a1SMauro Carvalho Chehab /* (physical) size of the tables */ 269d4fa1a1SMauro Carvalho Chehab #define VAMEM_TABLE_UNIT_SIZE ((1 << (ISP_VAMEM_ADDRESS_BITS - VAMEM_INTERP_STEP_LOG2)) + 1) 279d4fa1a1SMauro Carvalho Chehab /* (logical) size of the tables */ 289d4fa1a1SMauro Carvalho Chehab #define VAMEM_TABLE_UNIT_STEP ((VAMEM_TABLE_UNIT_SIZE - 1) << 1) 299d4fa1a1SMauro Carvalho Chehab /* Number of tables */ 309d4fa1a1SMauro Carvalho Chehab #define VAMEM_TABLE_UNIT_COUNT (ISP_VAMEM_DEPTH / VAMEM_TABLE_UNIT_STEP) 319d4fa1a1SMauro Carvalho Chehab 329d4fa1a1SMauro Carvalho Chehab typedef u16 vamem_data_t; 339d4fa1a1SMauro Carvalho Chehab 349d4fa1a1SMauro Carvalho Chehab #endif /* __VAMEM_GLOBAL_H_INCLUDED__ */ 35