]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_properties.c
staging/atomisp: Add support for the Intel IPU v2
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / sh_css_properties.c
1 /*
2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
4 *
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.
8 *
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
12 * more details.
13 */
14
15 #include "ia_css_properties.h"
16 #include <assert_support.h>
17 #include "ia_css_types.h"
18 #include "gdc_device.h"
19
20 void
21 ia_css_get_properties(struct ia_css_properties *properties)
22 {
23 assert(properties != NULL);
24 #if defined(HAS_GDC_VERSION_2) || defined(HAS_GDC_VERSION_3)
25 /*
26 * MW: We don't want to store the coordinates
27 * full range in memory: Truncate
28 */
29 properties->gdc_coord_one = gdc_get_unity(GDC0_ID)/HRT_GDC_COORD_SCALE;
30 #else
31 #error "Unknown GDC version"
32 #endif
33
34 properties->l1_base_is_index = true;
35
36 #if defined(HAS_VAMEM_VERSION_1)
37 properties->vamem_type = IA_CSS_VAMEM_TYPE_1;
38 #elif defined(HAS_VAMEM_VERSION_2)
39 properties->vamem_type = IA_CSS_VAMEM_TYPE_2;
40 #else
41 #error "Unknown VAMEM version"
42 #endif
43 }