| Message ID | 20260521155906.120373-4-robert.mader@collabora.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
On 21/05/2026 16:59, Robert Mader wrote: > 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> > --- > 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 267d22c8b..c185bb7ad 100644 > --- a/src/libcamera/egl.cpp > +++ b/src/libcamera/egl.cpp > @@ -165,7 +165,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 > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- bod
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 267d22c8b..c185bb7ad 100644 --- a/src/libcamera/egl.cpp +++ b/src/libcamera/egl.cpp @@ -165,7 +165,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; }
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> --- include/libcamera/internal/egl.h | 1 + src/libcamera/egl.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)