All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Jiang <scott.jiang.linux@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>,
	<linux-media@vger.kernel.org>,
	<uclinux-dist-devel@blackfin.uclinux.org>
Cc: Scott Jiang <scott.jiang.linux@gmail.com>
Subject: [PATCH 1/2] [media] blackfin: add display support in ppi driver
Date: Fri, 12 Apr 2013 19:52:57 -0400	[thread overview]
Message-ID: <1365810779-24335-1-git-send-email-scott.jiang.linux@gmail.com> (raw)

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
---
 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(&reg->vcnt, params->height);
 		if (params->int_mask)
 			bfin_write32(&reg->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(&reg->fs1_wlhb, hsync_width);
+			bfin_write32(&reg->fs1_paspl, samples_per_line);
+			bfin_write32(&reg->fs2_wlvb, vsync_width);
+			bfin_write32(&reg->fs2_palpf, vsync_period);
+		}
 		break;
 	}
 	default:
-- 
1.7.0.4



             reply	other threads:[~2013-04-12 10:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 23:52 Scott Jiang [this message]
2013-04-12 11:32 ` [PATCH 1/2] [media] blackfin: add display support in ppi driver Hans Verkuil
2013-04-15  2:59   ` Scott Jiang
2013-04-12 23:52 ` [PATCH RFC] [media] blackfin: add video display driver Scott Jiang
2013-04-12 22:28   ` Sylwester Nawrocki
2013-04-17  6:57     ` Scott Jiang
2013-04-18 21:22       ` Sylwester Nawrocki
2013-04-24  9:26     ` Scott Jiang
2013-04-25 20:37       ` Sylwester Nawrocki
2013-04-15 15:03   ` Hans Verkuil
2013-04-16 10:41     ` Scott Jiang
2013-04-12 23:52 ` [PATCH 2/2] [media] bfin_capture: add query_dv_timings/enum_dv_timings support Scott Jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365810779-24335-1-git-send-email-scott.jiang.linux@gmail.com \
    --to=scott.jiang.linux@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.