From patchwork Mon Jun 28 06:47:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raffaele Recalcati X-Patchwork-Id: 108623 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5TDZaF6016475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 29 Jun 2010 13:47:12 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o5TDY4RT006725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Jun 2010 08:34:04 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o5TDY468011639; Tue, 29 Jun 2010 08:34:04 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 33A6A80643; Tue, 29 Jun 2010 08:33:54 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 39A8380626 for ; Mon, 28 Jun 2010 01:47:21 -0500 (CDT) Received: from neches.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id o5S6lLGx026531 for ; Mon, 28 Jun 2010 01:47:21 -0500 (CDT) Received: from psmtp.com (na3sys009amx186.postini.com [74.125.149.167]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id o5S6lKJa030283 for ; Mon, 28 Jun 2010 01:47:20 -0500 Received: from source ([74.125.82.45]) by na3sys009amx186.postini.com ([74.125.148.10]) with SMTP; Mon, 28 Jun 2010 06:47:20 GMT Received: by wwd20 with SMTP id 20so1725542wwd.4 for ; Sun, 27 Jun 2010 23:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=N0O5561at4xuZoLdyKCj4QARX+FkP4/NgfLsK4bZUf4=; b=ZqH9B2D9qUsg74c5QouNNqLUD0Ny1Q4DbzxAdeySETfjH5SwCSA3AwW9SdfRSDWQpa vFkVgPgA+6+c2NVABOYAAxJ0C8AYyD2HVjG+/bmEeQmSDJLw7aiyW/9SpCyXcCUOYKVo 5U/6e/+knY3X0UUAp8gVOwEvg9RtYghOKkKWA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=VUGXI0y2qy0tErz3Zgt2PfsX3AxkFWwQgNbtMNwSXjPKgA49GQ35JwOwK7sAK+NDq9 wpuqAq7iKNklorBWYeukMtriCGtynb53DefInJt5FKBCfJpF286cYgfSYjWLV/iVEYla Fvjz4kxeR+lmMMS9BKFHTFxFiQi1ChtBt+dQc= Received: by 10.216.85.147 with SMTP id u19mr7714252wee.109.1277707639027; Sun, 27 Jun 2010 23:47:19 -0700 (PDT) Received: from localhost.localdomain (host81-90-static.72-81-b.business.telecomitalia.it [81.72.90.81]) by mx.google.com with ESMTPS id 11sm3707526wet.2.2010.06.27.23.47.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 27 Jun 2010 23:47:18 -0700 (PDT) From: Raffaele Recalcati To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH] davinci: dm365: Added swap between y and c data in isif port. Date: Mon, 28 Jun 2010 08:47:24 +0200 Message-Id: <1277707645-3438-1-git-send-email-lamiaposta71@gmail.com> X-Mailer: git-send-email 1.7.0.4 X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S: 3.51203/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] X-Mailman-Approved-At: Tue, 29 Jun 2010 08:32:51 -0500 Cc: Murali Karicheri , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Alexey Klimov , Laurent Pinchart , Raffaele Recalcati , linux-media@vger.kernel.org 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: , MIME-Version: 1.0 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]); Tue, 29 Jun 2010 13:47:13 +0000 (UTC) diff --git a/drivers/media/video/davinci/isif.c b/drivers/media/video/davinci/isif.c index 29c29c6..02a8bdb 100644 --- a/drivers/media/video/davinci/isif.c +++ b/drivers/media/video/davinci/isif.c @@ -105,6 +105,7 @@ static struct isif_oper_config { .hd_pol = VPFE_PINPOL_POSITIVE, .pix_order = CCDC_PIXORDER_CBYCRY, .buf_type = CCDC_BUFTYPE_FLD_INTERLEAVED, + .ycswap = YCIN_NOT_SWP, }, .bayer = { .pix_fmt = CCDC_PIXFMT_RAW, @@ -864,6 +865,7 @@ static void isif_setfbaddr(unsigned long addr) static int isif_set_hw_if_params(struct vpfe_hw_if_param *params) { isif_cfg.if_type = params->if_type; + isif_cfg.ycbcr.ycswap = params->ycswap; switch (params->if_type) { case VPFE_BT656: @@ -914,7 +916,9 @@ static int isif_config_ycbcr(void) } modeset |= (VPFE_PINPOL_NEGATIVE << ISIF_VD_POL_SHIFT); regw(3, REC656IF); - ccdcfg = ccdcfg | ISIF_DATA_PACK8 | ISIF_YCINSWP_YCBCR; + ccdcfg = ccdcfg | ISIF_DATA_PACK8; + if (params->ycswap == YCIN_SWP) + ccdcfg |= ISIF_YCINSWP_YCBCR; break; case VPFE_BT656_10BIT: if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) { diff --git a/include/media/davinci/isif.h b/include/media/davinci/isif.h index b0b74ad..b123f2c 100644 --- a/include/media/davinci/isif.h +++ b/include/media/davinci/isif.h @@ -466,6 +466,8 @@ struct isif_ycbcr_config { enum vpfe_pin_pol hd_pol; /* isif 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; /* isif buffer type. Only used for ycbcr capture */ enum ccdc_buftype buf_type; }; diff --git a/include/media/davinci/vpfe_types.h b/include/media/davinci/vpfe_types.h index 76fb74b..337c917 100644 --- a/include/media/davinci/vpfe_types.h +++ b/include/media/davinci/vpfe_types.h @@ -40,12 +40,20 @@ enum vpfe_hw_if_type { VPFE_BT656_10BIT }; +/* 8 bit interface can be swapped */ +enum vpfe_data_swap { + YCIN_NOT_SWP, + YCIN_SWP, +}; + /* 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