[v2,2/4] egl: Demote an error log to debug
diff mbox series

Message ID 20260518201508.140849-3-robert.mader@collabora.com
State Superseded
Headers show
Series
  • software_isp: Implement DMABuf import for input buffers
Related show

Commit Message

Robert Mader May 18, 2026, 8:15 p.m. UTC
In order to avoid flodding logs in cases where import failure is an
expected result.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
---
 src/libcamera/egl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bryan O'Donoghue May 19, 2026, 3:56 p.m. UTC | #1
On 18/05/2026 21:15, Robert Mader wrote:
> In order to avoid flodding logs in cases where import failure is an
> expected result.
> 
> Signed-off-by: Robert Mader <robert.mader@collabora.com>
> ---
>   src/libcamera/egl.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
> index b8f5d9b85..df4eec757 100644
> --- a/src/libcamera/egl.cpp
> +++ b/src/libcamera/egl.cpp
> @@ -152,7 +152,7 @@ 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";
>   		return -ENODEV;
>   	}
> 
> --
> 2.54.0
> 

Why is import failure an expected result ... ?

---
bod
Nicolas Dufresne May 19, 2026, 7:20 p.m. UTC | #2
Le mardi 19 mai 2026 à 16:56 +0100, Bryan O'Donoghue a écrit :
> On 18/05/2026 21:15, Robert Mader wrote:
> > In order to avoid flodding logs in cases where import failure is an
> > expected result.
> > 
> > Signed-off-by: Robert Mader <robert.mader@collabora.com>
> > ---
> >   src/libcamera/egl.cpp | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
> > index b8f5d9b85..df4eec757 100644
> > --- a/src/libcamera/egl.cpp
> > +++ b/src/libcamera/egl.cpp
> > @@ -152,7 +152,7 @@ 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";
> >   		return -ENODEV;
> >   	}
> > 
> > --
> > 2.54.0
> > 
> 
> Why is import failure an expected result ... ?

This is globally a fact that importing a dmabuf may fait due to constraints only
known by the Linux driver. For this reason we have fallback code which makes it
work using a slower path. If the fallback worked and you printed an error, it
will be confusing and spam-my.

Nicolas
Robert Mader May 19, 2026, 7:41 p.m. UTC | #3
On 19.05.26 17:56, Bryan O'Donoghue wrote:
>
> Why is import failure an expected result ... ? 
Tried to make that more clear in v3
Bryan O'Donoghue May 20, 2026, 8:45 a.m. UTC | #4
On 19/05/2026 20:20, Nicolas Dufresne wrote:
> Le mardi 19 mai 2026 à 16:56 +0100, Bryan O'Donoghue a écrit :
>> On 18/05/2026 21:15, Robert Mader wrote:
>>> In order to avoid flodding logs in cases where import failure is an
>>> expected result.
>>>
>>> Signed-off-by: Robert Mader <robert.mader@collabora.com>
>>> ---
>>>    src/libcamera/egl.cpp | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
>>> index b8f5d9b85..df4eec757 100644
>>> --- a/src/libcamera/egl.cpp
>>> +++ b/src/libcamera/egl.cpp
>>> @@ -152,7 +152,7 @@ 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";
>>>    		return -ENODEV;
>>>    	}
>>>
>>> --
>>> 2.54.0
>>>
>>
>> Why is import failure an expected result ... ?
> 
> This is globally a fact that importing a dmabuf may fait due to constraints only
> known by the Linux driver. For this reason we have fallback code which makes it
> work using a slower path. If the fallback worked and you printed an error, it
> will be confusing and spam-my.
> 
> Nicolas

So long as the fallback gives a meaningful deterministic fail string 
then, that's fine.

---
bod

Patch
diff mbox series

diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
index b8f5d9b85..df4eec757 100644
--- a/src/libcamera/egl.cpp
+++ b/src/libcamera/egl.cpp
@@ -152,7 +152,7 @@  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";
 		return -ENODEV;
 	}