libcamera: buffer: Switch from Plane to FrameBuffer::Plane

It is not libcamera's responsibility to handle memory mappings. Switch
from the soon to be removed Plane class which deals with memory
mappings to FrameBuffer::Plane which just describes it. This makes the
transition to the full FrameBuffer easier.

As the full FrameBuffer interface has not yet spread to all parts of
libcamera core it is hard to create efficient caching of memory mappings
in the qcam application. This will be fixed in a later patch, for now
the dmabuf is mapped and unmapped each time it is seen by the
application.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund 2019-11-26 00:04:53 +01:00
parent 007517618c
commit ae9a05847c
9 changed files with 38 additions and 32 deletions

View file

@ -178,7 +178,7 @@ private:
uint64_t cookie = index;
BufferMemory &mem = pool_.buffers()[index];
int dmabuf = mem.planes()[0].dmabuf();
int dmabuf = mem.planes()[0].fd.fd();
requestReady.emit(cookie, dmabuf);