From patchwork Mon Jun 7 10:15:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raffaele Recalcati X-Patchwork-Id: 104676 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o57AI4q9009028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Jun 2010 10:18:40 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o57AFY7C017770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Jun 2010 05:15:34 -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 o57AFXME010176; Mon, 7 Jun 2010 05:15:33 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 7073780627; Mon, 7 Jun 2010 05:15:33 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id C63AF80626 for ; Mon, 7 Jun 2010 05:15:31 -0500 (CDT) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp52.itg.ti.com (8.13.7/8.13.7) with ESMTP id o57AFV36026623 for ; Mon, 7 Jun 2010 05:15:31 -0500 (CDT) Received: from psmtp.com (na3sys009amx228.postini.com [74.125.149.112]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id o57AFUTM021430 for ; Mon, 7 Jun 2010 05:15:30 -0500 Received: from source ([209.85.214.173]) by na3sys009amx228.postini.com ([74.125.148.10]) with SMTP; Mon, 07 Jun 2010 10:15:31 GMT Received: by mail-iw0-f173.google.com with SMTP id 41so3308425iwn.4 for ; Mon, 07 Jun 2010 03:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=uLfVyHBS+7e7J0c46k5pke/ep5WJZXbqn1rbzd6/Lw8=; b=GRLG+DfmjUWWHNi9HZIV1YtikGMlv1VZs25Icq9KP5uGoF3ACyL91GfkOB6M79DrfT +PrznK/ikkPqGyl7c2hQSLrSLkf1NrAp8hhW8Ps6jSKo3axerX8AosRd+4DdXyzPukxE tF+V7yRVFQRTXjLqIbgQkb0nb5Tw3zPkqezaw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Va+a40WULOvQICAmarOg4Y/51CQNny8Seu/0GVAZ7HM/wmavnJoIDcQHk+HxIlm4Il IerM2cyc9Hb0E5Ufymy+PkGMB72gBMhsBNCO4xP1D+WMcyqxipxOMj2NwwgfbHZ4H389 hGeHH+kPDcXG2W3wGSjvH7///SKKyXzPLfh8A= MIME-Version: 1.0 Received: by 10.231.120.76 with SMTP id c12mr17054019ibr.92.1275905728713; Mon, 07 Jun 2010 03:15:28 -0700 (PDT) Received: by 10.231.172.16 with HTTP; Mon, 7 Jun 2010 03:15:28 -0700 (PDT) Date: Mon, 7 Jun 2010 12:15:28 +0200 Message-ID: Subject: [PATCH 03/12] davinci: dm365: Added swap between y and c data in isif port. From: Raffaele Recalcati To: davinci-linux-open-source X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:46.75823/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-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]); Mon, 07 Jun 2010 10:18:40 +0000 (UTC) diff --git a/drivers/media/video/davinci/isif.c b/drivers/media/video/davinci/isif.c index 29c29c6..120fcf0 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