From: Amber Jain <amber@ti.com>
To: linux-omap@vger.kernel.org
Cc: tomi.valkeinen@ti.com, molnar@ti.com, Amber Jain <amber@ti.com>
Subject: [PATCH 2/5] OMAP: DSS2: configuring non-zero values for fir_hinc/fir_vinc
Date: Thu, 19 May 2011 11:01:27 +0530 [thread overview]
Message-ID: <1305783090-21214-3-git-send-email-amber@ti.com> (raw)
In-Reply-To: <1305783090-21214-1-git-send-email-amber@ti.com>
fir_hinc and fir_vinc can only have a non-zero value as per TRM.
Hence removed the if...else condition and also made the necesary changes
caused as the result of the condition removal.
Signed-off-by: Amber Jain <amber@ti.com>
---
drivers/video/omap2/dss/dispc.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index e680528..92169bb 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1128,15 +1128,8 @@ static void _dispc_set_scaling(enum omap_plane plane,
_dispc_set_scale_coef(plane, hscaleup, vscaleup, five_taps);
- if (!orig_width || orig_width == out_width)
- fir_hinc = 0;
- else
- fir_hinc = 1024 * orig_width / out_width;
-
- if (!orig_height || orig_height == out_height)
- fir_vinc = 0;
- else
- fir_vinc = 1024 * orig_height / out_height;
+ fir_hinc = 1024 * orig_width / out_width;
+ fir_vinc = 1024 * orig_height / out_height;
_dispc_set_fir(plane, fir_hinc, fir_vinc);
@@ -1144,8 +1137,8 @@ static void _dispc_set_scaling(enum omap_plane plane,
/* RESIZEENABLE and VERTICALTAPS */
l &= ~((0x3 << 5) | (0x1 << 21));
- l |= fir_hinc ? (1 << 5) : 0;
- l |= fir_vinc ? (1 << 6) : 0;
+ l |= (orig_width != out_width) ? (1 << 5) : 0;
+ l |= (orig_height != out_height) ? (1 << 6) : 0;
l |= five_taps ? (1 << 21) : 0;
/* VRESIZECONF and HRESIZECONF */
--
1.7.1
next prev parent reply other threads:[~2011-05-19 5:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 5:31 [PATCH 0/5] OMAP: DSS2: Add suppport for new color format Amber Jain
2011-05-19 5:31 ` [PATCH 1/5] OMAP: DSS2: Add new color formats Amber Jain
2011-05-19 6:12 ` Tomi Valkeinen
2011-05-19 5:31 ` Amber Jain [this message]
2011-05-19 6:34 ` [PATCH 2/5] OMAP: DSS2: configuring non-zero values for fir_hinc/fir_vinc Tomi Valkeinen
2011-05-19 5:31 ` [PATCH 3/5] OMAP: DSS2: Use for loop where ever possible in SR(), RR(), DUMPREG() Amber Jain
2011-05-19 5:31 ` [PATCH 4/5] OMAP: DSS2: Adds new registers for NV12 support Amber Jain
2011-05-19 6:45 ` Tomi Valkeinen
2011-05-19 5:31 ` [PATCH 5/5] OMAP: DSS2: Add support for NV12 format Amber Jain
2011-05-19 6:51 ` Tomi Valkeinen
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=1305783090-21214-3-git-send-email-amber@ti.com \
--to=amber@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=molnar@ti.com \
--cc=tomi.valkeinen@ti.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).