summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-04-13 11:57:11 +0000
committerJens Arnold <amiconn@rockbox.org>2008-04-13 11:57:11 +0000
commitc773eed3e1dcde1d248dac7008cb29cd8aaae288 (patch)
treedeba0c33fd3efa9eb2c6d8c8545e27f78804e11d /apps
parent8c5d552ebdadd00a3f1610110afb6eb4fa77071a (diff)
downloadrockbox-c773eed3e1dcde1d248dac7008cb29cd8aaae288.zip
rockbox-c773eed3e1dcde1d248dac7008cb29cd8aaae288.tar.gz
rockbox-c773eed3e1dcde1d248dac7008cb29cd8aaae288.tar.bz2
rockbox-c773eed3e1dcde1d248dac7008cb29cd8aaae288.tar.xz
The greylib now takes care of the necessary aligment and uncached addressing itself, so simplify the code a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17094 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/mpegplayer/stream_mgr.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c
index 24e820b..c9601b8 100644
--- a/apps/plugins/mpegplayer/stream_mgr.c
+++ b/apps/plugins/mpegplayer/stream_mgr.c
@@ -993,33 +993,19 @@ int stream_init(void)
/* Initialize non-allocator blocks first */
#ifndef HAVE_LCD_COLOR
- bool success;
- long graysize;
- void *graymem;
-
-#ifdef PROC_NEEDS_CACHEALIGN
- /* This can run on another processor - align data */
- memsize = CACHEALIGN_BUFFER(&mem, memsize);
- graymem = UNCACHED_ADDR(mem);
-#else
- graymem = mem;
-#endif
-
- success = grey_init(rb, graymem, memsize, GREY_BUFFERED|GREY_ON_COP,
- LCD_WIDTH, LCD_HEIGHT, &graysize);
-
- /* This can run on another processor - align size */
- graysize = CACHEALIGN_UP(graysize);
+ long greysize;
- mem += graysize;
- memsize -= graysize;
-
- if (!success || (ssize_t)memsize <= 0)
+ /* Greylib init handles all necessary cache alignment */
+ if (!grey_init(rb, mem, memsize, GREY_BUFFERED|GREY_ON_COP,
+ LCD_WIDTH, LCD_HEIGHT, &greysize))
{
rb->splash(HZ, "greylib init failed!");
return STREAM_ERROR;
}
+ mem += greysize;
+ memsize -= greysize;
+
grey_clear_display();
#endif /* !HAVE_LCD_COLOR */