Message ID | 20211203174853.130537-1-kieran.bingham@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Kieran, Thank you for the patch. On Fri, Dec 03, 2021 at 05:48:53PM +0000, Kieran Bingham wrote: > The plane file descriptors API has been updated in the libcamera > base library. > > Update our mapped_framebuffer class accordingly. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/libcamera-helpers/mapped_framebuffer.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/libcamera-helpers/mapped_framebuffer.cpp b/src/libcamera-helpers/mapped_framebuffer.cpp > index a65740831331..3d231147ed91 100644 > --- a/src/libcamera-helpers/mapped_framebuffer.cpp > +++ b/src/libcamera-helpers/mapped_framebuffer.cpp > @@ -198,7 +198,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) > std::map<int, MappedBufferInfo> mappedBuffers; > > for (const FrameBuffer::Plane &plane : buffer->planes()) { > - const int fd = plane.fd.fd(); > + const int fd = plane.fd.get(); > if (mappedBuffers.find(fd) == mappedBuffers.end()) { > const size_t length = lseek(fd, 0, SEEK_END); > mappedBuffers[fd] = MappedBufferInfo{ nullptr, 0, length }; > @@ -220,7 +220,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) > } > > for (const FrameBuffer::Plane &plane : buffer->planes()) { > - const int fd = plane.fd.fd(); > + const int fd = plane.fd.get(); > auto &info = mappedBuffers[fd]; > if (!info.address) { > void *address = mmap(nullptr, info.mapLength, mmapFlags,
Hi Kieran, On 12/3/21 11:18 PM, Kieran Bingham wrote: > The plane file descriptors API has been updated in the libcamera > base library. > > Update our mapped_framebuffer class accordingly. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > --- > src/libcamera-helpers/mapped_framebuffer.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/libcamera-helpers/mapped_framebuffer.cpp b/src/libcamera-helpers/mapped_framebuffer.cpp > index a65740831331..3d231147ed91 100644 > --- a/src/libcamera-helpers/mapped_framebuffer.cpp > +++ b/src/libcamera-helpers/mapped_framebuffer.cpp > @@ -198,7 +198,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) > std::map<int, MappedBufferInfo> mappedBuffers; > > for (const FrameBuffer::Plane &plane : buffer->planes()) { > - const int fd = plane.fd.fd(); > + const int fd = plane.fd.get(); > if (mappedBuffers.find(fd) == mappedBuffers.end()) { > const size_t length = lseek(fd, 0, SEEK_END); > mappedBuffers[fd] = MappedBufferInfo{ nullptr, 0, length }; > @@ -220,7 +220,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) > } > > for (const FrameBuffer::Plane &plane : buffer->planes()) { > - const int fd = plane.fd.fd(); > + const int fd = plane.fd.get(); > auto &info = mappedBuffers[fd]; > if (!info.address) { > void *address = mmap(nullptr, info.mapLength, mmapFlags,
diff --git a/src/libcamera-helpers/mapped_framebuffer.cpp b/src/libcamera-helpers/mapped_framebuffer.cpp index a65740831331..3d231147ed91 100644 --- a/src/libcamera-helpers/mapped_framebuffer.cpp +++ b/src/libcamera-helpers/mapped_framebuffer.cpp @@ -198,7 +198,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) std::map<int, MappedBufferInfo> mappedBuffers; for (const FrameBuffer::Plane &plane : buffer->planes()) { - const int fd = plane.fd.fd(); + const int fd = plane.fd.get(); if (mappedBuffers.find(fd) == mappedBuffers.end()) { const size_t length = lseek(fd, 0, SEEK_END); mappedBuffers[fd] = MappedBufferInfo{ nullptr, 0, length }; @@ -220,7 +220,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) } for (const FrameBuffer::Plane &plane : buffer->planes()) { - const int fd = plane.fd.fd(); + const int fd = plane.fd.get(); auto &info = mappedBuffers[fd]; if (!info.address) { void *address = mmap(nullptr, info.mapLength, mmapFlags,
The plane file descriptors API has been updated in the libcamera base library. Update our mapped_framebuffer class accordingly. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- src/libcamera-helpers/mapped_framebuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)