aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAmber Jain <amber@ti.com>2011-05-19 10:17:51 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-05-23 01:29:47 -0400
commited14a3ce9878185ea8348cc2f2e9b53129f84dc7 (patch)
tree9a60204fac6756f6b0f6955e37064e4f90786114 /drivers
parentf20e42205ab172cfd449c10e5183e2e371a629d6 (diff)
OMAP: DSS2: Ensure non-zero FIR values are configured
FIR values can never be zero as per TRM, and the current code writes zero when scaling is not used. It was not causing any problem as scaling was disabled when zero was written. Its still safer to not write zero to it in any case. Now we configure correct FIR values even when scaling is not used (i.e. set FIR to 1024 when scaling is not used), but the scaling enable bits are still kept off if the scaling is not needed. Signed-off-by: Amber Jain <amber@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/dss/dispc.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 79c1c0a44f81..fd8f68e616d0 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,
1128 1128
1129 _dispc_set_scale_coef(plane, hscaleup, vscaleup, five_taps); 1129 _dispc_set_scale_coef(plane, hscaleup, vscaleup, five_taps);
1130 1130
1131 if (!orig_width || orig_width == out_width) 1131 fir_hinc = 1024 * orig_width / out_width;
1132 fir_hinc = 0; 1132 fir_vinc = 1024 * orig_height / out_height;
1133 else
1134 fir_hinc = 1024 * orig_width / out_width;
1135
1136 if (!orig_height || orig_height == out_height)
1137 fir_vinc = 0;
1138 else
1139 fir_vinc = 1024 * orig_height / out_height;
1140 1133
1141 _dispc_set_fir(plane, fir_hinc, fir_vinc); 1134 _dispc_set_fir(plane, fir_hinc, fir_vinc);
1142 1135
@@ -1144,8 +1137,8 @@ static void _dispc_set_scaling(enum omap_plane plane,
1144 1137
1145 /* RESIZEENABLE and VERTICALTAPS */ 1138 /* RESIZEENABLE and VERTICALTAPS */
1146 l &= ~((0x3 << 5) | (0x1 << 21)); 1139 l &= ~((0x3 << 5) | (0x1 << 21));
1147 l |= fir_hinc ? (1 << 5) : 0; 1140 l |= (orig_width != out_width) ? (1 << 5) : 0;
1148 l |= fir_vinc ? (1 << 6) : 0; 1141 l |= (orig_height != out_height) ? (1 << 6) : 0;
1149 l |= five_taps ? (1 << 21) : 0; 1142 l |= five_taps ? (1 << 21) : 0;
1150 1143
1151 /* VRESIZECONF and HRESIZECONF */ 1144 /* VRESIZECONF and HRESIZECONF */