From patchwork Wed Apr 7 14:40:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-Philippe_Fran=C3=83=C2=A7ois?= X-Patchwork-Id: 91047 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o37EghuC018183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 7 Apr 2010 14:43:19 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o37Ef8e2002771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Apr 2010 09:41:08 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id o37Ef71v020958; Wed, 7 Apr 2010 09:41:08 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id C0C1F80627; Wed, 7 Apr 2010 09:41:06 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 4B76B80626 for ; Wed, 7 Apr 2010 09:41:05 -0500 (CDT) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id o37Ef5X3002472 for ; Wed, 7 Apr 2010 09:41:05 -0500 (CDT) Received: from psmtp.com (na3sys009amx208.postini.com [74.125.149.48]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id o37Ef2lm018778 for ; Wed, 7 Apr 2010 09:41:03 -0500 Received: from source ([212.27.42.4]) by na3sys009amx208.postini.com ([74.125.148.10]) with SMTP; Wed, 07 Apr 2010 07:41:03 PDT Received: from smtp4-g21.free.fr (localhost [127.0.0.1]) by smtp4-g21.free.fr (Postfix) with ESMTP id 147664C8197; Wed, 7 Apr 2010 16:40:57 +0200 (CEST) Received: from [192.168.10.1] (pat35-1-82-229-61-155.fbx.proxad.net [82.229.61.155]) by smtp4-g21.free.fr (Postfix) with ESMTP id 36BB54C8192; Wed, 7 Apr 2010 16:40:54 +0200 (CEST) Message-ID: <4BBC9977.8080902@cynove.com> Date: Wed, 07 Apr 2010 16:40:55 +0200 From: =?ISO-8859-1?Q?Jean-Philippe_Fran=E7ois?= User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Raffaele Recalcati Subject: Re: isif - debugging on dm365 References: In-Reply-To: X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:44.97633/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: davinci-linux-open-source X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 07 Apr 2010 14:43:19 +0000 (UTC) Index: b/drivers/media/video/davinci/dm365_ccdc.c =================================================================== --- a/drivers/media/video/davinci/dm365_ccdc.c 2010-04-02 12:10:06.000000000 +0200 +++ b/drivers/media/video/davinci/dm365_ccdc.c 2010-04-07 16:17:21.000000000 +0200 @@ -1181,8 +1181,9 @@ case VPFE_BT656_10BIT: case VPFE_YCBCR_SYNC_8: ccdc_cfg.ycbcr.pix_fmt = CCDC_PIXFMT_YCBCR_8BIT; ccdc_cfg.ycbcr.pix_order = CCDC_PIXORDER_CBYCRY; + ccdc_cfg.ycbcr.ycswap = params->ycswap; break; case VPFE_BT1120: case VPFE_YCBCR_SYNC_16: ccdc_cfg.ycbcr.pix_fmt = CCDC_PIXFMT_YCBCR_16BIT; @@ -1285,9 +1286,11 @@ modeset |= ((VPFE_PINPOL_NEGATIVE & CCDC_VD_POL_MASK) << CCDC_VD_POL_SHIFT); regw(3, REC656IF); - ccdcfg = ccdcfg | CCDC_DATA_PACK8 | CCDC_YCINSWP_YCBCR; + ccdcfg = ccdcfg | CCDC_DATA_PACK8; + if(params->ycswap == VPFE_DATA_Y) + ccdcfg |= CCDC_YCINSWP_YCBCR; break; case VPFE_BT656_10BIT: if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) { dev_dbg(dev, "Invalid pix_fmt(input mode)\n"); @@ -1308,9 +1311,10 @@ break; case VPFE_YCBCR_SYNC_8: ccdcfg |= CCDC_DATA_PACK8; - ccdcfg |= CCDC_YCINSWP_YCBCR; + if(params->ycswap == VPFE_DATA_Y) + ccdcfg |= CCDC_YCINSWP_YCBCR; if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) { dev_dbg(dev, "Invalid pix_fmt(input mode)\n"); return -EINVAL; } Index: b/include/media/davinci/vpfe_types.h =================================================================== --- a/include/media/davinci/vpfe_types.h 2009-11-16 04:42:00.000000000 +0100 +++ b/include/media/davinci/vpfe_types.h 2010-04-07 16:22:48.000000000 +0200 @@ -39,13 +39,19 @@ /* BT656 - 10 bit */ VPFE_BT656_10BIT }; +enum vpfe_data_swap { + VPFE_DATA_Y, + VPFE_DATA_C +}; + /* interface description */ struct vpfe_hw_if_param { enum vpfe_hw_if_type if_type; enum vpfe_pin_pol hdpol; enum vpfe_pin_pol vdpol; + enum vpfe_data_swap ycswap; }; #endif #endif Index: b/arch/arm/mach-davinci/board-dm365-evm.c =================================================================== --- a/arch/arm/mach-davinci/board-dm365-evm.c 2010-03-30 15:20:56.000000000 +0200 +++ b/arch/arm/mach-davinci/board-dm365-evm.c 2010-04-07 16:19:39.000000000 +0200 @@ -497,8 +497,9 @@ .ccdc_if_params = { .if_type = VPFE_YCBCR_SYNC_8, .hdpol = VPFE_PINPOL_POSITIVE, .vdpol = VPFE_PINPOL_POSITIVE, + .ycswap = VPFE_DATA_C, }, .board_info = { I2C_BOARD_INFO("mt9d131", 0x48), /* this is for PCLK rising edge */ Index: b/include/media/davinci/dm365_ccdc.h =================================================================== --- a/include/media/davinci/dm365_ccdc.h 2009-11-16 04:42:00.000000000 +0100 +++ b/include/media/davinci/dm365_ccdc.h 2010-04-07 16:18:32.000000000 +0200 @@ -674,8 +674,10 @@ /* interface HD polarity */ enum vpfe_pin_pol hd_pol; /* ccdc pix order. Only used for ycbcr capture */ enum ccdc_pixorder pix_order; + /* ccdc data connection. 8 bit ycbcr data bus connection */ + enum vpfe_data_swap ycswap; /* ccdc buffer type. Only used for ycbcr capture */ enum ccdc_buftype buf_type; };