diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-07-27 17:40:44 +0400 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-07-27 17:40:44 +0400 |
commit | 6e75ec0e0df8fae7b5b3d53e691fcc584458a397 (patch) | |
tree | bf647618be3747a7a309af5f766839fe66c911d9 /recipes/kexecboot/linux-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch | |
parent | b8ffa54b8a26ef3548fada3177be9f5532417aae (diff) | |
parent | 6eea2d81d154d7d1e12e89676e3246ac434360f1 (diff) |
Merge branch 'org.openembedded.dev' of git://git.openembedded.org/openembedded into org.openembedded.dev
Diffstat (limited to 'recipes/kexecboot/linux-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch')
-rw-r--r-- | recipes/kexecboot/linux-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes/kexecboot/linux-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch b/recipes/kexecboot/linux-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch new file mode 100644 index 0000000000..0ff2c7b1a6 --- /dev/null +++ b/recipes/kexecboot/linux-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch @@ -0,0 +1,34 @@ +From 233a6e4f4ccaf5827f04ab38c590397755e61ecb Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com> +Date: Mon, 4 May 2009 16:18:30 +0200 +Subject: [PATCH 60/69] DSS2: Avoid div by zero when calculating required fclk +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +When calculating the required fclk rate for five tap filtering if the +display width and output width are equal div by zero could occur. The +TRM doesn't actually specify how this case should be handled but for +now just skip the calculation which would trigger the div by zero. + +Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> +--- + drivers/video/omap2/dss/dispc.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c +index f79decb..5fc9457 100644 +--- a/drivers/video/omap2/dss/dispc.c ++++ b/drivers/video/omap2/dss/dispc.c +@@ -1399,7 +1399,7 @@ static unsigned long calc_fclk_five_taps(u16 width, u16 height, + do_div(tmp, 2 * out_height * ppl); + fclk = tmp; + +- if (height > 2 * out_height) { ++ if (height > 2 * out_height && ppl != out_width) { + tmp = pclk * (height - 2 * out_height) * out_width; + do_div(tmp, 2 * out_height * (ppl - out_width)); + fclk = max(fclk, (u32) tmp); +-- +1.6.2.4 + |