aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2010-12-21 14:57:00 +0200
committernotaz2010-12-21 14:57:00 +0200
commit96d9fde1230e5ae6de069ff9e4a0f16185650ab5 (patch)
tree35fffffb956e3f6b1da0f3bc8048fc66254bc486
parenta2544c926e9f382d57614ba2594ede0f56f4a108 (diff)
downloadpcsx_rearmed-96d9fde1230e5ae6de069ff9e4a0f16185650ab5.tar.gz
pcsx_rearmed-96d9fde1230e5ae6de069ff9e4a0f16185650ab5.tar.bz2
pcsx_rearmed-96d9fde1230e5ae6de069ff9e4a0f16185650ab5.zip
omap: only setup mem before using fb
newer DSS2 driver rejects mem changes on the fly.
-rw-r--r--frontend/plat_omap.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/frontend/plat_omap.c b/frontend/plat_omap.c
index e5f9ebd..d5e9db5 100644
--- a/frontend/plat_omap.c
+++ b/frontend/plat_omap.c
@@ -64,7 +64,7 @@ struct in_default_bind in_evdev_defbinds[] = {
{ 0, 0, 0 }
};
-static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h)
+static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h, int first_call)
{
struct omapfb_plane_info pi;
struct omapfb_mem_info mi;
@@ -90,11 +90,13 @@ static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h)
perror("SETUP_PLANE");
}
- mi.size = 640*512*2*3;
- ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
- if (ret != 0) {
- perror("SETUP_MEM");
- return -1;
+ if (first_call) {
+ mi.size = 640*512*2*3;
+ ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
+ if (ret != 0) {
+ perror("SETUP_MEM");
+ return -1;
+ }
}
pi.pos_x = x;
@@ -115,7 +117,7 @@ static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h)
int omap_enable_layer(int enabled)
{
return omap_setup_layer_(vout_fbdev_get_fd(layer_fb), enabled,
- g_layer_x, g_layer_y, g_layer_w, g_layer_h);
+ g_layer_x, g_layer_y, g_layer_w, g_layer_h, 0);
}
void plat_video_menu_enter(int is_rom_loaded)
@@ -153,7 +155,7 @@ void plat_init(void)
exit(1);
}
- ret = omap_setup_layer_(fd, 1, g_layer_x, g_layer_y, g_layer_w, g_layer_h);
+ ret = omap_setup_layer_(fd, 1, g_layer_x, g_layer_y, g_layer_w, g_layer_h, 1);
close(fd);
if (ret != 0) {
fprintf(stderr, "failed to set up layer, exiting.\n");