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 #ifndef __GDC_GLOBAL_H_INCLUDED__
16 #define __GDC_GLOBAL_H_INCLUDED__
18 #define IS_GDC_VERSION_2
20 #include <type_support.h>
21 #include "gdc_v2_defs.h"
24 * Storage addresses for packed data transfer
26 #define GDC_PARAM_ICX_LEFT_ROUNDED_IDX 0
27 #define GDC_PARAM_OXDIM_FLOORED_IDX 1
28 #define GDC_PARAM_OXDIM_LAST_IDX 2
29 #define GDC_PARAM_WOIX_LAST_IDX 3
30 #define GDC_PARAM_IY_TOPLEFT_IDX 4
31 #define GDC_PARAM_CHUNK_CNT_IDX 5
32 /*#define GDC_PARAM_ELEMENTS_PER_XMEM_ADDR_IDX 6 */ /* Derived from bpp */
33 #define GDC_PARAM_BPP_IDX 6
34 #define GDC_PARAM_BLOCK_HEIGHT_IDX 7
35 /*#define GDC_PARAM_DMA_CHANNEL_STRIDE_A_IDX 8*/ /* The DMA stride == the GDC buffer stride */
36 #define GDC_PARAM_WOIX_IDX 8
37 #define GDC_PARAM_DMA_CHANNEL_STRIDE_B_IDX 9
38 #define GDC_PARAM_DMA_CHANNEL_WIDTH_A_IDX 10
39 #define GDC_PARAM_DMA_CHANNEL_WIDTH_B_IDX 11
40 #define GDC_PARAM_VECTORS_PER_LINE_IN_IDX 12
41 #define GDC_PARAM_VECTORS_PER_LINE_OUT_IDX 13
42 #define GDC_PARAM_VMEM_IN_DIMY_IDX 14
43 #define GDC_PARAM_COMMAND_IDX 15
44 #define N_GDC_PARAM 16
46 /* Because of the packed parameter transfer max(params) == max(fragments) */
47 #define N_GDC_FRAGMENTS N_GDC_PARAM
49 /* The GDC is capable of higher internal precision than the parameter data structures */
50 #define HRT_GDC_COORD_SCALE_BITS 6
51 #define HRT_GDC_COORD_SCALE (1 << HRT_GDC_COORD_SCALE_BITS)
63 } gdc_bits_per_pixel_t;
65 typedef struct gdc_scale_param_mem_s {
66 uint16_t params[N_GDC_PARAM];
67 uint16_t ipx_start_array[N_GDC_PARAM];
68 uint16_t ibuf_offset[N_GDC_PARAM];
69 uint16_t obuf_offset[N_GDC_PARAM];
70 } gdc_scale_param_mem_t;
72 typedef struct gdc_warp_param_mem_s {
75 uint32_t in_addr_offset;
76 uint32_t in_block_width;
77 uint32_t in_block_height;
87 } gdc_warp_param_mem_t;
90 #endif /* __GDC_GLOBAL_H_INCLUDED__ */