From patchwork Fri Apr 12 23:52:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Jiang X-Patchwork-Id: 17892 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UQbZw-00044b-LP; Fri, 12 Apr 2013 12:51:36 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp id 1UQbZw-000513-9r; Fri, 12 Apr 2013 12:51:36 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754048Ab3DLKvc (ORCPT + 1 other); Fri, 12 Apr 2013 06:51:32 -0400 Received: from ch1ehsobe003.messaging.microsoft.com ([216.32.181.183]:41545 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753988Ab3DLKvb (ORCPT ); Fri, 12 Apr 2013 06:51:31 -0400 Received: from mail178-ch1-R.bigfish.com (10.43.68.237) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.23; Fri, 12 Apr 2013 10:51:30 +0000 Received: from mail178-ch1 (localhost [127.0.0.1]) by mail178-ch1-R.bigfish.com (Postfix) with ESMTP id 3B2194003E4; Fri, 12 Apr 2013 10:51:30 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI X-SpamScore: 12 X-BigFish: VS12(zzzz1f42h1fc6h1ee6h1ce5h1fdah1202h1fd0h1e76h1d1ah1cabh1d2ahzz8275bhz2ei87h2a8h668h839hd24he5bh1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h13eah1441h1504h1537h15a8h162dh1631h1758h17eeh1898h18e1h1946h19b5h1b0ahff4m1355m129fi1155h) Received-SPF: neutral (mail178-ch1: 137.71.25.55 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.55; envelope-from=scott.jiang.linux@gmail.com; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail178-ch1 (localhost.localdomain [127.0.0.1]) by mail178-ch1 (MessageSwitch) id 1365763888161697_18308; Fri, 12 Apr 2013 10:51:28 +0000 (UTC) Received: from CH1EHSMHS012.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.246]) by mail178-ch1.bigfish.com (Postfix) with ESMTP id 2525960049; Fri, 12 Apr 2013 10:51:28 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by CH1EHSMHS012.bigfish.com (10.43.70.12) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 12 Apr 2013 10:51:27 +0000 Received: from NWD2HUBCAS5.ad.analog.com (nwd2hubcas5.ad.analog.com [10.64.72.161]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id r3CAokbG030788 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 12 Apr 2013 03:50:47 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS5.ad.analog.com (10.64.72.161) with Microsoft SMTP Server id 14.3.123.3; Fri, 12 Apr 2013 06:50:06 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id r3CAo5nS005634; Fri, 12 Apr 2013 06:50:06 -0400 Received: from localhost.localdomain (unknown [10.99.24.72]) by linux.site (Postfix) with ESMTP id 078A14271511; Thu, 11 Apr 2013 21:23:01 -0600 (MDT) From: Scott Jiang To: Mauro Carvalho Chehab , , CC: Scott Jiang Subject: [PATCH 1/2] [media] blackfin: add display support in ppi driver Date: Fri, 12 Apr 2013 19:52:57 -0400 Message-ID: <1365810779-24335-1-git-send-email-scott.jiang.linux@gmail.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.4.12.103917 X-PMX-Spam: Gauge=XIIIII, Probability=15%, Report=' DATE_IN_FUTURE_12_24 1.3, FORGED_FROM_GMAIL 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1200_1299 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' Signed-off-by: Scott Jiang --- drivers/media/platform/blackfin/ppi.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/media/platform/blackfin/ppi.c b/drivers/media/platform/blackfin/ppi.c index 01b5b50..15e9c2b 100644 --- a/drivers/media/platform/blackfin/ppi.c +++ b/drivers/media/platform/blackfin/ppi.c @@ -266,6 +266,18 @@ static int ppi_set_params(struct ppi_if *ppi, struct ppi_params *params) bfin_write32(®->vcnt, params->height); if (params->int_mask) bfin_write32(®->imsk, params->int_mask & 0xFF); + if (ppi->ppi_control & PORT_DIR) { + u32 hsync_width, vsync_width, vsync_period; + + hsync_width = params->hsync + * params->bpp / params->dlen; + vsync_width = params->vsync * samples_per_line; + vsync_period = samples_per_line * params->frame; + bfin_write32(®->fs1_wlhb, hsync_width); + bfin_write32(®->fs1_paspl, samples_per_line); + bfin_write32(®->fs2_wlvb, vsync_width); + bfin_write32(®->fs2_palpf, vsync_period); + } break; } default: