/* SPDX-License-Identifier: GPL-2.0-only */ /* * ispccdc.h * * TI OMAP3 ISP - CCDC module * * Copyright (C) 2009-2010 Nokia Corporation * Copyright (C) 2009 Texas Instruments, Inc. * * Contacts: Laurent Pinchart <[email protected]> * Sakari Ailus <[email protected]> */ #ifndef OMAP3_ISP_CCDC_H #define OMAP3_ISP_CCDC_H #include <linux/omap3isp.h> #include <linux/workqueue.h> #include "ispvideo.h" enum ccdc_input_entity { … }; #define CCDC_OUTPUT_MEMORY … #define CCDC_OUTPUT_PREVIEW … #define CCDC_OUTPUT_RESIZER … #define OMAP3ISP_CCDC_NEVENTS … struct ispccdc_fpc { … }; enum ispccdc_lsc_state { … }; struct ispccdc_lsc_config_req { … }; /* * ispccdc_lsc - CCDC LSC parameters */ struct ispccdc_lsc { … }; #define CCDC_STOP_NOT_REQUESTED … #define CCDC_STOP_REQUEST … #define CCDC_STOP_EXECUTED … #define CCDC_STOP_CCDC_FINISHED … #define CCDC_STOP_LSC_FINISHED … #define CCDC_STOP_FINISHED … #define CCDC_EVENT_VD1 … #define CCDC_EVENT_VD0 … #define CCDC_EVENT_LSC_DONE … /* Sink and source CCDC pads */ #define CCDC_PAD_SINK … #define CCDC_PAD_SOURCE_OF … #define CCDC_PAD_SOURCE_VP … #define CCDC_PADS_NUM … #define CCDC_FIELD_TOP … #define CCDC_FIELD_BOTTOM … #define CCDC_FIELD_BOTH … /* * struct isp_ccdc_device - Structure for the CCDC module to store its own * information * @subdev: V4L2 subdevice * @pads: Sink and source media entity pads * @formats: Active video formats * @crop: Active crop rectangle on the OF source pad * @input: Active input * @output: Active outputs * @video_out: Output video node * @alaw: A-law compression enabled (1) or disabled (0) * @lpf: Low pass filter enabled (1) or disabled (0) * @obclamp: Optical-black clamp enabled (1) or disabled (0) * @fpc_en: Faulty pixels correction enabled (1) or disabled (0) * @blcomp: Black level compensation configuration * @clamp: Optical-black or digital clamp configuration * @fpc: Faulty pixels correction configuration * @lsc: Lens shading compensation configuration * @update: Bitmask of controls to update during the next interrupt * @shadow_update: Controls update in progress by userspace * @bt656: Whether the input interface uses BT.656 synchronization * @fields: The fields (CCDC_FIELD_*) stored in the current buffer * @underrun: A buffer underrun occurred and a new buffer has been queued * @state: Streaming state * @lock: Serializes shadow_update with interrupt handler * @wait: Wait queue used to stop the module * @stopping: Stopping state * @running: Is the CCDC hardware running * @ioctl_lock: Serializes ioctl calls and LSC requests freeing */ struct isp_ccdc_device { … }; struct isp_device; int omap3isp_ccdc_init(struct isp_device *isp); void omap3isp_ccdc_cleanup(struct isp_device *isp); int omap3isp_ccdc_register_entities(struct isp_ccdc_device *ccdc, struct v4l2_device *vdev); void omap3isp_ccdc_unregister_entities(struct isp_ccdc_device *ccdc); int omap3isp_ccdc_busy(struct isp_ccdc_device *isp_ccdc); int omap3isp_ccdc_isr(struct isp_ccdc_device *isp_ccdc, u32 events); void omap3isp_ccdc_restore_context(struct isp_device *isp); void omap3isp_ccdc_max_rate(struct isp_ccdc_device *ccdc, unsigned int *max_rate); #endif /* OMAP3_ISP_CCDC_H */