X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvideo%2Fomapdss%2Fosdl_video.c;h=bc6d9da5e58e9baef2250555b0be5e0555e92abc;hb=13f953aa5e1bd54bb5bc288530054d7c326e90e6;hp=6cd7b31e65f3e3521bcdc98bfb44acbde3d88b6b;hpb=b9a19b44575168f01926c0b99289a50f334447cf;p=sdl_omap.git diff --git a/src/video/omapdss/osdl_video.c b/src/video/omapdss/osdl_video.c index 6cd7b31..bc6d9da 100644 --- 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; @@ -78,6 +80,7 @@ static int osdl_setup_omapfb(int fd, int enabled, int x, int y, int w, int h, in ret = ioctl(fd, OMAPFB_SETUP_PLANE, &pi); if (ret != 0) { err_perror("SETUP_PLANE"); + err("(%d %d %d %d)\n", x, y, w, h); return -1; }