android: Remove discontiguous planes check from camera buffer
The way discontiguous planes are checked in generic_camera_buffer ignores that they can be placed in the same dmabuf. This is the case for AM62x boards, where multiplanar formats are stored continuously in the memory and referenced through only one File Descriptor. Remove the check from generic_camera_buffer.cpp to allow the creation of CameraBuffers for AM62x boards. The verification for discontiguous planes are done in v4l2_videodevice.cpp. Signed-off-by: Vitor Sato Eschholz <vsatoes@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
committed by
Konsta
parent
485875b0a8
commit
e60f44b965
@@ -70,23 +70,7 @@ CameraBuffer::Private::Private([[maybe_unused]] CameraBuffer *cameraBuffer,
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* As Android doesn't offer an API to query buffer layouts, assume for
|
||||
* now that the buffer is backed by a single dmabuf, with planes being
|
||||
* stored contiguously.
|
||||
*/
|
||||
for (int i = 0; i < camera3Buffer->numFds; i++) {
|
||||
if (camera3Buffer->data[i] == -1 || camera3Buffer->data[i] == fd_)
|
||||
continue;
|
||||
|
||||
if (fd_ != -1) {
|
||||
error_ = -EINVAL;
|
||||
LOG(HAL, Error) << "Discontiguous planes are not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
fd_ = camera3Buffer->data[i];
|
||||
}
|
||||
fd_ = camera3Buffer->data[0];
|
||||
|
||||
if (fd_ == -1) {
|
||||
error_ = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user