Merge remote-tracking branches 'asoc/topic/mc13783', 'asoc/topic/msm8916', 'asoc...
[linux-block.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / ia_css_input_port.h
CommitLineData
a49d2536
AC
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#ifndef __IA_CSS_INPUT_PORT_H
16#define __IA_CSS_INPUT_PORT_H
17
d929fb4e 18/* @file
a49d2536
AC
19 * This file contains information about the possible input ports for CSS
20 */
21
d929fb4e 22/* Enumeration of the physical input ports on the CSS hardware.
a49d2536
AC
23 * There are 3 MIPI CSI-2 ports.
24 */
25enum ia_css_csi2_port {
26 IA_CSS_CSI2_PORT0, /* Implicitly map to MIPI_PORT0_ID */
27 IA_CSS_CSI2_PORT1, /* Implicitly map to MIPI_PORT1_ID */
28 IA_CSS_CSI2_PORT2 /* Implicitly map to MIPI_PORT2_ID */
29};
30
d929fb4e 31/* Backward compatible for CSS API 2.0 only
a49d2536
AC
32 * TO BE REMOVED when all drivers move to CSS API 2.1
33 */
34#define IA_CSS_CSI2_PORT_4LANE IA_CSS_CSI2_PORT0
35#define IA_CSS_CSI2_PORT_1LANE IA_CSS_CSI2_PORT1
36#define IA_CSS_CSI2_PORT_2LANE IA_CSS_CSI2_PORT2
37
d929fb4e 38/* The CSI2 interface supports 2 types of compression or can
a49d2536
AC
39 * be run without compression.
40 */
41enum ia_css_csi2_compression_type {
d929fb4e
MCC
42 IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /** No compression */
43 IA_CSS_CSI2_COMPRESSION_TYPE_1, /** Compression scheme 1 */
44 IA_CSS_CSI2_COMPRESSION_TYPE_2 /** Compression scheme 2 */
a49d2536
AC
45};
46
47struct ia_css_csi2_compression {
48 enum ia_css_csi2_compression_type type;
d929fb4e 49 /** Compression used */
a49d2536 50 unsigned int compressed_bits_per_pixel;
d929fb4e 51 /** Compressed bits per pixel (only when compression is enabled) */
a49d2536 52 unsigned int uncompressed_bits_per_pixel;
d929fb4e 53 /** Uncompressed bits per pixel (only when compression is enabled) */
a49d2536
AC
54};
55
d929fb4e 56/* Input port structure.
a49d2536
AC
57 */
58struct ia_css_input_port {
d929fb4e
MCC
59 enum ia_css_csi2_port port; /** Physical CSI-2 port */
60 unsigned int num_lanes; /** Number of lanes used (4-lane port only) */
61 unsigned int timeout; /** Timeout value */
62 unsigned int rxcount; /** Register value, should include all lanes */
63 struct ia_css_csi2_compression compression; /** Compression used */
a49d2536
AC
64};
65
66#endif /* __IA_CSS_INPUT_PORT_H */