From patchwork Tue Aug 11 21:01:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 40762 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7BL2UDP027718 for ; Tue, 11 Aug 2009 21:02:31 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n7BL2PYw027546 for ; Tue, 11 Aug 2009 16:02:30 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id n7BL2Mdj028633 for ; Tue, 11 Aug 2009 16:02:23 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4432280640 for ; Tue, 11 Aug 2009 16:01:58 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dlep35.itg.ti.com (dlep35.itg.ti.com [157.170.170.118]) by linux.omap.com (Postfix) with ESMTP id 1F82680626 for ; Tue, 11 Aug 2009 16:01:41 -0500 (CDT) Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n7BL1e1C011577; Tue, 11 Aug 2009 16:01:40 -0500 (CDT) Received: from gt516km11.gt.design.ti.com (gt516km11.gt.design.ti.com [158.218.100.179]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id n7BL1eZ11258; Tue, 11 Aug 2009 16:01:40 -0500 (CDT) Received: from gt516km11.gt.design.ti.com (localhost.localdomain [127.0.0.1]) by gt516km11.gt.design.ti.com (8.13.1/8.13.1) with ESMTP id n7BL1dij005111; Tue, 11 Aug 2009 17:01:39 -0400 Received: (from a0868495@localhost) by gt516km11.gt.design.ti.com (8.13.1/8.13.1/Submit) id n7BL1dni005108; Tue, 11 Aug 2009 17:01:39 -0400 From: m-karicheri2@ti.com To: linux-media@vger.kernel.org Date: Tue, 11 Aug 2009 17:01:39 -0400 Message-Id: <1250024499-5087-1-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.6.0.4 Cc: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 2/4 - v2] V4L: ccdc driver - adding support for camera capture X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com From: Muralidharan Karicheri There was no comment against v1 of the patch. So no change in this file Reviewed-by: Hans Verkuil Signed-off-by: Muralidharan Karicheri --- Applies to V4L-DVB linux-next repository drivers/media/video/davinci/dm355_ccdc.c | 16 +++++++++++----- drivers/media/video/davinci/dm644x_ccdc.c | 13 +++++++++---- include/media/davinci/dm355_ccdc.h | 2 +- include/media/davinci/dm644x_ccdc.h | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/media/video/davinci/dm355_ccdc.c b/drivers/media/video/davinci/dm355_ccdc.c index 4629cab..4efffc2 100644 --- a/drivers/media/video/davinci/dm355_ccdc.c +++ b/drivers/media/video/davinci/dm355_ccdc.c @@ -92,7 +92,7 @@ static struct ccdc_params_raw ccdc_hw_params_raw = { /* Object for CCDC ycbcr mode */ static struct ccdc_params_ycbcr ccdc_hw_params_ycbcr = { - .win = CCDC_WIN_PAL, + .win = CCDC_WIN_NTSC, .pix_fmt = CCDC_PIXFMT_YCBCR_8BIT, .frm_fmt = CCDC_FRMFMT_INTERLACED, .fid_pol = VPFE_PINPOL_POSITIVE, @@ -548,7 +548,7 @@ static int ccdc_config_vdfc(struct ccdc_vertical_dft *dfc) */ static void ccdc_config_csc(struct ccdc_csc *csc) { - u32 val1, val2; + u32 val1 = 0, val2; int i; if (!csc->enable) @@ -925,8 +925,11 @@ static int ccdc_set_hw_if_params(struct vpfe_hw_if_param *params) ccdc_hw_params_ycbcr.vd_pol = params->vdpol; ccdc_hw_params_ycbcr.hd_pol = params->hdpol; break; + case VPFE_RAW_BAYER: + ccdc_hw_params_raw.vd_pol = params->vdpol; + ccdc_hw_params_raw.hd_pol = params->hdpol; + break; default: - /* TODO add support for raw bayer here */ return -EINVAL; } return 0; @@ -961,9 +964,12 @@ static struct ccdc_hw_device ccdc_hw_dev = { static int dm355_ccdc_init(void) { + int ret; + printk(KERN_NOTICE "dm355_ccdc_init\n"); - if (vpfe_register_ccdc_device(&ccdc_hw_dev) < 0) - return -1; + ret = vpfe_register_ccdc_device(&ccdc_hw_dev); + if (ret < 0) + return ret; printk(KERN_NOTICE "%s is registered with vpfe.\n", ccdc_hw_dev.name); return 0; diff --git a/drivers/media/video/davinci/dm644x_ccdc.c b/drivers/media/video/davinci/dm644x_ccdc.c index 2f19a91..5dff8d9 100644 --- a/drivers/media/video/davinci/dm644x_ccdc.c +++ b/drivers/media/video/davinci/dm644x_ccdc.c @@ -65,7 +65,7 @@ static struct ccdc_params_raw ccdc_hw_params_raw = { static struct ccdc_params_ycbcr ccdc_hw_params_ycbcr = { .pix_fmt = CCDC_PIXFMT_YCBCR_8BIT, .frm_fmt = CCDC_FRMFMT_INTERLACED, - .win = CCDC_WIN_PAL, + .win = CCDC_WIN_NTSC, .fid_pol = VPFE_PINPOL_POSITIVE, .vd_pol = VPFE_PINPOL_POSITIVE, .hd_pol = VPFE_PINPOL_POSITIVE, @@ -825,8 +825,10 @@ static int ccdc_set_hw_if_params(struct vpfe_hw_if_param *params) ccdc_hw_params_ycbcr.vd_pol = params->vdpol; ccdc_hw_params_ycbcr.hd_pol = params->hdpol; break; + case VPFE_RAW_BAYER: + ccdc_hw_params_raw.vd_pol = params->vdpol; + ccdc_hw_params_raw.hd_pol = params->hdpol; default: - /* TODO add support for raw bayer here */ return -EINVAL; } return 0; @@ -861,9 +863,12 @@ static struct ccdc_hw_device ccdc_hw_dev = { static int dm644x_ccdc_init(void) { + int ret; + printk(KERN_NOTICE "dm644x_ccdc_init\n"); - if (vpfe_register_ccdc_device(&ccdc_hw_dev) < 0) - return -1; + ret = vpfe_register_ccdc_device(&ccdc_hw_dev); + if (ret < 0) + return ret; printk(KERN_NOTICE "%s is registered with vpfe.\n", ccdc_hw_dev.name); return 0; diff --git a/include/media/davinci/dm355_ccdc.h b/include/media/davinci/dm355_ccdc.h index df8a7b1..9395900 100644 --- a/include/media/davinci/dm355_ccdc.h +++ b/include/media/davinci/dm355_ccdc.h @@ -254,7 +254,7 @@ struct ccdc_config_params_raw { #ifdef __KERNEL__ #include -#define CCDC_WIN_PAL {0, 0, 720, 576} +#define CCDC_WIN_NTSC {0, 0, 720, 480} #define CCDC_WIN_VGA {0, 0, 640, 480} struct ccdc_params_ycbcr { diff --git a/include/media/davinci/dm644x_ccdc.h b/include/media/davinci/dm644x_ccdc.h index 3e178eb..e34a54a 100644 --- a/include/media/davinci/dm644x_ccdc.h +++ b/include/media/davinci/dm644x_ccdc.h @@ -131,7 +131,7 @@ struct ccdc_config_params_raw { #define NUM_EXTRALINES 8 /* settings for commonly used video formats */ -#define CCDC_WIN_PAL {0, 0, 720, 576} +#define CCDC_WIN_NTSC {0, 0, 720, 480} /* ntsc square pixel */ #define CCDC_WIN_VGA {0, 0, (640 + NUM_EXTRAPIXELS), (480 + NUM_EXTRALINES)}