notaz.gp2x.de
/
sdl_omap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f13ad9
)
don't needlessly realloc memory
author
notaz
<notasas@gmail.com>
Fri, 16 Sep 2011 21:04:15 +0000
(
00:04
+0300)
committer
notaz
<notasas@gmail.com>
Fri, 16 Sep 2011 21:04:15 +0000
(
00:04
+0300)
it can potentially fail, mostly if we have multiple overlays
(TV-out and stuff)
src/video/omapdss/osdl_video.c
patch
|
blob
|
blame
|
history
diff --git
a/src/video/omapdss/osdl_video.c
b/src/video/omapdss/osdl_video.c
index
fc78001
..
bc6d9da
100644
(file)
--- a/
src/video/omapdss/osdl_video.c
+++ b/
src/video/omapdss/osdl_video.c
@@
-62,11
+62,13
@@
static int osdl_setup_omapfb(int fd, int enabled, int x, int y, int w, int h, in
err_perror("SETUP_PLANE");
}
- mi.size = mem;
- ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
- if (ret != 0) {
- err_perror("SETUP_MEM");
- return -1;
+ if (mi.size < mem) {
+ mi.size = mem;
+ ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
+ if (ret != 0) {
+ err_perror("SETUP_MEM");
+ return -1;
+ }
}
pi.pos_x = x;