Tuesday, July 12, 2011

SDL

While I was putting together a proper patch for the pixel format issue, I discovered that being able to change the default pixel format by modifying console.c fixed the issue when using VNC, but did not work for SDL. This suggests there is a deeper problem, possibly related to the "goldfish_fb_pan_display: timeout wating for base update" messages.

While there may be a problem with the communication between the goldfish_fb device and the kernel that causes the timeout message (more on that later), that isn't the problem with the SDL display.

When creating the SDL display, the pixel format is set by sdl_create_displaysurface() in ui/sdl.c:169. At ui/sdl.c:194 it only sets the pixel format for the guest display to 16 bits if that is also the pixel format for the host system, otherwise it defaults to 32. This is just a case of SDL having it's own copy of the default pixel format value, so it can easily be fixed by including it as a modifiable default value.


I'll send it to the dev list once I whip up a patch to actually change the value. This can be used right now to get Android running correctly with SDL by changing the default_pixelbpp value to 16 in the source.

1 comment:

  1. I'm afraid this change is going in the wrong direction. A framebuffer device has to Just Cope with whatever pixel format the UI layer requires of it. At the moment goldfish_fb has code that tries to do that by telling the android kernel what format to use; however that doesn't work because the kernel ignores it. So goldfish_fb needs to be changed to do what the other framebuffer drivers do, and do pixel format conversion.

    ReplyDelete