diff options
author | 2018-06-07 12:34:37 -0700 | |
---|---|---|
committer | 2018-06-07 12:34:37 -0700 | |
commit | 3036bc45364f98515a2c446d7fac2c34dcfbeff4 (patch) | |
tree | f565c03254413b779981ee5e9ed81b19d5b62c78 /drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h | |
parent | Merge tag 'powerpc-4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/p... (diff) | |
parent | media: omap2: fix compile-testing with FB_OMAP2=m (diff) | |
download | linux-3036bc45364f98515a2c446d7fac2c34dcfbeff4.tar.gz linux-3036bc45364f98515a2c446d7fac2c34dcfbeff4.tar.bz2 linux-3036bc45364f98515a2c446d7fac2c34dcfbeff4.zip |
Merge tag 'media/v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- remove of atomisp driver from staging, as nobody would have time to
dedicate huge efforts to fix all the problems there. Also, we have a
feeling that the driver may not even run the way it is.
- move Zoran driver to staging, in order to be either fixed to use VB2
and the proper media kAPIs or to be removed
- remove videobuf-dvb driver, with is unused for a while
- some V4L2 documentation fixes/improvements
- new sensor drivers: imx258 and ov7251
- a new driver was added to allow using I2C transparent drivers
- several improvements at the ddbridge driver
- several improvements at the ISDB pt1 driver, making it more coherent
with the DVB framework
- added a new platform driver for MIPI CSI-2 RX: cadence
- now, all media drivers can be compiled on x86 with COMPILE_TEST
- almost all media drivers now build on non-x86 architectures with
COMPILE_TEST
- lots of other random stuff: cleanups, support for new board models,
bug fixes, etc
* tag 'media/v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits)
media: omap2: fix compile-testing with FB_OMAP2=m
media: media/radio/Kconfig: add back RADIO_ISA
media: v4l2-ioctl.c: fix missing unlock in __video_do_ioctl()
media: pxa_camera: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power
media: arch: sh: migor: Fix TW9910 PDN gpio
media: staging: tegra-vde: Reset VDE regardless of memory client resetting failure
media: marvel-ccic: mmp: select VIDEOBUF2_VMALLOC/DMA_CONTIG
media: marvel-ccic: allow ccic and mmp drivers to coexist
media: uvcvideo: Prevent setting unavailable flags
media: ddbridge: conditionally enable fast TS for stv0910-equipped bridges
media: dvb-frontends/stv0910: make TS speed configurable
media: ddbridge/mci: add identifiers to function definition arguments
media: ddbridge/mci: protect against out-of-bounds array access in stop()
media: rc: ensure input/lirc device can be opened after register
media: rc: nuvoton: Keep device enabled during reg init
media: rc: nuvoton: Keep track of users on CIR enable/disable
media: rc: nuvoton: Tweak the interrupt enabling dance
media: uvcvideo: Support realtek's UVC 1.5 device
media: uvcvideo: Fix driver reference counting
media: gspca_zc3xx: Enable short exposure times for OV7648
...
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h | 188 |
1 files changed, 0 insertions, 188 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h deleted file mode 100644 index 080198796ad0..000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#ifndef __IA_CSS_3A_H -#define __IA_CSS_3A_H - -/* @file - * This file contains types used for 3A statistics - */ - -#include <type_support.h> -#include "ia_css_types.h" -#include "ia_css_err.h" -#include "system_global.h" - -enum ia_css_3a_tables { - IA_CSS_S3A_TBL_HI, - IA_CSS_S3A_TBL_LO, - IA_CSS_RGBY_TBL, - IA_CSS_NUM_3A_TABLES -}; - -/* Structure that holds 3A statistics in the ISP internal - * format. Use ia_css_get_3a_statistics() to translate - * this to the format used on the host (3A library). - * */ -struct ia_css_isp_3a_statistics { - union { - struct { - ia_css_ptr s3a_tbl; - } dmem; - struct { - ia_css_ptr s3a_tbl_hi; - ia_css_ptr s3a_tbl_lo; - } vmem; - } data; - struct { - ia_css_ptr rgby_tbl; - } data_hmem; - uint32_t exp_id; /** exposure id, to match statistics to a frame, - see ia_css_event_public.h for more detail. */ - uint32_t isp_config_id;/** Unique ID to track which config was actually applied to a particular frame */ - ia_css_ptr data_ptr; /** pointer to base of all data */ - uint32_t size; /** total size of all data */ - uint32_t dmem_size; - uint32_t vmem_size; /** both lo and hi have this size */ - uint32_t hmem_size; -}; -#define SIZE_OF_DMEM_STRUCT \ - (SIZE_OF_IA_CSS_PTR) - -#define SIZE_OF_VMEM_STRUCT \ - (2 * SIZE_OF_IA_CSS_PTR) - -#define SIZE_OF_DATA_UNION \ - (MAX(SIZE_OF_DMEM_STRUCT, SIZE_OF_VMEM_STRUCT)) - -#define SIZE_OF_DATA_HMEM_STRUCT \ - (SIZE_OF_IA_CSS_PTR) - -#define SIZE_OF_IA_CSS_ISP_3A_STATISTICS_STRUCT \ - (SIZE_OF_DATA_UNION + \ - SIZE_OF_DATA_HMEM_STRUCT + \ - sizeof(uint32_t) + \ - sizeof(uint32_t) + \ - SIZE_OF_IA_CSS_PTR + \ - 4 * sizeof(uint32_t)) - -/* Map with host-side pointers to ISP-format statistics. - * These pointers can either be copies of ISP data or memory mapped - * ISP pointers. - * All of the data behind these pointers is allocated contiguously, the - * allocated pointer is stored in the data_ptr field. The other fields - * point into this one block of data. - */ -struct ia_css_isp_3a_statistics_map { - void *data_ptr; /** Pointer to start of memory */ - struct ia_css_3a_output *dmem_stats; - uint16_t *vmem_stats_hi; - uint16_t *vmem_stats_lo; - struct ia_css_bh_table *hmem_stats; - uint32_t size; /** total size in bytes of data_ptr */ - uint32_t data_allocated; /** indicate whether data_ptr - was allocated or not. */ -}; - -/* @brief Copy and translate 3A statistics from an ISP buffer to a host buffer - * @param[out] host_stats Host buffer. - * @param[in] isp_stats ISP buffer. - * @return error value if temporary memory cannot be allocated - * - * This copies 3a statistics from an ISP pointer to a host pointer and then - * translates some of the statistics, details depend on which ISP binary is - * used. - * Always use this function, never copy the buffer directly. - */ -enum ia_css_err -ia_css_get_3a_statistics(struct ia_css_3a_statistics *host_stats, - const struct ia_css_isp_3a_statistics *isp_stats); - -/* @brief Translate 3A statistics from ISP format to host format. - * @param[out] host_stats host-format statistics - * @param[in] isp_stats ISP-format statistics - * @return None - * - * This function translates statistics from the internal ISP-format to - * the host-format. This function does not include an additional copy - * step. - * */ -void -ia_css_translate_3a_statistics( - struct ia_css_3a_statistics *host_stats, - const struct ia_css_isp_3a_statistics_map *isp_stats); - -/* Convenience functions for alloc/free of certain datatypes */ - -/* @brief Allocate memory for the 3a statistics on the ISP - * @param[in] grid The grid. - * @return Pointer to the allocated 3a statistics buffer on the ISP -*/ -struct ia_css_isp_3a_statistics * -ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid); - -/* @brief Free the 3a statistics memory on the isp - * @param[in] me Pointer to the 3a statistics buffer on the ISP. - * @return None -*/ -void -ia_css_isp_3a_statistics_free(struct ia_css_isp_3a_statistics *me); - -/* @brief Allocate memory for the 3a statistics on the host - * @param[in] grid The grid. - * @return Pointer to the allocated 3a statistics buffer on the host -*/ -struct ia_css_3a_statistics * -ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid); - -/* @brief Free the 3a statistics memory on the host - * @param[in] me Pointer to the 3a statistics buffer on the host. - * @return None - */ -void -ia_css_3a_statistics_free(struct ia_css_3a_statistics *me); - -/* @brief Allocate a 3a statistics map structure - * @param[in] isp_stats pointer to ISP 3a statistis struct - * @param[in] data_ptr host-side pointer to ISP 3a statistics. - * @return Pointer to the allocated 3a statistics map - * - * This function allocates the ISP 3a statistics map structure - * and uses the data_ptr as base pointer to set the appropriate - * pointers to all relevant subsets of the 3a statistics (dmem, - * vmem, hmem). - * If the data_ptr is NULL, this function will allocate the host-side - * memory. This information is stored in the struct and used in the - * ia_css_isp_3a_statistics_map_free() function to determine whether - * the memory should be freed or not. - * Note that this function does not allocate or map any ISP - * memory. -*/ -struct ia_css_isp_3a_statistics_map * -ia_css_isp_3a_statistics_map_allocate( - const struct ia_css_isp_3a_statistics *isp_stats, - void *data_ptr); - -/* @brief Free the 3a statistics map - * @param[in] me Pointer to the 3a statistics map - * @return None - * - * This function frees the map struct. If the data_ptr inside it - * was allocated inside ia_css_isp_3a_statistics_map_allocate(), it - * will be freed in this function. Otherwise it will not be freed. - */ -void -ia_css_isp_3a_statistics_map_free(struct ia_css_isp_3a_statistics_map *me); - -#endif /* __IA_CSS_3A_H */ |