ISP: Add CCDC offset info to board file.
Subsystems (4)
PATCH 2/3 ISP: Add CCDC offset info to board file.
From: Dominic Curran <[email protected]>
Subject: [OMAPZOOM][PATCH 2/3] ISP: Add CCDC offset info to board file.
Adds new enums which signal what component order CCDC input should expect:
ISPCCDC_INPUT_FMT_GR_BG
ISPCCDC_INPUT_FMT_RG_GB
ISPCCDC_INPUT_FMT_BG_GR
ISPCCDC_INPUT_FMT_GB_RG
These are set per sensor, and the setup has been moved to the board files.
This enum value is then passed to CCDC which turns it into a horiz/vert offset that will set the register fields:
ISPCCDC_FMT_HORZ.ISPCCDC_FMT_HORZ_FMTSPH_SHIFT ISPCCDC_FMT_VERT.ISPCCDC_FMT_VERT_FMTSLV_SHIFT
This patch causes the CCDC output component order to be consistent for all sensors regardless of the input order.
--- arch/arm/mach-omap2/board-3430sdp.c | 5 +++ arch/arm/mach-omap2/board-ldp.c | 3 +- arch/arm/mach-omap2/board-zoom2.c | 1 drivers/media/video/isp/isp.c | 1 drivers/media/video/isp/isp.h | 8 ++++++ drivers/media/video/isp/ispccdc.c | 48 ++++++++++++++++++++++++++++++++---- drivers/media/video/isp/ispccdc.h | 2 + 7 files changed, 61 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +4 -1
@@ -661,6 +661,7 @@ static struct isp_interface_config mt9p0 .prev_slv = 0, .wenlog = ISPCCDC_CFG_WENLOG_OR, .dcsub = 42, + .raw_fmt_in = ISPCCDC_INPUT_FMT_GR_BG, .u.par.par_bridge = 0x0, .u.par.par_clk_pol = 0x0, };
@@ -782,9 +783,10 @@ static struct isp_interface_config ov364 .prestrobe = 0x0, .shutter = 0x0, .prev_sph = 2, - .prev_slv = 1, + .prev_slv = 0, .wenlog = ISPCCDC_CFG_WENLOG_AND, .dcsub = OV3640_BLACK_LEVEL_10BIT, + .raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR, .u.csi.crc = 0x0, .u.csi.mode = 0x0, .u.csi.edge = 0x0,
@@ -994,6 +996,7 @@ static struct isp_interface_config imx04 .prev_slv = 0, .wenlog = ISPCCDC_CFG_WENLOG_OR, .dcsub = IMX046_BLACK_LEVEL_AVG, + .raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB, .u.csi.crc = 0x0, .u.csi.mode = 0x0, .u.csi.edge = 0x0,
arch/arm/mach-omap2/board-ldp.c +2 -1
@@ -623,9 +623,10 @@ static struct isp_interface_config ov364 .prestrobe = 0x0, .shutter = 0x0, .prev_sph = 2, - .prev_slv = 1, + .prev_slv = 0, .wenlog = ISPCCDC_CFG_WENLOG_AND, .dcsub = OV3640_BLACK_LEVEL_10BIT, + .raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR, .u.csi.crc = 0x0, .u.csi.mode = 0x0, .u.csi.edge = 0x0,
arch/arm/mach-omap2/board-zoom2.c +1 -0
@@ -372,6 +372,7 @@ static struct isp_interface_config imx04 .prev_slv = 0, .wenlog = ISPCCDC_CFG_WENLOG_OR, .dcsub = IMX046_BLACK_LEVEL_AVG, + .raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB, .u.csi.crc = 0x0, .u.csi.mode = 0x0, .u.csi.edge = 0x0,
drivers/media/video/isp/isp.c +1 -0
@@ -952,6 +952,7 @@ int isp_configure_interface(struct isp_iisppreview_set_skip (config->prev_sph, config->prev_slv);ispccdc_set_wenlog (config->wenlog);ispccdc_set_dcsub (config->dcsub); +ispccdc_set_crop_offset (config->raw_fmt_in);return 0 ; }
drivers/media/video/isp/isp.h +8 -0
@@ -123,6 +123,13 @@ enum isp_callback_type { CBK_END, }; +enum ispccdc_raw_fmt { +ISPCCDC_INPUT_FMT_GR_BG , +ISPCCDC_INPUT_FMT_RG_GB , +ISPCCDC_INPUT_FMT_BG_GR , +ISPCCDC_INPUT_FMT_GB_RG , +}; +/** * struct isp_reg - Structure for ISP register values. * @reg: 32-bit Register address.
@@ -199,6 +206,7 @@ struct isp_interface_config {u32 prev_slv;u32 wenlog;u32 dcsub; +enum ispccdc_raw_fmt raw_fmt_in; union { struct par { unsigned par_bridge:2;
drivers/media/video/isp/ispccdc.c +43 -5
82 lines not on this page · raw message
drivers/media/video/isp/ispccdc.h +2 -0
@@ -213,4 +213,6 @@ void ispccdc_set_wenlog(u32 wenlog);void ispccdc_set_dcsub (u32 dcsub); +void ispccdc_set_crop_offset (enum ispccdc_raw_fmt ); +#endif /* OMAP_ISP_CCDC_H */