From patchwork Thu May 21 15:59:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 26794 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C3AD2C32F4 for ; Thu, 21 May 2026 15:59:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C174E63034; Thu, 21 May 2026 17:59:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="Nalu40GD"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B8CE56302B for ; Thu, 21 May 2026 17:59:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1779379166; cv=none; d=zohomail.com; s=zohoarc; b=I5WGmPmgtefVh3aaXc3kZubfxQ99REuzQG6TDWl2s22hqLuphR16JP/Fi7NHjvcjSomDtoBKhuLa6PaZN/IyaVgYA1QOxPCsSn/A0bRVDTuEVVMe/bKmTTJRWSefvxEiBujui4+qvP4Br5IKm1cTt04JPsFGpc1iQfj+DIsGryw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779379166; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=TSUlafOf8ofK9Cb40XzZGWps5gzsOIEZPVA0qsbnC88=; b=MJrmJsy9niVaB3GXQZmyLad4JiXeDHugmQWSIjB9GWf1nHT2ZUJvs2KPDcOic4odwMiLojySUSV84OLgs6ePSfP+bg74XbWMvv4/pf0VvmRxI3e68XeDZevP9HFWLPYP0qaL4LeWRY+VZcaTGh9SZjHpvxUsaHr9cu6+x+xP6Rc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1779379166; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=TSUlafOf8ofK9Cb40XzZGWps5gzsOIEZPVA0qsbnC88=; b=Nalu40GDzfK1LdW1/mB2Bwfht+SJPEeee/DJmkw6EF4d0s7YJQJw9BKNFH6jNfPn pRYLyiURTU8Rsy6uR1z12b5E1eye4mRUDoUZa10zAoGzVQZ76cN3HNUhNTvSlwcP1oD TU9iedq8Q2qlCGAsFyc+5JB8YSMJf5od5IyL0vYQ= Received: by mx.zohomail.com with SMTPS id 1779379164141161.036932664887; Thu, 21 May 2026 08:59:24 -0700 (PDT) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH v4 3/5] egl: eGLImage: Add flag to remember dmabuf import fails Date: Thu, 21 May 2026 17:59:04 +0200 Message-ID: <20260521155906.120373-4-robert.mader@collabora.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260521155906.120373-1-robert.mader@collabora.com> References: <20260521155906.120373-1-robert.mader@collabora.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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; }