/* SPDX-License-Identifier: GPL-2.0 */ /* * Support for Intel Camera Imaging ISP subsystem. * Copyright (c) 2015, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. */ #ifndef _IA_CSS_ACC_TYPES_H #define _IA_CSS_ACC_TYPES_H /* @file * This file contains types used for acceleration */ #include <system_local.h> /* HAS_IRQ_MAP_VERSION_# */ #include <type_support.h> #include <platform_support.h> #include <debug_global.h> #include <linux/bits.h> #include "ia_css_types.h" #include "ia_css_frame_format.h" /* Should be included without the path. However, that requires adding the path to numerous makefiles that have nothing to do with isp parameters. */ #include "runtime/isp_param/interface/ia_css_isp_param_types.h" /* Types for the acceleration API. * These should be moved to sh_css_internal.h once the old acceleration * argument handling has been completed. * After that, interpretation of these structures is no longer needed * in the kernel and HAL. */ /* Type of acceleration. */ enum ia_css_acc_type { … }; /* Cells types */ enum ia_css_cell_type { … }; /* Firmware types. */ enum ia_css_fw_type { … }; struct ia_css_blob_descr; /* Blob descriptor. * This structure describes an SP or ISP blob. * It describes the test, data and bss sections as well as position in a * firmware file. * For convenience, it contains dynamic data after loading. */ struct ia_css_blob_info { … }; struct ia_css_binary_input_info { … }; struct ia_css_binary_output_info { … }; struct ia_css_binary_internal_info { … }; struct ia_css_binary_bds_info { … }; struct ia_css_binary_dvs_info { … }; struct ia_css_binary_vf_dec_info { … }; struct ia_css_binary_s3a_info { … }; /* DPC related binary info */ struct ia_css_binary_dpc_info { … }; struct ia_css_binary_iterator_info { … }; struct ia_css_binary_address_info { … }; struct ia_css_binary_uds_info { … }; struct ia_css_binary_pipeline_info { … }; struct ia_css_binary_block_info { … }; /* Structure describing an ISP binary. * It describes the capabilities of a binary, like the maximum resolution, * support features, dma channels, uds features, etc. * This part is to be used by the SP. * Future refactoring should move binary properties to ia_css_binary_xinfo, * thereby making the SP code more binary independent. */ struct ia_css_binary_info { … }; /* Structure describing an ISP binary. * It describes the capabilities of a binary, like the maximum resolution, * support features, dma channels, uds features, etc. */ struct ia_css_binary_xinfo { … }; /* Structure describing the Bootloader (an ISP binary). * It contains several address, either in ddr, isp_dmem or * the entry function in icache. */ struct ia_css_bl_info { … }; /* Structure describing the SP binary. * It contains several address, either in ddr, sp_dmem or * the entry function in pmem. */ struct ia_css_sp_info { … }; /* The following #if is there because this header file is also included by SP and ISP code but they do not need this data and HIVECC has alignment issue with the firmware struct/union's. More permanent solution will be to refactor this include. */ /* Accelerator firmware information. */ struct ia_css_acc_info { … }; /* Firmware information. */ ia_css_fw_union; /* Firmware information. */ struct ia_css_fw_info { … }; struct ia_css_blob_descr { … }; struct ia_css_acc_fw; /* Structure describing the SP binary of a stand-alone accelerator. */ struct ia_css_acc_sp { … }; /* Acceleration firmware descriptor. * This descriptor describes either SP code (stand-alone), or * ISP code (a separate pipeline stage). */ struct ia_css_acc_fw_hdr { … }; /* Firmware structure. * This contains the header and actual blobs. * For standalone, it contains SP and ISP blob. * For a pipeline stage accelerator, it contains ISP code only. * Since its members are variable size, their offsets are described in the * header and computed using the access macros below. */ struct ia_css_acc_fw { … }; /* Access macros for firmware */ #define IA_CSS_ACC_OFFSET(t, f, n) … #define IA_CSS_ACC_SP_PROG_NAME(f) … #define IA_CSS_ACC_ISP_PROG_NAME(f) … #define IA_CSS_ACC_SP_CODE(f) … #define IA_CSS_ACC_SP_DATA(f) … #define IA_CSS_ACC_ISP_CODE(f) … #define IA_CSS_ACC_ISP_SIZE(f) … /* Binary name follows header immediately */ #define IA_CSS_EXT_ISP_PROG_NAME(f) … #define IA_CSS_EXT_ISP_MEM_OFFSETS(f) … enum ia_css_sp_sleep_mode { … }; #endif /* _IA_CSS_ACC_TYPES_H */