fix omap vram allocation (fixes tv-out)
This commit is contained in:
parent
ffc30d2567
commit
5b5ebfc1db
|
@ -104,7 +104,7 @@ static const u8 gkey_to_cursor[32] = {
|
||||||
|
|
||||||
struct vout_fbdev *fb;
|
struct vout_fbdev *fb;
|
||||||
|
|
||||||
static int omap_setup_layer(int fd, int enabled, int x, int y, int w, int h, int first_call)
|
static int omap_setup_layer(int fd, int enabled, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
struct omapfb_plane_info pi = { 0, };
|
struct omapfb_plane_info pi = { 0, };
|
||||||
struct omapfb_mem_info mi = { 0, };
|
struct omapfb_mem_info mi = { 0, };
|
||||||
|
@ -130,8 +130,8 @@ static int omap_setup_layer(int fd, int enabled, int x, int y, int w, int h, int
|
||||||
perror("SETUP_PLANE");
|
perror("SETUP_PLANE");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first_call) {
|
if (mi.size < 240*160*2*4) {
|
||||||
mi.size = 640*512*3*3;
|
mi.size = 240*160*2*4;
|
||||||
ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
|
ret = ioctl(fd, OMAPFB_SETUP_MEM, &mi);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
perror("SETUP_MEM");
|
perror("SETUP_MEM");
|
||||||
|
@ -183,7 +183,7 @@ void gpsp_plat_init(void)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = omap_setup_layer(fd, 0, 0, 0, 400, 272, 1);
|
ret = omap_setup_layer(fd, 0, 0, 0, 400, 272);
|
||||||
close(fd);
|
close(fd);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
fprintf(stderr, "failed to set up layer, exiting.\n");
|
fprintf(stderr, "failed to set up layer, exiting.\n");
|
||||||
|
@ -205,7 +205,7 @@ void gpsp_plat_init(void)
|
||||||
void gpsp_plat_quit(void)
|
void gpsp_plat_quit(void)
|
||||||
{
|
{
|
||||||
xenv_finish();
|
xenv_finish();
|
||||||
omap_setup_layer(vout_fbdev_get_fd(fb), 0, 0, 0, 0, 0, 0);
|
omap_setup_layer(vout_fbdev_get_fd(fb), 0, 0, 0, 0, 0);
|
||||||
vout_fbdev_finish(fb);
|
vout_fbdev_finish(fb);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ void fb_set_mode(int w, int h, int buffers, int scale, int filter)
|
||||||
lx = 800 / 2 - lw / 2;
|
lx = 800 / 2 - lw / 2;
|
||||||
ly = 480 / 2 - lh / 2;
|
ly = 480 / 2 - lh / 2;
|
||||||
|
|
||||||
omap_setup_layer(vout_fbdev_get_fd(fb), 1, lx, ly, lw, lh, 0);
|
omap_setup_layer(vout_fbdev_get_fd(fb), 1, lx, ly, lw, lh);
|
||||||
set_filter(filter);
|
set_filter(filter);
|
||||||
|
|
||||||
vout_fbdev_resize(fb, w, h, 16, 0, 0, 0, 0, buffers);
|
vout_fbdev_resize(fb, w, h, 16, 0, 0, 0, 0, buffers);
|
||||||
|
|
Loading…
Reference in New Issue