* [RFC 0/3] omap3isp: add BT656 support
@ 2011-10-11 15:08 Enrico Butera
2011-10-11 15:08 ` [RFC 1/3] omap3isp: ccdc: Add interlaced field mode to platform data Enrico Butera
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Enrico Butera @ 2011-10-11 15:08 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Enrico Butera, linux-media
This patch series add support for BT656 to omap3isp. It is based
on patches from Deepthy Ravi and Javier Martinez Canillas.
To be applied on top of omap3isp-omap3isp-yuv branch at:
git.linuxtv.org/pinchartl/media.git
Enrico Butera (2):
omap3isp: ispvideo: export isp_video_mbus_to_pix
omap3isp: ispccdc: configure CCDC registers and add BT656 support
Javier Martinez Canillas (1):
omap3isp: ccdc: Add interlaced field mode to platform data
drivers/media/video/omap3isp/ispccdc.c | 143 ++++++++++++++++++++++++++-----
drivers/media/video/omap3isp/ispccdc.h | 1 +
drivers/media/video/omap3isp/ispreg.h | 1 +
drivers/media/video/omap3isp/ispvideo.c | 2 +-
drivers/media/video/omap3isp/ispvideo.h | 4 +-
include/media/omap3isp.h | 3 +
6 files changed, 129 insertions(+), 25 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [RFC 1/3] omap3isp: ccdc: Add interlaced field mode to platform data
2011-10-11 15:08 [RFC 0/3] omap3isp: add BT656 support Enrico Butera
@ 2011-10-11 15:08 ` Enrico Butera
2011-10-11 15:08 ` [RFC 2/3] omap3isp: ispvideo: export isp_video_mbus_to_pix Enrico Butera
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Enrico Butera @ 2011-10-11 15:08 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Javier Martinez Canillas, linux-media, Enrico Butera
From: Javier Martinez Canillas <martinez.javier@gmail.com>
The fldmode field from the CCDC_SYN_MODE register configure the ISP CCDC
between progresive and interlaced mode.
Adding this field to the platform data, allows boards to configure accordingly.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Enrico Butera <ebutera@users.berlios.de>
---
include/media/omap3isp.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/media/omap3isp.h b/include/media/omap3isp.h
index 3b2d2b7..0f215de 100644
--- a/include/media/omap3isp.h
+++ b/include/media/omap3isp.h
@@ -61,6 +61,8 @@ enum {
* 0 - Normal, 1 - One's complement
* @bt656: ITU-R BT656 embedded synchronization
* 0 - HS/VS sync, 1 - BT656 sync
+ * @fldmode: Field mode
+ * 0 - progressive, 1 - Interlaced
*/
struct isp_parallel_platform_data {
unsigned int data_lane_shift:2;
@@ -69,6 +71,7 @@ struct isp_parallel_platform_data {
unsigned int vs_pol:1;
unsigned int data_pol:1;
unsigned int bt656:1;
+ unsigned int fldmode:1;
};
enum {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [RFC 2/3] omap3isp: ispvideo: export isp_video_mbus_to_pix
2011-10-11 15:08 [RFC 0/3] omap3isp: add BT656 support Enrico Butera
2011-10-11 15:08 ` [RFC 1/3] omap3isp: ccdc: Add interlaced field mode to platform data Enrico Butera
@ 2011-10-11 15:08 ` Enrico Butera
2011-10-11 15:08 ` [RFC 3/3] omap3isp: ispccdc: configure CCDC registers and add BT656 support Enrico Butera
` (2 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Enrico Butera @ 2011-10-11 15:08 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Enrico Butera, linux-media
This function will be used in ispccdc.
Signed-off-by: Enrico Butera <ebutera@users.berlios.de>
---
drivers/media/video/omap3isp/ispvideo.c | 2 +-
drivers/media/video/omap3isp/ispvideo.h | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/video/omap3isp/ispvideo.c b/drivers/media/video/omap3isp/ispvideo.c
index cc73375..d59f886 100644
--- a/drivers/media/video/omap3isp/ispvideo.c
+++ b/drivers/media/video/omap3isp/ispvideo.c
@@ -164,7 +164,7 @@ static bool isp_video_is_shiftable(enum v4l2_mbus_pixelcode in,
*
* Return the number of padding bytes at end of line.
*/
-static unsigned int isp_video_mbus_to_pix(const struct isp_video *video,
+unsigned int isp_video_mbus_to_pix(const struct isp_video *video,
const struct v4l2_mbus_framefmt *mbus,
struct v4l2_pix_format *pix)
{
diff --git a/drivers/media/video/omap3isp/ispvideo.h b/drivers/media/video/omap3isp/ispvideo.h
index 52fe46b..5fa8fd7 100644
--- a/drivers/media/video/omap3isp/ispvideo.h
+++ b/drivers/media/video/omap3isp/ispvideo.h
@@ -200,7 +200,9 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video,
unsigned int error);
void omap3isp_video_resume(struct isp_video *video, int continuous);
struct media_pad *omap3isp_video_remote_pad(struct isp_video *video);
-
+extern unsigned int isp_video_mbus_to_pix(const struct isp_video *video,
+ const struct v4l2_mbus_framefmt *mbus,
+ struct v4l2_pix_format *pix);
const struct isp_format_info *
omap3isp_video_format_info(enum v4l2_mbus_pixelcode code);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [RFC 3/3] omap3isp: ispccdc: configure CCDC registers and add BT656 support
2011-10-11 15:08 [RFC 0/3] omap3isp: add BT656 support Enrico Butera
2011-10-11 15:08 ` [RFC 1/3] omap3isp: ccdc: Add interlaced field mode to platform data Enrico Butera
2011-10-11 15:08 ` [RFC 2/3] omap3isp: ispvideo: export isp_video_mbus_to_pix Enrico Butera
@ 2011-10-11 15:08 ` Enrico Butera
2011-10-11 22:04 ` [RFC 0/3] omap3isp: " Gary Thomas
2011-10-13 15:04 ` Javier Martinez Canillas
4 siblings, 0 replies; 13+ messages in thread
From: Enrico Butera @ 2011-10-11 15:08 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Enrico Butera, linux-media
This is a port of the following Deepthy Ravi patches:
[PATCH 5/8] ispccdc: Configure CCDC registers
[PATCH 6/8] ispccdc: Add support for BT656 interface
Signed-off-by: Enrico Butera <ebutera@users.berlios.de>
---
drivers/media/video/omap3isp/ispccdc.c | 143 ++++++++++++++++++++++++++-----
drivers/media/video/omap3isp/ispccdc.h | 1 +
drivers/media/video/omap3isp/ispreg.h | 1 +
3 files changed, 122 insertions(+), 23 deletions(-)
diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c
index c25db54..fde3268 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -59,8 +59,11 @@ static const unsigned int ccdc_fmts[] = {
V4L2_MBUS_FMT_SGBRG12_1X12,
V4L2_MBUS_FMT_YUYV8_2X8,
V4L2_MBUS_FMT_UYVY8_2X8,
+ V4L2_MBUS_FMT_YUYV8_2X8,
};
+static bool ccdc_input_is_bt656(struct isp_ccdc_device *ccdc);
+
/*
* ccdc_print_status - Print current CCDC Module register values.
* @ccdc: Pointer to ISP CCDC device.
@@ -792,11 +795,16 @@ static void ccdc_apply_controls(struct isp_ccdc_device *ccdc)
void omap3isp_ccdc_restore_context(struct isp_device *isp)
{
struct isp_ccdc_device *ccdc = &isp->isp_ccdc;
+ struct v4l2_mbus_framefmt *format;
isp_reg_set(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG, ISPCCDC_CFG_VDLC);
- ccdc->update = OMAP3ISP_CCDC_ALAW | OMAP3ISP_CCDC_LPF
- | OMAP3ISP_CCDC_BLCLAMP | OMAP3ISP_CCDC_BCOMP;
+ /* CCDC_PAD_SINK */
+ format = &ccdc->formats[CCDC_PAD_SINK];
+ if ((format->code != V4L2_MBUS_FMT_UYVY8_2X8) &&
+ (format->code != V4L2_MBUS_FMT_UYVY8_2X8))
+ ccdc->update = OMAP3ISP_CCDC_ALAW | OMAP3ISP_CCDC_LPF
+ | OMAP3ISP_CCDC_BLCLAMP | OMAP3ISP_CCDC_BCOMP;
ccdc_apply_controls(ccdc);
ccdc_configure_fpc(ccdc);
}
@@ -1010,6 +1018,9 @@ static void ccdc_config_sync_if(struct isp_ccdc_device *ccdc,
if (pdata && pdata->vs_pol)
syn_mode |= ISPCCDC_SYN_MODE_VDPOL;
+ if (pdata && pdata->fldmode)
+ syn_mode |= ISPCCDC_SYN_MODE_FLDMODE;
+
isp_reg_writel(isp, syn_mode, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE);
if (format->code == V4L2_MBUS_FMT_UYVY8_2X8)
@@ -1021,10 +1032,11 @@ static void ccdc_config_sync_if(struct isp_ccdc_device *ccdc,
if (pdata && pdata->bt656)
isp_reg_set(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_REC656IF,
- ISPCCDC_REC656IF_R656ON);
+ ISPCCDC_REC656IF_R656ON | ISPCCDC_REC656IF_ECCFVH);
else
isp_reg_clr(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_REC656IF,
- ISPCCDC_REC656IF_R656ON);
+ ISPCCDC_REC656IF_R656ON | ISPCCDC_REC656IF_ECCFVH);
+
}
/* CCDC formats descriptions */
@@ -1106,6 +1118,7 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
struct isp_parallel_platform_data *pdata = NULL;
struct v4l2_subdev *sensor;
struct v4l2_mbus_framefmt *format;
+ struct v4l2_pix_format pix;
const struct isp_format_info *fmt_info;
struct v4l2_subdev_format fmt_src;
unsigned int depth_out;
@@ -1164,6 +1177,9 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
/* CCDC_PAD_SINK */
format = &ccdc->formats[CCDC_PAD_SINK];
+ if (format->code == V4L2_MBUS_FMT_UYVY8_2X8)
+ isp_reg_set(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG,
+ ISPCCDC_CFG_Y8POS);
/* Mosaic filter */
switch (format->code) {
case V4L2_MBUS_FMT_SRGGB10_1X10:
@@ -1183,28 +1199,70 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
ccdc_pattern = ccdc_sgrbg_pattern;
break;
}
- ccdc_config_imgattr(ccdc, ccdc_pattern);
- /* Generate VD0 on the last line of the image and VD1 on the
- * 2/3 height line.
- */
- isp_reg_writel(isp, ((format->height - 2) << ISPCCDC_VDINT_0_SHIFT) |
- ((format->height * 2 / 3) << ISPCCDC_VDINT_1_SHIFT),
- OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VDINT);
+ if ((format->code != V4L2_MBUS_FMT_YUYV8_2X8) &&
+ (format->code != V4L2_MBUS_FMT_UYVY8_2X8))
+ ccdc_config_imgattr(ccdc, ccdc_pattern);
+
+ /* BT656: Generate VD0 on the last line of each field, and we
+ * don't use VD1.
+ * Non BT656: Generate VD0 on the last line of the image and VD1 on the
+ * 2/3 height line.
+ */
+ if (pdata->bt656)
+ isp_reg_writel(isp,
+ (format->height/2 - 2) << ISPCCDC_VDINT_0_SHIFT,
+ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VDINT);
+ else
+ isp_reg_writel(isp,
+ ((format->height - 2) << ISPCCDC_VDINT_0_SHIFT) |
+ ((format->height * 2 / 3) << ISPCCDC_VDINT_1_SHIFT),
+ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VDINT);
/* CCDC_PAD_SOURCE_OF */
format = &ccdc->formats[CCDC_PAD_SOURCE_OF];
- isp_reg_writel(isp, (0 << ISPCCDC_HORZ_INFO_SPH_SHIFT) |
+ isp_video_mbus_to_pix(&ccdc->video_out, format, &pix);
+
+ /* For BT656 the number of bytes would be width*2 */
+ if (pdata->bt656)
+ isp_reg_writel(isp, (0 << ISPCCDC_HORZ_INFO_SPH_SHIFT) |
+ ((pix.bytesperline - 1) << ISPCCDC_HORZ_INFO_NPH_SHIFT),
+ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HORZ_INFO);
+ else
+ isp_reg_writel(isp, (0 << ISPCCDC_HORZ_INFO_SPH_SHIFT) |
((format->width - 1) << ISPCCDC_HORZ_INFO_NPH_SHIFT),
OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HORZ_INFO);
isp_reg_writel(isp, 0 << ISPCCDC_VERT_START_SLV0_SHIFT,
OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VERT_START);
- isp_reg_writel(isp, (format->height - 1)
+
+ if (pdata->bt656)
+ isp_reg_writel(isp, ((format->height >> 1) - 1)
+ << ISPCCDC_VERT_LINES_NLV_SHIFT,
+ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VERT_LINES);
+ else
+ isp_reg_writel(isp, (format->height - 1)
<< ISPCCDC_VERT_LINES_NLV_SHIFT,
OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VERT_LINES);
- ccdc_config_outlineoffset(ccdc, ccdc->video_out.bpl_value, 0, 0);
+ isp_reg_clr(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
+ ISPCCDC_SDOFST_LOFST_MASK << ISPCCDC_SDOFST_LOFST0_SHIFT);
+ isp_reg_clr(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
+ ISPCCDC_SDOFST_LOFST_MASK << ISPCCDC_SDOFST_LOFST1_SHIFT);
+ isp_reg_clr(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
+ ISPCCDC_SDOFST_LOFST_MASK << ISPCCDC_SDOFST_LOFST2_SHIFT);
+ isp_reg_clr(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
+ ISPCCDC_SDOFST_LOFST_MASK << ISPCCDC_SDOFST_LOFST3_SHIFT);
+
+ /* In case of BT656 each alternate line must be stored into memory */
+ if (pdata->bt656) {
+ ccdc_config_outlineoffset(ccdc, pix.bytesperline, EVENEVEN, 1);
+ ccdc_config_outlineoffset(ccdc, pix.bytesperline, EVENODD, 1);
+ ccdc_config_outlineoffset(ccdc, pix.bytesperline, ODDEVEN, 1);
+ ccdc_config_outlineoffset(ccdc, pix.bytesperline, ODDODD, 1);
+ } else {
+ ccdc_config_outlineoffset(ccdc, ccdc->video_out.bpl_value, 0, 0);
+ }
/* CCDC_PAD_SOURCE_VP */
format = &ccdc->formats[CCDC_PAD_SOURCE_VP];
@@ -1223,8 +1281,14 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
/* Use PACK8 mode for 1byte per pixel formats. */
if (omap3isp_video_format_info(format->code)->width <= 8)
syn_mode |= ISPCCDC_SYN_MODE_PACK8;
- else
- syn_mode &= ~ISPCCDC_SYN_MODE_PACK8;
+
+ if ((format->code == V4L2_MBUS_FMT_YUYV8_2X8) ||
+ (format->code == V4L2_MBUS_FMT_UYVY8_2X8)) {
+ if (pdata->bt656)
+ syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR8;
+ else
+ syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR16;
+ }
isp_reg_writel(isp, syn_mode, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE);
@@ -1251,6 +1315,11 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
unlock:
spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags);
+ if (pdata->bt656)
+ ccdc->update = OMAP3ISP_CCDC_BLCLAMP;
+ else
+ ccdc->update = 0;
+
ccdc_apply_controls(ccdc);
}
@@ -1262,6 +1331,7 @@ static void __ccdc_enable(struct isp_ccdc_device *ccdc, int enable)
ISPCCDC_PCR_EN, enable ? ISPCCDC_PCR_EN : 0);
}
+static int __ccdc_handle_stopping(struct isp_ccdc_device *ccdc, u32 event);
static int ccdc_disable(struct isp_ccdc_device *ccdc)
{
unsigned long flags;
@@ -1272,6 +1342,11 @@ static int ccdc_disable(struct isp_ccdc_device *ccdc)
ccdc->stopping = CCDC_STOP_REQUEST;
spin_unlock_irqrestore(&ccdc->lock, flags);
+ __ccdc_lsc_enable(ccdc, 0);
+ __ccdc_enable(ccdc, 0);
+ ccdc->stopping = CCDC_STOP_EXECUTED;
+ __ccdc_handle_stopping(ccdc, CCDC_STOP_FINISHED);
+
ret = wait_event_timeout(ccdc->wait,
ccdc->stopping == CCDC_STOP_FINISHED,
msecs_to_jiffies(2000));
@@ -1523,10 +1598,30 @@ static void ccdc_vd0_isr(struct isp_ccdc_device *ccdc)
{
unsigned long flags;
int restart = 0;
+ struct isp_device *isp = to_isp_device(ccdc);
- if (ccdc->output & CCDC_OUTPUT_MEMORY)
- restart = ccdc_isr_buffer(ccdc);
-
+ if (ccdc->output & CCDC_OUTPUT_MEMORY) {
+ if (ccdc_input_is_bt656(ccdc)) {
+ u32 fid;
+ u32 syn_mode = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCDC,
+ ISPCCDC_SYN_MODE);
+ fid = syn_mode & ISPCCDC_SYN_MODE_FLDSTAT;
+ /* toggle the software maintained fid */
+ ccdc->fldstat ^= 1;
+
+ if (fid == ccdc->fldstat) {
+ if (fid == 0) {
+ restart = ccdc_isr_buffer(ccdc);
+ goto done;
+ }
+ } else if (fid == 0) {
+ ccdc->fldstat = fid;
+ }
+ } else {
+ restart = ccdc_isr_buffer(ccdc);
+ }
+ }
+done:
spin_lock_irqsave(&ccdc->lock, flags);
if (__ccdc_handle_stopping(ccdc, CCDC_EVENT_VD0)) {
spin_unlock_irqrestore(&ccdc->lock, flags);
@@ -1612,7 +1707,8 @@ int omap3isp_ccdc_isr(struct isp_ccdc_device *ccdc, u32 events)
if (ccdc->state == ISP_PIPELINE_STREAM_STOPPED)
return 0;
- if (events & IRQ0STATUS_CCDC_VD1_IRQ)
+ if (!ccdc_input_is_bt656(ccdc) &&
+ (events & IRQ0STATUS_CCDC_VD1_IRQ))
ccdc_vd1_isr(ccdc);
ccdc_lsc_isr(ccdc, events);
@@ -1620,7 +1716,8 @@ int omap3isp_ccdc_isr(struct isp_ccdc_device *ccdc, u32 events)
if (events & IRQ0STATUS_CCDC_VD0_IRQ)
ccdc_vd0_isr(ccdc);
- if (events & IRQ0STATUS_HS_VS_IRQ)
+ if (!ccdc_input_is_bt656(ccdc) &&
+ (events & IRQ0STATUS_HS_VS_IRQ))
ccdc_hs_vs_isr(ccdc);
return 0;
@@ -1734,7 +1831,7 @@ static int ccdc_set_stream(struct v4l2_subdev *sd, int enable)
* links are inactive.
*/
ccdc_config_vp(ccdc);
- ccdc_enable_vp(ccdc, 1);
+ ccdc_enable_vp(ccdc, 0);
ccdc->error = 0;
ccdc_print_status(ccdc);
}
@@ -2284,7 +2381,7 @@ int omap3isp_ccdc_init(struct isp_device *isp)
ccdc->vpcfg.pixelclk = 0;
- ccdc->update = OMAP3ISP_CCDC_BLCLAMP;
+ ccdc->update = 0;
ccdc_apply_controls(ccdc);
ret = ccdc_init_entities(ccdc);
diff --git a/drivers/media/video/omap3isp/ispccdc.h b/drivers/media/video/omap3isp/ispccdc.h
index 54811ce..7f933b2 100644
--- a/drivers/media/video/omap3isp/ispccdc.h
+++ b/drivers/media/video/omap3isp/ispccdc.h
@@ -159,6 +159,7 @@ struct isp_ccdc_device {
struct ispccdc_vp vpcfg;
unsigned int underrun:1;
+ unsigned int fldstat:1;
enum isp_pipeline_stream_state state;
spinlock_t lock;
wait_queue_head_t wait;
diff --git a/drivers/media/video/omap3isp/ispreg.h b/drivers/media/video/omap3isp/ispreg.h
index 69f6af6..ada39c6 100644
--- a/drivers/media/video/omap3isp/ispreg.h
+++ b/drivers/media/video/omap3isp/ispreg.h
@@ -827,6 +827,7 @@
#define ISPCCDC_SDOFST_LOFST2_SHIFT 3
#define ISPCCDC_SDOFST_LOFST1_SHIFT 6
#define ISPCCDC_SDOFST_LOFST0_SHIFT 9
+#define ISPCCDC_SDOFST_LOFST_MASK 0x7
#define EVENEVEN 1
#define ODDEVEN 2
#define EVENODD 3
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-11 15:08 [RFC 0/3] omap3isp: add BT656 support Enrico Butera
` (2 preceding siblings ...)
2011-10-11 15:08 ` [RFC 3/3] omap3isp: ispccdc: configure CCDC registers and add BT656 support Enrico Butera
@ 2011-10-11 22:04 ` Gary Thomas
2011-10-11 22:25 ` Enrico
2011-10-13 15:04 ` Javier Martinez Canillas
4 siblings, 1 reply; 13+ messages in thread
From: Gary Thomas @ 2011-10-11 22:04 UTC (permalink / raw)
To: Enrico Butera; +Cc: Laurent Pinchart, linux-media
[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]
On 2011-10-11 09:08, Enrico Butera wrote:
> This patch series add support for BT656 to omap3isp. It is based
> on patches from Deepthy Ravi and Javier Martinez Canillas.
>
> To be applied on top of omap3isp-omap3isp-yuv branch at:
>
> git.linuxtv.org/pinchartl/media.git
>
> Enrico Butera (2):
> omap3isp: ispvideo: export isp_video_mbus_to_pix
> omap3isp: ispccdc: configure CCDC registers and add BT656 support
>
> Javier Martinez Canillas (1):
> omap3isp: ccdc: Add interlaced field mode to platform data
>
> drivers/media/video/omap3isp/ispccdc.c | 143 ++++++++++++++++++++++++++-----
> drivers/media/video/omap3isp/ispccdc.h | 1 +
> drivers/media/video/omap3isp/ispreg.h | 1 +
> drivers/media/video/omap3isp/ispvideo.c | 2 +-
> drivers/media/video/omap3isp/ispvideo.h | 4 +-
> include/media/omap3isp.h | 3 +
> 6 files changed, 129 insertions(+), 25 deletions(-)
>
Sorry, this just locks up on boot for me, immediately after finding the TVP5150.
I applied your changes to the above tree
commit 658d5e03dc1a7283e5119cd0e9504759dbd3d912
Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Wed Aug 31 16:03:53 2011 +0200
However, it does not build for my OMAP3530 without the attached patches.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
[-- Attachment #2: yuv.patch --]
[-- Type: text/plain, Size: 1288 bytes --]
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index b5ef362..045bcf8 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -38,6 +38,7 @@
#include <linux/irq.h>
#include <linux/videodev2.h>
#include <linux/dma-mapping.h>
+#include <linux/slab.h>
#include <media/videobuf-dma-contig.h>
#include <media/v4l2-device.h>
@@ -2194,6 +2195,7 @@ static int __init omap_vout_probe(struct platform_device *pdev)
"'%s' Display already enabled\n",
def_display->name);
}
+#if 0 // This code generates compile errors?
/* set the update mode */
if (def_display->caps &
OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) {
@@ -2207,6 +2209,7 @@ static int __init omap_vout_probe(struct platform_device *pdev)
dssdrv->set_update_mode(def_display,
OMAP_DSS_UPDATE_AUTO);
}
+#endif
}
}
diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c
index fde3268..7d059b6 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -31,6 +31,7 @@
#include <linux/dma-mapping.h>
#include <linux/mm.h>
#include <linux/sched.h>
+#include <linux/slab.h>
#include <media/v4l2-event.h>
#include "isp.h"
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-11 22:04 ` [RFC 0/3] omap3isp: " Gary Thomas
@ 2011-10-11 22:25 ` Enrico
2011-10-11 22:34 ` Gary Thomas
0 siblings, 1 reply; 13+ messages in thread
From: Enrico @ 2011-10-11 22:25 UTC (permalink / raw)
To: Gary Thomas; +Cc: Laurent Pinchart, linux-media
On Wed, Oct 12, 2011 at 12:04 AM, Gary Thomas <gary@mlbassoc.com> wrote:
> Sorry, this just locks up on boot for me, immediately after finding the
> TVP5150.
> I applied your changes to the above tree
> commit 658d5e03dc1a7283e5119cd0e9504759dbd3d912
> Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Date: Wed Aug 31 16:03:53 2011 +0200
Did you add Javier patches for the tvp5150?
> However, it does not build for my OMAP3530 without the attached patches.
I can't remember now if i had omap vout enabled in my kernel config
but that one in ispccdc.c is strange, tomorrow i will do again a clean
rebuild.
Enrico
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-11 22:25 ` Enrico
@ 2011-10-11 22:34 ` Gary Thomas
2011-10-11 22:36 ` Gary Thomas
2011-10-12 8:07 ` Enrico
0 siblings, 2 replies; 13+ messages in thread
From: Gary Thomas @ 2011-10-11 22:34 UTC (permalink / raw)
To: Enrico; +Cc: Laurent Pinchart, linux-media
On 2011-10-11 16:25, Enrico wrote:
> On Wed, Oct 12, 2011 at 12:04 AM, Gary Thomas<gary@mlbassoc.com> wrote:
>> Sorry, this just locks up on boot for me, immediately after finding the
>> TVP5150.
>> I applied your changes to the above tree
>> commit 658d5e03dc1a7283e5119cd0e9504759dbd3d912
>> Author: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
>> Date: Wed Aug 31 16:03:53 2011 +0200
>
> Did you add Javier patches for the tvp5150?
No, I thought your set was self-contained. I'll add them now.
>
>> However, it does not build for my OMAP3530 without the attached patches.
>
> I can't remember now if i had omap vout enabled in my kernel config
> but that one in ispccdc.c is strange, tomorrow i will do again a clean
> rebuild.
I can't see how to turn off omap_vout
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-11 22:34 ` Gary Thomas
@ 2011-10-11 22:36 ` Gary Thomas
2011-10-11 22:48 ` Enrico
2011-10-12 8:07 ` Enrico
1 sibling, 1 reply; 13+ messages in thread
From: Gary Thomas @ 2011-10-11 22:36 UTC (permalink / raw)
To: Enrico; +Cc: Laurent Pinchart, linux-media
On 2011-10-11 16:34, Gary Thomas wrote:
> On 2011-10-11 16:25, Enrico wrote:
>> On Wed, Oct 12, 2011 at 12:04 AM, Gary Thomas<gary@mlbassoc.com> wrote:
>>> Sorry, this just locks up on boot for me, immediately after finding the
>>> TVP5150.
>>> I applied your changes to the above tree
>>> commit 658d5e03dc1a7283e5119cd0e9504759dbd3d912
>>> Author: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
>>> Date: Wed Aug 31 16:03:53 2011 +0200
>>
>> Did you add Javier patches for the tvp5150?
>
> No, I thought your set was self-contained. I'll add them now.
That said, it's not clear the current/final state of them. I don't see any repost
after the very long discussion with Laurent.
Maybe you could just send that file to me directly?
>
>>
>>> However, it does not build for my OMAP3530 without the attached patches.
>>
>> I can't remember now if i had omap vout enabled in my kernel config
>> but that one in ispccdc.c is strange, tomorrow i will do again a clean
>> rebuild.
>
> I can't see how to turn off omap_vout
>
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-11 22:36 ` Gary Thomas
@ 2011-10-11 22:48 ` Enrico
0 siblings, 0 replies; 13+ messages in thread
From: Enrico @ 2011-10-11 22:48 UTC (permalink / raw)
To: Gary Thomas; +Cc: Laurent Pinchart, linux-media
On Wed, Oct 12, 2011 at 12:36 AM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2011-10-11 16:34, Gary Thomas wrote:
>>
>> On 2011-10-11 16:25, Enrico wrote:
>>>
>>> On Wed, Oct 12, 2011 at 12:04 AM, Gary Thomas<gary@mlbassoc.com> wrote:
>>>>
>>>> Sorry, this just locks up on boot for me, immediately after finding the
>>>> TVP5150.
>>>> I applied your changes to the above tree
>>>> commit 658d5e03dc1a7283e5119cd0e9504759dbd3d912
>>>> Author: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
>>>> Date: Wed Aug 31 16:03:53 2011 +0200
>>>
>>> Did you add Javier patches for the tvp5150?
>>
>> No, I thought your set was self-contained. I'll add them now.
>
> That said, it's not clear the current/final state of them. I don't see any
> repost
> after the very long discussion with Laurent.
Me too, and i don't remeber if Javier is going/was requested to send a v2.
> Maybe you could just send that file to me directly?
I'm not at work now but you can find the patches here:
https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
They should apply cleanly.
Enrico
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-11 22:34 ` Gary Thomas
2011-10-11 22:36 ` Gary Thomas
@ 2011-10-12 8:07 ` Enrico
2011-10-12 12:15 ` Gary Thomas
1 sibling, 1 reply; 13+ messages in thread
From: Enrico @ 2011-10-12 8:07 UTC (permalink / raw)
To: Gary Thomas; +Cc: Laurent Pinchart, linux-media
On Wed, Oct 12, 2011 at 12:34 AM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2011-10-11 16:25, Enrico wrote:
>>
>> On Wed, Oct 12, 2011 at 12:04 AM, Gary Thomas<gary@mlbassoc.com> wrote:
>>>
>>> Sorry, this just locks up on boot for me, immediately after finding the
>>> TVP5150.
>>> I applied your changes to the above tree
>>> commit 658d5e03dc1a7283e5119cd0e9504759dbd3d912
>>> Author: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
>>> Date: Wed Aug 31 16:03:53 2011 +0200
>>
>> Did you add Javier patches for the tvp5150?
>
> No, I thought your set was self-contained. I'll add them now.
>
>>
>>> However, it does not build for my OMAP3530 without the attached patches.
>>
>> I can't remember now if i had omap vout enabled in my kernel config
>> but that one in ispccdc.c is strange, tomorrow i will do again a clean
>> rebuild.
>
> I can't see how to turn off omap_vout
In multimedia/video capture/omap2 video4linux
I had it disabled and enabling it gave me an error too, but it's not
something that is changed by my patches so it is broken in the -yuv
tree.
I made a distclean rebuild and i don't have any errors, are you sure
you need that include in ispccdc.c?
Enrico
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-12 8:07 ` Enrico
@ 2011-10-12 12:15 ` Gary Thomas
0 siblings, 0 replies; 13+ messages in thread
From: Gary Thomas @ 2011-10-12 12:15 UTC (permalink / raw)
To: Enrico; +Cc: Laurent Pinchart, linux-media
On 2011-10-12 02:07, Enrico wrote:
> On Wed, Oct 12, 2011 at 12:34 AM, Gary Thomas<gary@mlbassoc.com> wrote:
>> On 2011-10-11 16:25, Enrico wrote:
>>>
>>> On Wed, Oct 12, 2011 at 12:04 AM, Gary Thomas<gary@mlbassoc.com> wrote:
>>>>
>>>> Sorry, this just locks up on boot for me, immediately after finding the
>>>> TVP5150.
>>>> I applied your changes to the above tree
>>>> commit 658d5e03dc1a7283e5119cd0e9504759dbd3d912
>>>> Author: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
>>>> Date: Wed Aug 31 16:03:53 2011 +0200
>>>
>>> Did you add Javier patches for the tvp5150?
>>
>> No, I thought your set was self-contained. I'll add them now.
>>
>>>
>>>> However, it does not build for my OMAP3530 without the attached patches.
>>>
>>> I can't remember now if i had omap vout enabled in my kernel config
>>> but that one in ispccdc.c is strange, tomorrow i will do again a clean
>>> rebuild.
>>
>> I can't see how to turn off omap_vout
>
> In multimedia/video capture/omap2 video4linux
>
> I had it disabled and enabling it gave me an error too, but it's not
> something that is changed by my patches so it is broken in the -yuv
> tree.
>
> I made a distclean rebuild and i don't have any errors, are you sure
> you need that include in ispccdc.c?
Yes, I started from a 100% clean build + tree. Without that change,
I get a compile error. With it, and the TVP patches, I can now grab
some video from my camera.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-11 15:08 [RFC 0/3] omap3isp: add BT656 support Enrico Butera
` (3 preceding siblings ...)
2011-10-11 22:04 ` [RFC 0/3] omap3isp: " Gary Thomas
@ 2011-10-13 15:04 ` Javier Martinez Canillas
2011-10-27 16:16 ` Enrico
4 siblings, 1 reply; 13+ messages in thread
From: Javier Martinez Canillas @ 2011-10-13 15:04 UTC (permalink / raw)
To: Enrico Butera, Gary Thomas, Adam Pledger, Deepthy Ravi,
Sakari Ailus
Cc: Laurent Pinchart, linux-media
On Tue, Oct 11, 2011 at 5:08 PM, Enrico Butera <ebutera@users.berlios.de> wrote:
> This patch series add support for BT656 to omap3isp. It is based
> on patches from Deepthy Ravi and Javier Martinez Canillas.
>
> To be applied on top of omap3isp-omap3isp-yuv branch at:
>
> git.linuxtv.org/pinchartl/media.git
>
> Enrico Butera (2):
> omap3isp: ispvideo: export isp_video_mbus_to_pix
> omap3isp: ispccdc: configure CCDC registers and add BT656 support
>
> Javier Martinez Canillas (1):
> omap3isp: ccdc: Add interlaced field mode to platform data
>
> drivers/media/video/omap3isp/ispccdc.c | 143 ++++++++++++++++++++++++++-----
> drivers/media/video/omap3isp/ispccdc.h | 1 +
> drivers/media/video/omap3isp/ispreg.h | 1 +
> drivers/media/video/omap3isp/ispvideo.c | 2 +-
> drivers/media/video/omap3isp/ispvideo.h | 4 +-
> include/media/omap3isp.h | 3 +
> 6 files changed, 129 insertions(+), 25 deletions(-)
>
> --
> 1.7.4.1
>
Hello Laurent, Sakari and Deepthy,
Did you take a look at Enrico's patches?
We (Enrico, Gary and me) really want to add support both for
interlaced mode and BT.656 video data format to the ISP driver.
We are putting a lot of effort to this task but need the help of
someone who knows better than use the ISP internals. So, we will be
very happy if you can help us with this. We will address any issue you
find with the patches.
Right know we can get video in YUV format (CCDC BT.656 decoding and
deinterlacing is already working) from the CCDC ouput pad
(/dev/video2) but we have some ghosting effect and don't know what is
causing this nor how to fix.
Thank a lot and best regards,
--
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC 0/3] omap3isp: add BT656 support
2011-10-13 15:04 ` Javier Martinez Canillas
@ 2011-10-27 16:16 ` Enrico
0 siblings, 0 replies; 13+ messages in thread
From: Enrico @ 2011-10-27 16:16 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Gary Thomas, Adam Pledger, Deepthy Ravi, Sakari Ailus,
linux-media, Javier Martinez Canillas
On Thu, Oct 13, 2011 at 5:04 PM, Javier Martinez Canillas
<martinez.javier@gmail.com> wrote:
> On Tue, Oct 11, 2011 at 5:08 PM, Enrico Butera <ebutera@users.berlios.de> wrote:
>> This patch series add support for BT656 to omap3isp. It is based
>> on patches from Deepthy Ravi and Javier Martinez Canillas.
>>
>> To be applied on top of omap3isp-omap3isp-yuv branch at:
>>
>> git.linuxtv.org/pinchartl/media.git
>>
>> Enrico Butera (2):
>> omap3isp: ispvideo: export isp_video_mbus_to_pix
>> omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>
>> Javier Martinez Canillas (1):
>> omap3isp: ccdc: Add interlaced field mode to platform data
>>
>> drivers/media/video/omap3isp/ispccdc.c | 143 ++++++++++++++++++++++++++-----
>> drivers/media/video/omap3isp/ispccdc.h | 1 +
>> drivers/media/video/omap3isp/ispreg.h | 1 +
>> drivers/media/video/omap3isp/ispvideo.c | 2 +-
>> drivers/media/video/omap3isp/ispvideo.h | 4 +-
>> include/media/omap3isp.h | 3 +
>> 6 files changed, 129 insertions(+), 25 deletions(-)
>>
>> --
>> 1.7.4.1
>>
>
> Hello Laurent, Sakari and Deepthy,
>
> Did you take a look at Enrico's patches?
>
> We (Enrico, Gary and me) really want to add support both for
> interlaced mode and BT.656 video data format to the ISP driver.
>
> We are putting a lot of effort to this task but need the help of
> someone who knows better than use the ISP internals. So, we will be
> very happy if you can help us with this. We will address any issue you
> find with the patches.
>
> Right know we can get video in YUV format (CCDC BT.656 decoding and
> deinterlacing is already working) from the CCDC ouput pad
> (/dev/video2) but we have some ghosting effect and don't know what is
> causing this nor how to fix.
>
> Thank a lot and best regards,
>
> --
> Javier Martínez Canillas
> (+34) 682 39 81 69
> Barcelona, Spain
Ping?
Enrico
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-10-27 16:16 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 15:08 [RFC 0/3] omap3isp: add BT656 support Enrico Butera
2011-10-11 15:08 ` [RFC 1/3] omap3isp: ccdc: Add interlaced field mode to platform data Enrico Butera
2011-10-11 15:08 ` [RFC 2/3] omap3isp: ispvideo: export isp_video_mbus_to_pix Enrico Butera
2011-10-11 15:08 ` [RFC 3/3] omap3isp: ispccdc: configure CCDC registers and add BT656 support Enrico Butera
2011-10-11 22:04 ` [RFC 0/3] omap3isp: " Gary Thomas
2011-10-11 22:25 ` Enrico
2011-10-11 22:34 ` Gary Thomas
2011-10-11 22:36 ` Gary Thomas
2011-10-11 22:48 ` Enrico
2011-10-12 8:07 ` Enrico
2011-10-12 12:15 ` Gary Thomas
2011-10-13 15:04 ` Javier Martinez Canillas
2011-10-27 16:16 ` Enrico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox