linux/drivers/media/platform/ti/omap3isp/isppreview.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * isppreview.h
 *
 * TI OMAP3 ISP - Preview module
 *
 * Copyright (C) 2010 Nokia Corporation
 * Copyright (C) 2009 Texas Instruments, Inc.
 *
 * Contacts: Laurent Pinchart <[email protected]>
 *	     Sakari Ailus <[email protected]>
 */

#ifndef OMAP3_ISP_PREVIEW_H
#define OMAP3_ISP_PREVIEW_H

#include <linux/omap3isp.h>
#include <linux/types.h>
#include <media/v4l2-ctrls.h>

#include "ispvideo.h"

#define ISPPRV_BRIGHT_STEP
#define ISPPRV_BRIGHT_DEF
#define ISPPRV_BRIGHT_LOW
#define ISPPRV_BRIGHT_HIGH
#define ISPPRV_BRIGHT_UNITS

#define ISPPRV_CONTRAST_STEP
#define ISPPRV_CONTRAST_DEF
#define ISPPRV_CONTRAST_LOW
#define ISPPRV_CONTRAST_HIGH
#define ISPPRV_CONTRAST_UNITS

/* Additional features not listed in linux/omap3isp.h */
#define OMAP3ISP_PREV_CONTRAST
#define OMAP3ISP_PREV_BRIGHTNESS
#define OMAP3ISP_PREV_FEATURES_END

enum preview_input_entity {};

#define PREVIEW_OUTPUT_RESIZER
#define PREVIEW_OUTPUT_MEMORY

/* Configure byte layout of YUV image */
enum preview_ycpos_mode {};

/*
 * struct prev_params - Structure for all configuration
 * @busy: Bitmask of busy parameters (being updated or used)
 * @update: Bitmask of the parameters to be updated
 * @features: Set of features enabled.
 * @cfa: CFA coefficients.
 * @csup: Chroma suppression coefficients.
 * @luma: Luma enhancement coefficients.
 * @nf: Noise filter coefficients.
 * @dcor: Noise filter coefficients.
 * @gamma: Gamma coefficients.
 * @wbal: White Balance parameters.
 * @blkadj: Black adjustment parameters.
 * @rgb2rgb: RGB blending parameters.
 * @csc: Color space conversion (RGB to YCbCr) parameters.
 * @hmed: Horizontal median filter.
 * @yclimit: YC limits parameters.
 * @contrast: Contrast.
 * @brightness: Brightness.
 */
struct prev_params {};

/* Sink and source previewer pads */
#define PREV_PAD_SINK
#define PREV_PAD_SOURCE
#define PREV_PADS_NUM

/*
 * struct isp_prev_device - Structure for storing ISP Preview module information
 * @subdev: V4L2 subdevice
 * @pads: Media entity pads
 * @formats: Active formats at the subdev pad
 * @crop: Active crop rectangle
 * @input: Module currently connected to the input pad
 * @output: Bitmask of the active output
 * @video_in: Input video entity
 * @video_out: Output video entity
 * @params.params : Active and shadow parameters sets
 * @params.active: Bitmask of parameters active in set 0
 * @params.lock: Parameters lock, protects params.active and params.shadow
 * @underrun: Whether the preview entity has queued buffers on the output
 * @state: Current preview pipeline state
 *
 * This structure is used to store the OMAP ISP Preview module Information.
 */
struct isp_prev_device {};

struct isp_device;

int omap3isp_preview_init(struct isp_device *isp);
void omap3isp_preview_cleanup(struct isp_device *isp);

int omap3isp_preview_register_entities(struct isp_prev_device *prv,
				       struct v4l2_device *vdev);
void omap3isp_preview_unregister_entities(struct isp_prev_device *prv);

void omap3isp_preview_isr_frame_sync(struct isp_prev_device *prev);
void omap3isp_preview_isr(struct isp_prev_device *prev);

int omap3isp_preview_busy(struct isp_prev_device *isp_prev);

void omap3isp_preview_restore_context(struct isp_device *isp);

#endif	/* OMAP3_ISP_PREVIEW_H */