linux/drivers/media/platform/samsung/exynos4-is/fimc-is-param.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Samsung EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver
 *
 * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd.
 *
 * Authors: Younghwan Joo <[email protected]>
 *	    Sylwester Nawrocki <[email protected]>
 */
#ifndef FIMC_IS_PARAM_H_
#define FIMC_IS_PARAM_H_

#include <linux/compiler.h>

#define FIMC_IS_CONFIG_TIMEOUT
#define IS_DEFAULT_WIDTH
#define IS_DEFAULT_HEIGHT

#define DEFAULT_PREVIEW_STILL_WIDTH
#define DEFAULT_PREVIEW_STILL_HEIGHT
#define DEFAULT_CAPTURE_STILL_WIDTH
#define DEFAULT_CAPTURE_STILL_HEIGHT
#define DEFAULT_PREVIEW_VIDEO_WIDTH
#define DEFAULT_PREVIEW_VIDEO_HEIGHT
#define DEFAULT_CAPTURE_VIDEO_WIDTH
#define DEFAULT_CAPTURE_VIDEO_HEIGHT

#define DEFAULT_PREVIEW_STILL_FRAMERATE
#define DEFAULT_CAPTURE_STILL_FRAMERATE
#define DEFAULT_PREVIEW_VIDEO_FRAMERATE
#define DEFAULT_CAPTURE_VIDEO_FRAMERATE

#define FIMC_IS_REGION_VER
#define FIMC_IS_PARAM_SIZE
#define FIMC_IS_MAGIC_NUMBER
#define FIMC_IS_PARAM_MAX_SIZE
#define FIMC_IS_PARAM_MAX_ENTRIES

/* The parameter bitmask bit definitions. */
enum is_param_bit {};

/* Interrupt map */
#define FIMC_IS_INT_GENERAL
#define FIMC_IS_INT_FRAME_DONE_ISP

/* Input */

#define CONTROL_COMMAND_STOP
#define CONTROL_COMMAND_START

#define CONTROL_BYPASS_DISABLE
#define CONTROL_BYPASS_ENABLE

#define CONTROL_ERROR_NONE

/* OTF (On-The-Fly) input interface commands */
#define OTF_INPUT_COMMAND_DISABLE
#define OTF_INPUT_COMMAND_ENABLE

/* OTF input interface color formats */
enum oft_input_fmt {};

#define OTF_INPUT_ORDER_BAYER_GR_BG

/* OTF input error codes */
#define OTF_INPUT_ERROR_NONE

/* DMA input commands */
#define DMA_INPUT_COMMAND_DISABLE
#define DMA_INPUT_COMMAND_ENABLE

/* DMA input color formats */
enum dma_input_fmt {};

enum dma_input_order {};

#define DMA_INPUT_ERROR_NONE
/*
 * Data output parameter definitions
 */
#define OTF_OUTPUT_CROP_DISABLE
#define OTF_OUTPUT_CROP_ENABLE

#define OTF_OUTPUT_COMMAND_DISABLE
#define OTF_OUTPUT_COMMAND_ENABLE

enum otf_output_fmt {};

#define OTF_OUTPUT_ORDER_BAYER_GR_BG

#define OTF_OUTPUT_ERROR_NONE

#define DMA_OUTPUT_COMMAND_DISABLE
#define DMA_OUTPUT_COMMAND_ENABLE

enum dma_output_fmt {};

enum dma_output_order {};

/* enum dma_output_notify_dma_done */
#define DMA_OUTPUT_NOTIFY_DMA_DONE_DISABLE
#define DMA_OUTPUT_NOTIFY_DMA_DONE_ENABLE

/* DMA output error codes */
#define DMA_OUTPUT_ERROR_NONE

/* ----------------------  Global  ----------------------------------- */
#define GLOBAL_SHOTMODE_ERROR_NONE
/* 3A lock commands */
#define ISP_AA_COMMAND_START
#define ISP_AA_COMMAND_STOP

/* 3A lock target */
#define ISP_AA_TARGET_AF
#define ISP_AA_TARGET_AE
#define ISP_AA_TARGET_AWB

enum isp_af_mode {};

/* Face AF commands */
#define ISP_AF_FACE_DISABLE
#define ISP_AF_FACE_ENABLE

/* AF range */
#define ISP_AF_RANGE_NORMAL
#define ISP_AF_RANGE_MACRO

/* AF sleep */
#define ISP_AF_SLEEP_OFF
#define ISP_AF_SLEEP_ON

/* Continuous AF commands */
#define ISP_AF_CONTINUOUS_DISABLE
#define ISP_AF_CONTINUOUS_ENABLE

/* ISP AF error codes */
#define ISP_AF_ERROR_NONE
#define ISP_AF_ERROR_NONE_LOCK_DONE

/* Flash commands */
#define ISP_FLASH_COMMAND_DISABLE
#define ISP_FLASH_COMMAND_MANUAL_ON
#define ISP_FLASH_COMMAND_AUTO
#define ISP_FLASH_COMMAND_TORCH

/* Flash red-eye commands */
#define ISP_FLASH_REDEYE_DISABLE
#define ISP_FLASH_REDEYE_ENABLE

/* Flash error codes */
#define ISP_FLASH_ERROR_NONE

/* --------------------------  AWB  ------------------------------------ */
enum isp_awb_command {};

enum isp_awb_illumination {};

/* ISP AWN error codes */
#define ISP_AWB_ERROR_NONE

/* --------------------------  Effect  ----------------------------------- */
enum isp_imageeffect_command {};

/* Image effect error codes */
#define ISP_IMAGE_EFFECT_ERROR_NONE
/* ISO commands */
#define ISP_ISO_COMMAND_AUTO
#define ISP_ISO_COMMAND_MANUAL

/* ISO error codes */
#define ISP_ISO_ERROR_NONE

/* ISP adjust commands */
#define ISP_ADJUST_COMMAND_AUTO
#define ISP_ADJUST_COMMAND_MANUAL_CONTRAST
#define ISP_ADJUST_COMMAND_MANUAL_SATURATION
#define ISP_ADJUST_COMMAND_MANUAL_SHARPNESS
#define ISP_ADJUST_COMMAND_MANUAL_EXPOSURE
#define ISP_ADJUST_COMMAND_MANUAL_BRIGHTNESS
#define ISP_ADJUST_COMMAND_MANUAL_HUE
#define ISP_ADJUST_COMMAND_MANUAL_ALL

/* ISP adjustment error codes */
#define ISP_ADJUST_ERROR_NONE

/*
 *  Exposure metering
 */
enum isp_metering_command {};

/* ISP metering error codes */
#define ISP_METERING_ERROR_NONE

/*
 * AFC
 */
enum isp_afc_command {};

#define ISP_AFC_MANUAL_50HZ
#define ISP_AFC_MANUAL_60HZ

/* ------------------------  SCENE MODE--------------------------------- */
enum isp_scene_mode {};

/* AFC error codes */
#define ISP_AFC_ERROR_NONE

/* ----------------------------  FD  ------------------------------------- */
enum fd_config_command {};

enum fd_config_roll_angle {};

enum fd_config_yaw_angle {};

/* Smile mode configuration */
#define FD_CONFIG_SMILE_MODE_DISABLE
#define FD_CONFIG_SMILE_MODE_ENABLE

/* Blink mode configuration */
#define FD_CONFIG_BLINK_MODE_DISABLE
#define FD_CONFIG_BLINK_MODE_ENABLE

/* Eyes detection configuration */
#define FD_CONFIG_EYES_DETECT_DISABLE
#define FD_CONFIG_EYES_DETECT_ENABLE

/* Mouth detection configuration */
#define FD_CONFIG_MOUTH_DETECT_DISABLE
#define FD_CONFIG_MOUTH_DETECT_ENABLE

#define FD_CONFIG_ORIENTATION_DISABLE
#define FD_CONFIG_ORIENTATION_ENABLE

struct param_control {};

struct param_otf_input {};

struct param_dma_input {};

struct param_otf_output {};

struct param_dma_output {};

struct param_global_shotmode {};

struct param_sensor_framerate {};

struct param_isp_aa {};

struct param_isp_flash {};

struct param_isp_awb {};

struct param_isp_imageeffect {};

struct param_isp_iso {};

struct param_isp_adjust {};

struct param_isp_metering {};

struct param_isp_afc {};

struct param_scaler_imageeffect {};

struct param_scaler_input_crop {};

struct param_scaler_output_crop {};

struct param_scaler_rotation {};

struct param_scaler_flip {};

struct param_3dnr_1stframe {};

struct param_fd_config {};

struct global_param {};

struct sensor_param {} __packed;

struct buffer_param {} __packed;

struct isp_param {} __packed;

struct drc_param {} __packed;

struct scalerc_param {} __packed;

struct odc_param {} __packed;

struct dis_param {} __packed;

struct tdnr_param {} __packed;

struct scalerp_param {} __packed;

struct fd_param {} __packed;

struct is_param_region {} __packed;

#define NUMBER_OF_GAMMA_CURVE_POINTS

struct is_tune_sensor {};

struct is_tune_gammacurve {};

struct is_tune_isp {} __packed;

struct is_tune_region {} __packed;

struct rational {};

struct srational {};

#define FLASH_FIRED_SHIFT
#define FLASH_NOT_FIRED
#define FLASH_FIRED

#define FLASH_STROBE_SHIFT
#define FLASH_STROBE_NO_DETECTION
#define FLASH_STROBE_RESERVED
#define FLASH_STROBE_RETURN_LIGHT_NOT_DETECTED
#define FLASH_STROBE_RETURN_LIGHT_DETECTED

#define FLASH_MODE_SHIFT
#define FLASH_MODE_UNKNOWN
#define FLASH_MODE_COMPULSORY_FLASH_FIRING
#define FLASH_MODE_COMPULSORY_FLASH_SUPPRESSION
#define FLASH_MODE_AUTO_MODE

#define FLASH_FUNCTION_SHIFT
#define FLASH_FUNCTION_PRESENT
#define FLASH_FUNCTION_NONE

#define FLASH_RED_EYE_SHIFT
#define FLASH_RED_EYE_DISABLED
#define FLASH_RED_EYE_SUPPORTED

enum apex_aperture_value {};

struct exif_attribute {} __packed;

struct is_frame_header {} __packed;

struct is_fd_rect {};

struct is_face_marker {} __packed;

#define MAX_FRAME_COUNT
#define MAX_FRAME_COUNT_PREVIEW
#define MAX_FRAME_COUNT_CAPTURE
#define MAX_FACE_COUNT
#define MAX_SHARED_COUNT

struct is_region {} __packed;

/* Offset to the ISP DMA2 output buffer address array. */
#define DMA2_OUTPUT_ADDR_ARRAY_OFFS

struct is_debug_frame_descriptor {};

#define MAX_FRAMEDESCRIPTOR_CONTEXT_NUM
#define MAX_VERSION_DISPLAY_BUF

struct is_share_region {} __packed;

struct is_debug_control {};

struct sensor_open_extended {};

struct fimc_is;

int fimc_is_hw_get_sensor_max_framerate(struct fimc_is *is);
int __fimc_is_hw_update_param(struct fimc_is *is, u32 offset);
void fimc_is_set_initial_params(struct fimc_is *is);
unsigned int __get_pending_param_count(struct fimc_is *is);

int  __is_hw_update_params(struct fimc_is *is);
void __is_get_frame_size(struct fimc_is *is, struct v4l2_mbus_framefmt *mf);
void __is_set_frame_size(struct fimc_is *is, struct v4l2_mbus_framefmt *mf);
void __is_set_sensor(struct fimc_is *is, int fps);
void __is_set_isp_aa_ae(struct fimc_is *is);
void __is_set_isp_flash(struct fimc_is *is, u32 cmd, u32 redeye);
void __is_set_isp_awb(struct fimc_is *is, u32 cmd, u32 val);
void __is_set_isp_effect(struct fimc_is *is, u32 cmd);
void __is_set_isp_iso(struct fimc_is *is, u32 cmd, u32 val);
void __is_set_isp_adjust(struct fimc_is *is, u32 cmd, u32 val);
void __is_set_isp_metering(struct fimc_is *is, u32 id, u32 val);
void __is_set_isp_afc(struct fimc_is *is, u32 cmd, u32 val);
void __is_set_drc_control(struct fimc_is *is, u32 val);
void __is_set_fd_control(struct fimc_is *is, u32 val);
void __is_set_fd_config_maxface(struct fimc_is *is, u32 val);
void __is_set_fd_config_rollangle(struct fimc_is *is, u32 val);
void __is_set_fd_config_yawangle(struct fimc_is *is, u32 val);
void __is_set_fd_config_smilemode(struct fimc_is *is, u32 val);
void __is_set_fd_config_blinkmode(struct fimc_is *is, u32 val);
void __is_set_fd_config_eyedetect(struct fimc_is *is, u32 val);
void __is_set_fd_config_mouthdetect(struct fimc_is *is, u32 val);
void __is_set_fd_config_orientation(struct fimc_is *is, u32 val);
void __is_set_fd_config_orientation_val(struct fimc_is *is, u32 val);
void __is_set_isp_aa_af_mode(struct fimc_is *is, int cmd);
void __is_set_isp_aa_af_start_stop(struct fimc_is *is, int cmd);

#endif