summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-01-05 23:00:14 +0000
committerMichael Sevakis <jethead71@rockbox.org>2012-01-05 23:00:14 +0000
commit302937e586ea44ed72e0485ef9e6732027ea9164 (patch)
tree1ef0542eefbc5919585b0ac8a472b96658d89919 /firmware/target/coldfire
parentc6dcec4e0d9af18a3e45d557e9e072c5640d85cd (diff)
downloadrockbox-302937e586ea44ed72e0485ef9e6732027ea9164.tar.gz
rockbox-302937e586ea44ed72e0485ef9e6732027ea9164.zip
Coldfire: Fix alpha bitmap drawing from messing up the emac status register.
It failed to restore macsr to the expected default (FRAC/SAT) which caused DSP functions like tone control filter calculation to fail (resulting in noise). The FFT plugin was also affected. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31589 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire')
-rw-r--r--firmware/target/coldfire/iaudio/x5/lcd-x5.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
index e1504b6e98..19b0725ce4 100644
--- a/firmware/target/coldfire/iaudio/x5/lcd-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
@@ -451,7 +451,9 @@ void lcd_blit_yuv(unsigned char * const src[3],
vsrc = src[2] + (src_y * stride >> 2) + (src_x >> 1);
ysrc_max = ysrc + height * stride;
+ unsigned long macsr = coldfire_get_macsr();
coldfire_set_macsr(EMAC_SATURATE);
+
do
{
lcd_write_reg(R_HORIZ_RAM_ADDR_POS, ((y + y_offset + 1) << 8) | (y + y_offset));
@@ -470,6 +472,8 @@ void lcd_blit_yuv(unsigned char * const src[3],
vsrc += stride >> 1;
}
while (ysrc < ysrc_max);
+
+ coldfire_set_macsr(macsr);
} /* lcd_yuv_blit */