Replace the dmabuf import patch with the two series that it grow into during upstreaming, shipping in the next libcamera release. This will: 1. Improve performance for all devices using the GPU-ISP, including those not able to use dmabuf import. 2. Simplify debugging. 3. Ensure the patches get enough testing before the upstream release. While on it backport some additional patches: 1. A follow-up patch adding the last required step to allow dmabuf import for input buffers to work in almost all cases *if* the V4L2 driver handles custom bytesperline requests for bayer formats. 2. A small logging fix 3. A fix for bad bottom lines of pixels seen on some devices. This is the only patch with visual impact - and a quite desirable one. 4. A patch to log the used driver for easier debugging. This leaves us with only two downstream patches, both specific to the PinePhone (OG). Finally, add a "py3-$pkgname-pyc:pyc" subpackage in order to stay in sync with the upstream package. Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8650>
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
From 3f83705c45cfc34d508030194117207306feb850 Mon Sep 17 00:00:00 2001
|
|
From: Robert Mader <robert.mader@collabora.com>
|
|
Date: Wed, 27 May 2026 10:15:32 +0200
|
|
Subject: [PATCH 05/13] egl: eGLImage: Add flag to remember dmabuf import fails
|
|
|
|
In preparation of a following commit where we will start trying dmabuf
|
|
import for input buffers.
|
|
Also turn down error log in order to avoid flodding logs going
|
|
forward.
|
|
|
|
Signed-off-by: Robert Mader <robert.mader@collabora.com>
|
|
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
|
|
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
(cherry picked from commit 7b5f651f5200df67f8f0cb4331d051711913de6a)
|
|
---
|
|
include/libcamera/internal/egl.h | 1 +
|
|
src/libcamera/egl.cpp | 3 ++-
|
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
|
|
index bcf09b475..57f90d93f 100644
|
|
--- a/include/libcamera/internal/egl.h
|
|
+++ b/include/libcamera/internal/egl.h
|
|
@@ -90,6 +90,7 @@ public:
|
|
GLenum texture_unit_; /**< Texture unit associated with this image eg (GL_TEXTURE0) */
|
|
GLuint texture_; /**< OpenGL texture object ID */
|
|
GLuint fbo_; /**< OpenGL frame buffer object ID */
|
|
+ bool dmabuf_import_failed_ = false; /**< Previous image import failed */
|
|
|
|
private:
|
|
LIBCAMERA_DISABLE_COPY_AND_MOVE(eGLImage)
|
|
diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
|
|
index 789ffe2c1..7689d7983 100644
|
|
--- a/src/libcamera/egl.cpp
|
|
+++ b/src/libcamera/egl.cpp
|
|
@@ -166,7 +166,8 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)
|
|
NULL, image_attrs);
|
|
|
|
if (image == EGL_NO_IMAGE_KHR) {
|
|
- LOG(eGL, Error) << "eglCreateImageKHR fail";
|
|
+ LOG(eGL, Debug) << "eglCreateImageKHR fail";
|
|
+ eglImage.dmabuf_import_failed_ = true;
|
|
return -ENODEV;
|
|
}
|
|
|
|
--
|
|
2.54.0
|
|
|