I have some one question, i'd be glad if someone could answer this. I know that Android doesnt support multiple framebuffer, but is it possible to support 2 displays, one active at a time, dynamically changing? Do i have to change the core of OS?
Thanks On Tue, Sep 7, 2010 at 8:05 AM, Tung Dang <[email protected]> wrote: > Hi Onaip, > > The color mapping between red and blue is swaped. > U edit your vfb.c to change the color offset for red and blue (in > vfb_check_var, setting for RGB 565) > > Cheers, > Tung > > > On Mon, Sep 6, 2010 at 9:01 PM, onaips <[email protected]> wrote: > >> Hi Tung, thanks for your answer, >> >> You were right, i was using the msm7k gralloc and it was allocation >> the memory on GPU, i simply changed the name of /system/libs/hw/ >> gralloc.msm7k.so lib to force HAL to search for the >> gralloc.default.so, and now i can use any resolution. >> >> Now i have another issue, the colors of the screen aren't right. I've >> been looking in ./libhardware/modules/gralloc/framebuffer.cpp, and i >> see i don't need to set colour information on VFB because it is set on >> "int mapFrameBufferLocked(struct private_module_t* module)" >> >> Something like: >> >> /* >> * Explicitly request 5/6/5 >> */ >> info.bits_per_pixel = 16; >> info.red.offset = 11; >> info.red.length = 5; >> info.green.offset = 5; >> info.green.length = 6; >> info.blue.offset = 0; >> info.blue.length = 5; >> info.transp.offset = 0; >> info.transp.length = 0; >> >> However using the VNC server (i'm guessing it isnt a VNC issue) the >> colors are wrong... I've attached a pic so you can see what's wrong... >> >> http://zeluispereira.no.sapo.pt/vfb.png >> >> I/gralloc ( 123): using (fd=25) >> I/gralloc ( 123): id = Virtual FB >> I/gralloc ( 123): xres = 1024 px >> I/gralloc ( 123): yres = 768 px >> I/gralloc ( 123): xres_virtual = 1024 px >> I/gralloc ( 123): yres_virtual = 1536 px >> I/gralloc ( 123): bpp = 16 >> I/gralloc ( 123): r = 0:5 >> I/gralloc ( 123): g = 5:6 >> I/gralloc ( 123): b = 11:5 >> I/gralloc ( 123): width = 163 mm (159.568100 dpi) >> I/gralloc ( 123): height = 122 mm (159.895081 dpi) >> I/gralloc ( 123): refresh rate = 25.43 Hz >> >> Thanks >> >> >> On 6 Set, 04:47, Tung Dang <[email protected]> wrote: >> > Hi onaips, >> > >> > I run your VNC server with VFB and the screen resolution is 800x520 is >> ok >> > Can u try with this resolution ? >> > >> > logcat: >> > >> > W/gralloc ( 1960): page flipping not supported (yres_virtual=520, >> > requested=1040) >> > I/gralloc ( 1960): using (fd=22) >> > I/gralloc ( 1960): id = Virtual FB >> > I/gralloc ( 1960): xres = 800 px >> > I/gralloc ( 1960): yres = 520 px >> > I/gralloc ( 1960): xres_virtual = 800 px >> > I/gralloc ( 1960): yres_virtual = 520 px >> > I/gralloc ( 1960): bpp = 16 >> > I/gralloc ( 1960): r = 11:5 >> > I/gralloc ( 1960): g = 5:6 >> > I/gralloc ( 1960): b = 0:5 >> > I/gralloc ( 1960): width = 127 mm (160.000000 dpi) >> > I/gralloc ( 1960): height = 83 mm (159.132523 dpi) >> > I/gralloc ( 1960): refresh rate = 27.20 Hz >> > >> > Btw, try to run kernel with a generic build of system.img , dont use the >> HAL >> > layer of msm >> > >> > Cheers. >> > Tung >> > >> > >> > >> > On Mon, Sep 6, 2010 at 4:56 AM, onaips <[email protected]> wrote: >> > > Hi, i compiled android kernel with virtual framebuffer support and >> > > msm_fb disabled, so i can access the framebuffer only using a >> > > framebuffer viewer (for example a VNC server). >> > >> > > However if i use a high resolution (800x600) gralloc returns me an Out >> > > of Memory error... >> > > If i use 320x480 its working fine. >> > >> > > Is there any constant limit i should raise? >> > >> > > Thanks >> > > José Pereira >> > >> > > (logcat) >> > > W/SurfaceFlinger( 124): mBuffers[0] is null (mWidth=480, mHeight=775) >> > > E/gralloc ( 124): gralloc failed err=Out of memory >> > > D/Sensors ( 124): sensors=00000000, real=00000000 >> > > W/ ( 124): alloc(480, 775, 1, 00000133, ...) failed -12 (Out >> > > of memory) >> > > D/ ( 124): Allocated buffers: >> > > D/ ( 124): 0xed4d8: 32.70 KiB | 91 x 92 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x12e388: 750.00 KiB | 480 x 800 | 4 | >> > > 0x00000130 >> > > D/ ( 124): 0x2095f8: 931.25 KiB | 320 x 745 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x214c58: 46.88 KiB | 480 x 25 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x276868: 0.94 KiB | 12 x 20 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x280800: 750.00 KiB | 480 x 800 | 4 | >> > > 0x00000133 >> > > D/ ( 124): 0x29b6e8: 1453.12 KiB | 480 x 775 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x2a4a18: 931.25 KiB | 320 x 745 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x2d5628: 28.44 KiB | 91 x 80 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x2d7a30: 1453.12 KiB | 480 x 775 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x2fdb28: 46.88 KiB | 480 x 25 | 1 | >> > > 0x00000133 >> > > D/ ( 124): 0x3032e0: 750.00 KiB | 480 x 800 | 4 | >> > > 0x00000133 >> > > D/ ( 124): 0x35fcd8: 750.00 KiB | 480 x 800 | 4 | >> > > 0x00000133 >> > > D/ ( 124): Total allocated: 7924.58 KB >> > > E/SurfaceFlinger( 124): Layer::requestBuffer(this=0xea950), index=0, >> > > w=480, h=775 failed (Out of memory) >> > > E/Surface ( 124): Surface (identity=2) requestBuffer(0, 00000033) >> > > returneda buffer with a null handle >> > > E/Surface ( 124): getBufferLocked(0, 00000033) failed (Out of memory) >> > > E/Surface ( 124): dequeueBuffer failed (Out of memory) >> > > E/ViewRoot( 124): OutOfResourcesException locking surface >> > >> > > --> >> > > unsubscribe:[email protected]<unsubscribe%3aandroid-porting%[email protected]> >> <android-porting%2Bunsubscribe@ googlegroups.com> >> >> > > website:http://groups.google.com/group/android-porting >> >> -- >> unsubscribe: >> [email protected]<android-porting%[email protected]> >> website: http://groups.google.com/group/android-porting >> > > -- José Pereira http://onaips.blogspot.com -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
