| Message ID | 20260721130839.85262-1-robert.mader@collabora.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
P.S.: this should also help with testing the CAMSS pipeline handler (https://patchwork.libcamera.org/cover/27426/), which *should* be able to accommodate requested strides - and thus always allow dmabuf import \o/ (I haven't tested that yet, will try ASAP). On 21.07.26 15:08, Robert Mader wrote: > The log was introduced in commit > 93f0db167a8d ("debayer_egl: Implement dmabuf import for input buffers") > and dropped in the commit mentioned below. Let's readd it as failing > imports majorly impact performance and indicate actionable issues in the > V4L2 or GPU drivers. Ensure the log is only printed once, now that we use > multiple eGLImages. > > Fixes: 13f7b921acdf ("libcamera: software_isp: debayer_egl: Implement input/output frame caching mechanism") > Signed-off-by: Robert Mader <robert.mader@collabora.com> > --- > src/libcamera/software_isp/debayer_egl.cpp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > index 02651fe87922..8e0a9b79dfa4 100644 > --- a/src/libcamera/software_isp/debayer_egl.cpp > +++ b/src/libcamera/software_isp/debayer_egl.cpp > @@ -533,6 +533,8 @@ eGLImage *DebayerEGL::getCachedInputFrameBuffer(FrameBuffer *input, std::optiona > if (egl_.createInputDMABufTexture2D(*eglImageIn, input->planes()[0].fd.get()) == 0) > return eglImageIn; > > + if (eglImageInCache_.size() == 1) > + LOG(Debayer, Info) << "Importing input buffer with DMABuf import failed, falling back to upload"; > } else if (!eglImageIn->dmabuf_import_failed_) { > egl_.activateBindTexture(*eglImageIn); > return eglImageIn;
Robert Mader <robert.mader@collabora.com> writes: > The log was introduced in commit > 93f0db167a8d ("debayer_egl: Implement dmabuf import for input buffers") > and dropped in the commit mentioned below. Let's readd it as failing > imports majorly impact performance and indicate actionable issues in the > V4L2 or GPU drivers. Ensure the log is only printed once, now that we use > multiple eGLImages. > > Fixes: 13f7b921acdf ("libcamera: software_isp: debayer_egl: Implement input/output frame caching mechanism") > Signed-off-by: Robert Mader <robert.mader@collabora.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > --- > src/libcamera/software_isp/debayer_egl.cpp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > index 02651fe87922..8e0a9b79dfa4 100644 > --- a/src/libcamera/software_isp/debayer_egl.cpp > +++ b/src/libcamera/software_isp/debayer_egl.cpp > @@ -533,6 +533,8 @@ eGLImage *DebayerEGL::getCachedInputFrameBuffer(FrameBuffer *input, std::optiona > if (egl_.createInputDMABufTexture2D(*eglImageIn, input->planes()[0].fd.get()) == 0) > return eglImageIn; > > + if (eglImageInCache_.size() == 1) > + LOG(Debayer, Info) << "Importing input buffer with DMABuf import failed, falling back to upload"; > } else if (!eglImageIn->dmabuf_import_failed_) { > egl_.activateBindTexture(*eglImageIn); > return eglImageIn;
Quoting Milan Zamazal (2026-07-21 16:59:24) > Robert Mader <robert.mader@collabora.com> writes: > > > The log was introduced in commit > > 93f0db167a8d ("debayer_egl: Implement dmabuf import for input buffers") > > and dropped in the commit mentioned below. Let's readd it as failing > > imports majorly impact performance and indicate actionable issues in the > > V4L2 or GPU drivers. Ensure the log is only printed once, now that we use > > multiple eGLImages. > > > > Fixes: 13f7b921acdf ("libcamera: software_isp: debayer_egl: Implement input/output frame caching mechanism") > > Signed-off-by: Robert Mader <robert.mader@collabora.com> > > Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > > > --- > > src/libcamera/software_isp/debayer_egl.cpp | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > > index 02651fe87922..8e0a9b79dfa4 100644 > > --- a/src/libcamera/software_isp/debayer_egl.cpp > > +++ b/src/libcamera/software_isp/debayer_egl.cpp > > @@ -533,6 +533,8 @@ eGLImage *DebayerEGL::getCachedInputFrameBuffer(FrameBuffer *input, std::optiona > > if (egl_.createInputDMABufTexture2D(*eglImageIn, input->planes()[0].fd.get()) == 0) > > return eglImageIn; > > > > + if (eglImageInCache_.size() == 1) > > + LOG(Debayer, Info) << "Importing input buffer with DMABuf import failed, falling back to upload"; That's a long line, we usually push the << to the line below to reduce indentation in that case - and I'm on the fence whether this is Info or Warning, but it's all minor so either way: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > } else if (!eglImageIn->dmabuf_import_failed_) { > > egl_.activateBindTexture(*eglImageIn); > > return eglImageIn; >
On Wed, Jul 22, 2026 at 09:07:36AM +0100, Kieran Bingham wrote: > Quoting Milan Zamazal (2026-07-21 16:59:24) > > Robert Mader writes: > > > > > The log was introduced in commit > > > 93f0db167a8d ("debayer_egl: Implement dmabuf import for input buffers") > > > and dropped in the commit mentioned below. Let's readd it as failing > > > imports majorly impact performance and indicate actionable issues in the > > > V4L2 or GPU drivers. Ensure the log is only printed once, now that we use > > > multiple eGLImages. > > > > > > Fixes: 13f7b921acdf ("libcamera: software_isp: debayer_egl: Implement input/output frame caching mechanism") > > > Signed-off-by: Robert Mader <robert.mader@collabora.com> > > > > Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > > > > > --- > > > src/libcamera/software_isp/debayer_egl.cpp | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > > > index 02651fe87922..8e0a9b79dfa4 100644 > > > --- a/src/libcamera/software_isp/debayer_egl.cpp > > > +++ b/src/libcamera/software_isp/debayer_egl.cpp > > > @@ -533,6 +533,8 @@ eGLImage *DebayerEGL::getCachedInputFrameBuffer(FrameBuffer *input, std::optiona > > > if (egl_.createInputDMABufTexture2D(*eglImageIn, input->planes()[0].fd.get()) == 0) > > > return eglImageIn; > > > > > > + if (eglImageInCache_.size() == 1) > > > + LOG(Debayer, Info) << "Importing input buffer with DMABuf import failed, falling back to upload"; > > That's a long line, we usually push the << to the line below to reduce > indentation in that case - and I'm on the fence whether this is Info or > Warning, but it's all minor so either way: The message can be shortened a bit too: LOG(Debayer, Info) << "Importing input DMABuf failed, falling back to upload"; > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > > } else if (!eglImageIn->dmabuf_import_failed_) { > > > egl_.activateBindTexture(*eglImageIn); > > > return eglImageIn;
Hi Laurent On 22.07.26 15:07, Laurent Pinchart wrote: > On Wed, Jul 22, 2026 at 09:07:36AM +0100, Kieran Bingham wrote: >> Quoting Milan Zamazal (2026-07-21 16:59:24) >>> Robert Mader writes: >>> >>>> The log was introduced in commit >>>> 93f0db167a8d ("debayer_egl: Implement dmabuf import for input buffers") >>>> and dropped in the commit mentioned below. Let's readd it as failing >>>> imports majorly impact performance and indicate actionable issues in the >>>> V4L2 or GPU drivers. Ensure the log is only printed once, now that we use >>>> multiple eGLImages. >>>> >>>> Fixes: 13f7b921acdf ("libcamera: software_isp: debayer_egl: Implement input/output frame caching mechanism") >>>> Signed-off-by: Robert Mader <robert.mader@collabora.com> >>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> >>> >>>> --- >>>> src/libcamera/software_isp/debayer_egl.cpp | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp >>>> index 02651fe87922..8e0a9b79dfa4 100644 >>>> --- a/src/libcamera/software_isp/debayer_egl.cpp >>>> +++ b/src/libcamera/software_isp/debayer_egl.cpp >>>> @@ -533,6 +533,8 @@ eGLImage *DebayerEGL::getCachedInputFrameBuffer(FrameBuffer *input, std::optiona >>>> if (egl_.createInputDMABufTexture2D(*eglImageIn, input->planes()[0].fd.get()) == 0) >>>> return eglImageIn; >>>> >>>> + if (eglImageInCache_.size() == 1) >>>> + LOG(Debayer, Info) << "Importing input buffer with DMABuf import failed, falling back to upload"; >> That's a long line, we usually push the << to the line below to reduce >> indentation in that case - and I'm on the fence whether this is Info or >> Warning, but it's all minor so either way: > The message can be shortened a bit too: > > LOG(Debayer, Info) > << "Importing input DMABuf failed, falling back to upload"; That's better, indeed. Applied in v2, thanks! > >> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> >> >>>> } else if (!eglImageIn->dmabuf_import_failed_) { >>>> egl_.activateBindTexture(*eglImageIn); >>>> return eglImageIn;
diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 02651fe87922..8e0a9b79dfa4 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -533,6 +533,8 @@ eGLImage *DebayerEGL::getCachedInputFrameBuffer(FrameBuffer *input, std::optiona if (egl_.createInputDMABufTexture2D(*eglImageIn, input->planes()[0].fd.get()) == 0) return eglImageIn; + if (eglImageInCache_.size() == 1) + LOG(Debayer, Info) << "Importing input buffer with DMABuf import failed, falling back to upload"; } else if (!eglImageIn->dmabuf_import_failed_) { egl_.activateBindTexture(*eglImageIn); return eglImageIn;
The log was introduced in commit 93f0db167a8d ("debayer_egl: Implement dmabuf import for input buffers") and dropped in the commit mentioned below. Let's readd it as failing imports majorly impact performance and indicate actionable issues in the V4L2 or GPU drivers. Ensure the log is only printed once, now that we use multiple eGLImages. Fixes: 13f7b921acdf ("libcamera: software_isp: debayer_egl: Implement input/output frame caching mechanism") Signed-off-by: Robert Mader <robert.mader@collabora.com> --- src/libcamera/software_isp/debayer_egl.cpp | 2 ++ 1 file changed, 2 insertions(+)