Hi Anil,
if you have a preallocated surface, in general you do not provide a 
physical address, just a virtual address.
This means that the video hardware cannot use it, and an extra Blit is 
required to a hardware-usable portion of memory. Also, I noticed that 
you didn't take the pitch into account in your calloc() and you might 
have alignment problems if fbAddr returns an odd adress, say. I'd advise 
to use another pool to allocate in.. try to not specify a system 
capability (no DSDESC_CAPS, or dsc.caps  = 0).

Anil Kumar wrote:
> Hi all,
>      Until now everything was going fine, while doing some research on 
> DFB, but currently i encounter a strange situation in memory 
> allocation for framebuffers. because currently i have allocated 
> videomemory for creating a surface options but at onestage the memory 
> is full and i get crashed, so i need to split the memory allocation to 
> share with my system like using malloc becoz my hardware has enough 
> memory but video memory is limited. but the strange is that the image 
> when it tries to blit to the surface it takes more time to blit and 
> also the image is not that clear too. but while using videoonly option 
> my image is fine. So is there anyother option to allocate memory to 
> create a surface, i even tried preallocation as follows
> void* fbAddr =(void *) calloc(width * height, sizeof(int));
>         dsc.flags = DSDESC_CAPS|DSDESC_PREALLOCATED|DSDESC_WIDTH | 
> DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
>         dsc.caps = DSCAPS_SystemOnly;
>         dsc.preallocated[0].data=fbAddr;
>         dsc.preallocated[0].pitch = primary.pitch;
>          dsc.preallocated[1].data = NULL;
>          dsc.preallocated[1].pitch = 0;
>         dsc.width = width;
>         dsc.height = height;
>         dsc.pixelformat = DSPF_ARGB;
>         error = dfb->CreateSurface(dfb, &dsc, &surface);
> but still it takes more time to blit/draw to the surface. So please 
> can anyone help me out to solve this issue, Thanking you for your 
> sharing your precious time in reading this.
>
> cheers
> Kumar
> ------------------------------------------------------------------------
>
> _______________________________________________
> directfb-users mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
>   


-- 

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------" 

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to