linux/drivers/staging/media/atomisp/pci/ia_css_stream.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2/*
   3 * Support for Intel Camera Imaging ISP subsystem.
   4 * Copyright (c) 2015, Intel Corporation.
   5 *
   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.
   9 *
  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
  13 * more details.
  14 */
  15
  16#ifndef _IA_CSS_STREAM_H_
  17#define _IA_CSS_STREAM_H_
  18
  19#include <type_support.h>
  20#include <system_local.h>
  21#if !defined(ISP2401)
  22#include <input_system.h>
  23#endif
  24#include "ia_css_types.h"
  25#include "ia_css_stream_public.h"
  26
  27/**
  28 * structure to hold all internal stream related information
  29 */
  30struct ia_css_stream {
  31        struct ia_css_stream_config    config;
  32        struct ia_css_stream_info      info;
  33#if !defined(ISP2401)
  34        rx_cfg_t                       csi_rx_config;
  35#endif
  36        bool                           reconfigure_css_rx;
  37        struct ia_css_pipe            *last_pipe;
  38        int                            num_pipes;
  39        struct ia_css_pipe           **pipes;
  40        struct ia_css_pipe            *continuous_pipe;
  41        struct ia_css_isp_parameters  *isp_params_configs;
  42        struct ia_css_isp_parameters  *per_frame_isp_params_configs;
  43
  44        bool                           cont_capt;
  45        bool                           disable_cont_vf;
  46
  47        /* ISP2401 */
  48        bool                           stop_copy_preview;
  49        bool                           started;
  50};
  51
  52/* @brief Get a binary in the stream, which binary has the shading correction.
  53 *
  54 * @param[in] stream: The stream.
  55 * @return      The binary which has the shading correction.
  56 *
  57 */
  58struct ia_css_binary *
  59ia_css_stream_get_shading_correction_binary(const struct ia_css_stream *stream);
  60
  61struct ia_css_binary *
  62ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream);
  63
  64struct ia_css_binary *
  65ia_css_stream_get_3a_binary(const struct ia_css_stream *stream);
  66
  67unsigned int
  68ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream);
  69
  70bool
  71sh_css_params_set_binning_factor(struct ia_css_stream *stream,
  72                                 unsigned int sensor_binning);
  73
  74void
  75sh_css_invalidate_params(struct ia_css_stream *stream);
  76
  77/* The following functions are used for testing purposes only */
  78const struct ia_css_fpn_table *
  79ia_css_get_fpn_table(struct ia_css_stream *stream);
  80
  81/* @brief Get a pointer to the shading table.
  82 *
  83 * @param[in] stream: The stream.
  84 * @return      The pointer to the shading table.
  85 *
  86 */
  87struct ia_css_shading_table *
  88ia_css_get_shading_table(struct ia_css_stream *stream);
  89
  90void
  91ia_css_get_isp_dis_coefficients(struct ia_css_stream *stream,
  92                                short *horizontal_coefficients,
  93                                short *vertical_coefficients);
  94
  95void
  96ia_css_get_isp_dvs2_coefficients(struct ia_css_stream *stream,
  97                                 short *hor_coefs_odd_real,
  98                                 short *hor_coefs_odd_imag,
  99                                 short *hor_coefs_even_real,
 100                                 short *hor_coefs_even_imag,
 101                                 short *ver_coefs_odd_real,
 102                                 short *ver_coefs_odd_imag,
 103                                 short *ver_coefs_even_real,
 104                                 short *ver_coefs_even_imag);
 105
 106int
 107ia_css_stream_isp_parameters_init(struct ia_css_stream *stream);
 108
 109void
 110ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream);
 111
 112#endif /*_IA_CSS_STREAM_H_*/
 113