ajitabh saxena
2010-10-30 03:56:09 UTC
Hi All,
I am very new to Android and now trying to accelerate the graphics
using copybit and I used the ashmem reference implementation to start.
My problem
============
The memory that I get from my software stack(The memory should be created
using one of our APIs if we want to do any DMA) is accessible by hardware
and also by calling process (it is not shared across process). I was able
to allocate two framebuffers successfully and I also see blits happening on
it if I fail the call from copybit I believe the egl layer uses memcopy to
do the blit.
The problem comes when I allocate other off-screen surfaces using my
allocations. I do not see full android desktop and only see the background
and the back panel.
My question[s]:
============
1. The off screen surfaces are a problem. I see that the reference
implementation creats a valid FD (file descriptor fd) and populates it in to
a private handle. In my case since I get a memory (not shared across
processes but only for the process that created it) so I am just creating a
dummy file descriptor and putting that in private handle. Is this ok? does
the caller of gralloc expect this to be a realy file descriptor?
I get these message when I pass the dummy file descriptor.
E/Surface ( 1705): Surface (identity=0) requestBuffer(0, 00000033) returneda
buffer with a null handle
E/Surface ( 1705): getBufferLocked(0, 00000033) failed (Out of memory)
I know that I have returned a valid buffer to the caller.
2. If I have a memory, is there a way to create a file descriptor from it?
3. I also see that when I fill in the offset field of private_handle_t only
then the register_buffer gets called. Otherwise it does not get called. I am
not sure why.
Two things about my hardware.
========================
1. My hardware has a physical memory of 1GB. When the kernel boots up it
creates a mapping (using mmap on /dev/mem) for that application so that 256
MB of is available in the user address space.
2. When the application starts, a new mapping is create for every
application. It does a MMAP again and map the 256 MB region to application
process so that the addresses in the MMAP region are valid. Surfaces are
then created from this memory.
Can someone who has done is help out. I am in serious trouble if I do not
get this done.
Thanks,
-- Aji.
I am very new to Android and now trying to accelerate the graphics
using copybit and I used the ashmem reference implementation to start.
My problem
============
The memory that I get from my software stack(The memory should be created
using one of our APIs if we want to do any DMA) is accessible by hardware
and also by calling process (it is not shared across process). I was able
to allocate two framebuffers successfully and I also see blits happening on
it if I fail the call from copybit I believe the egl layer uses memcopy to
do the blit.
The problem comes when I allocate other off-screen surfaces using my
allocations. I do not see full android desktop and only see the background
and the back panel.
My question[s]:
============
1. The off screen surfaces are a problem. I see that the reference
implementation creats a valid FD (file descriptor fd) and populates it in to
a private handle. In my case since I get a memory (not shared across
processes but only for the process that created it) so I am just creating a
dummy file descriptor and putting that in private handle. Is this ok? does
the caller of gralloc expect this to be a realy file descriptor?
I get these message when I pass the dummy file descriptor.
E/Surface ( 1705): Surface (identity=0) requestBuffer(0, 00000033) returneda
buffer with a null handle
E/Surface ( 1705): getBufferLocked(0, 00000033) failed (Out of memory)
I know that I have returned a valid buffer to the caller.
2. If I have a memory, is there a way to create a file descriptor from it?
3. I also see that when I fill in the offset field of private_handle_t only
then the register_buffer gets called. Otherwise it does not get called. I am
not sure why.
Two things about my hardware.
========================
1. My hardware has a physical memory of 1GB. When the kernel boots up it
creates a mapping (using mmap on /dev/mem) for that application so that 256
MB of is available in the user address space.
2. When the application starts, a new mapping is create for every
application. It does a MMAP again and map the 256 MB region to application
process so that the addresses in the MMAP region are valid. Surfaces are
then created from this memory.
Can someone who has done is help out. I am in serious trouble if I do not
get this done.
Thanks,
-- Aji.
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-platform-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to android-platform+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-platform-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to android-platform+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.