From: Yoshihiro Kaneko <ykaneko0929@gmail.com>
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Damian Hobson-Garcia <dhobsong@igel.co.jp>,
Simon Horman <horms@verge.net.au>,
Magnus Damm <magnus.damm@gmail.com>,
linux-sh@vger.kernel.org
Subject: [PATCH/RFC] v4l: vsp1: Change pixel count at scale-up setting
Date: Sun, 14 Jun 2015 17:29:14 +0000 [thread overview]
Message-ID: <1434302954-31273-1-git-send-email-ykaneko0929@gmail.com> (raw)
From: Atsushi Akatsuka <atsushi.akatsuka.vb@hitachi.com>
This commit sets AMD bit of VI6_UDSn_CTRL register,
and modifies scaling formula to fit AMD bit.
Signed-off-by: Atsushi Akatsuka <atsushi.akatsuka.vb@hitachi.com>
Signed-off-by: Hiroki Negishi <hiroki.negishi.zr@hitachi-solutions.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---
This patch is based on the master branch of linuxtv.org/media_tree.git.
drivers/media/platform/vsp1/vsp1_uds.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/vsp1/vsp1_uds.c b/drivers/media/platform/vsp1/vsp1_uds.c
index ccc8243..e7a046d 100644
--- a/drivers/media/platform/vsp1/vsp1_uds.c
+++ b/drivers/media/platform/vsp1/vsp1_uds.c
@@ -64,10 +64,10 @@ static unsigned int uds_output_size(unsigned int input, unsigned int ratio)
mp = ratio / 4096;
mp = mp < 4 ? 1 : (mp < 8 ? 2 : 4);
- return (input - 1) / mp * mp * 4096 / ratio + 1;
+ return input / mp * mp * 4096 / ratio;
} else {
/* Up-scaling */
- return (input - 1) * 4096 / ratio + 1;
+ return input * 4096 / ratio;
}
}
@@ -145,7 +145,8 @@ static int uds_s_stream(struct v4l2_subdev *subdev, int enable)
vsp1_uds_write(uds, VI6_UDS_CTRL,
(uds->scale_alpha ? VI6_UDS_CTRL_AON : 0) |
- (multitap ? VI6_UDS_CTRL_BC : 0));
+ (multitap ? VI6_UDS_CTRL_BC : 0) |
+ VI6_UDS_CTRL_AMD);
vsp1_uds_write(uds, VI6_UDS_PASS_BWIDTH,
(uds_passband_width(hscale)
--
1.9.1
next reply other threads:[~2015-06-14 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-14 17:29 Yoshihiro Kaneko [this message]
2015-06-18 20:01 ` [PATCH/RFC] v4l: vsp1: Change pixel count at scale-up setting Laurent Pinchart
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=1434302954-31273-1-git-send-email-ykaneko0929@gmail.com \
--to=ykaneko0929@gmail.com \
--cc=dhobsong@igel.co.jp \
--cc=horms@verge.net.au \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=magnus.damm@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).