1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
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.
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
16 #ifndef __GDC_GLOBAL_H_INCLUDED__
17 #define __GDC_GLOBAL_H_INCLUDED__
19 #define IS_GDC_VERSION_2
21 #include <type_support.h>
22 #include "gdc_v2_defs.h"
25 * Storage addresses for packed data transfer
27 #define GDC_PARAM_ICX_LEFT_ROUNDED_IDX 0
28 #define GDC_PARAM_OXDIM_FLOORED_IDX 1
29 #define GDC_PARAM_OXDIM_LAST_IDX 2
30 #define GDC_PARAM_WOIX_LAST_IDX 3
31 #define GDC_PARAM_IY_TOPLEFT_IDX 4
32 #define GDC_PARAM_CHUNK_CNT_IDX 5
33 /*#define GDC_PARAM_ELEMENTS_PER_XMEM_ADDR_IDX 6 */ /* Derived from bpp */
34 #define GDC_PARAM_BPP_IDX 6
35 #define GDC_PARAM_BLOCK_HEIGHT_IDX 7
36 /*#define GDC_PARAM_DMA_CHANNEL_STRIDE_A_IDX 8*/ /* The DMA stride == the GDC buffer stride */
37 #define GDC_PARAM_WOIX_IDX 8
38 #define GDC_PARAM_DMA_CHANNEL_STRIDE_B_IDX 9
39 #define GDC_PARAM_DMA_CHANNEL_WIDTH_A_IDX 10
40 #define GDC_PARAM_DMA_CHANNEL_WIDTH_B_IDX 11
41 #define GDC_PARAM_VECTORS_PER_LINE_IN_IDX 12
42 #define GDC_PARAM_VECTORS_PER_LINE_OUT_IDX 13
43 #define GDC_PARAM_VMEM_IN_DIMY_IDX 14
44 #define GDC_PARAM_COMMAND_IDX 15
45 #define N_GDC_PARAM 16
47 /* Because of the packed parameter transfer max(params) == max(fragments) */
48 #define N_GDC_FRAGMENTS N_GDC_PARAM
50 /* The GDC is capable of higher internal precision than the parameter data structures */
51 #define HRT_GDC_COORD_SCALE_BITS 6
52 #define HRT_GDC_COORD_SCALE BIT(HRT_GDC_COORD_SCALE_BITS)
64 } gdc_bits_per_pixel_t;
66 typedef struct gdc_scale_param_mem_s {
67 u16 params[N_GDC_PARAM];
68 u16 ipx_start_array[N_GDC_PARAM];
69 u16 ibuf_offset[N_GDC_PARAM];
70 u16 obuf_offset[N_GDC_PARAM];
71 } gdc_scale_param_mem_t;
73 typedef struct gdc_warp_param_mem_s {
88 } gdc_warp_param_mem_t;
90 #endif /* __GDC_GLOBAL_H_INCLUDED__ */