{"id":26319,"url":"https://patchwork.libcamera.org/api/patches/26319/?format=json","web_url":"https://patchwork.libcamera.org/patch/26319/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260323201015.4480-1-gianfranco.mariotti94@gmail.com>","date":"2026-03-23T20:10:17","name":"[v2] libcamera: software_isp: debayer_egl: Teardown the output texture","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"3580791614186bb87dc7f94c67f95b47eea5a056","submitter":{"id":262,"url":"https://patchwork.libcamera.org/api/people/262/?format=json","name":"Gianfranco Mariotti","email":"gianfranco.mariotti94@gmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/26319/mbox/","series":[{"id":5839,"url":"https://patchwork.libcamera.org/api/series/5839/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5839","date":"2026-03-23T20:10:17","name":"[v2] libcamera: software_isp: debayer_egl: Teardown the output texture","version":2,"mbox":"https://patchwork.libcamera.org/series/5839/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26319/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26319/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 33E94BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Mar 2026 20:12:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 71D9962777;\n\tMon, 23 Mar 2026 21:12:56 +0100 (CET)","from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5833662647\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2026 21:12:55 +0100 (CET)","by mail-wm1-x32a.google.com with SMTP id\n\t5b1f17b1804b1-486fb112c09so28977735e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2026 13:12:55 -0700 (PDT)","from h7015t.. ([193.207.126.104]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-486fe032a55sm591533925e9.7.2026.03.23.13.12.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 23 Mar 2026 13:12:53 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"cbEbr4Ym\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20251104; t=1774296774; x=1774901574;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=Zmi8UdektOiNbhiZay6d0nDmMc2ruVGEzCqpcNOwBWw=;\n\tb=cbEbr4Ym1xpMqZCFAYacenquYaZd3VOQZhVevbLxdkJsjufFDs7xbYpVKkUgqjVQjq\n\tyRGxWy6Dfsel1IGR/iVoEec+gcThCTF5pR2YDjyjINsmT0GhIqsgC+YxRynp9+8pjegb\n\tovy0tI/D1oua/EPtzG+HZf/TMRWDe1eKoqklghjFmDVdRpfr8NBoKO8E0yfJ8CuiZ3w5\n\tWG74W01L6wuzaHQidR9HIqwbjC+cRn0/lcFR3RF1aUhyrLIZwL79hOlGggRClX5NbUhq\n\tVR1D8Yqf69FViFBAgsLMeeOjllstmO8ZhW5oZgCWHQj+BZL3NwobiS3+axhw3yjVR/1b\n\tbZcA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1774296774; x=1774901574;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=Zmi8UdektOiNbhiZay6d0nDmMc2ruVGEzCqpcNOwBWw=;\n\tb=lIXR3jtTuT5qUyC5DI0Mdg8ra1nOssTQwEMS4l9R8b1Y6MV7DZB0C3RbGmzYG4zBF8\n\tPq2UI4WDuQ44mVeEdOke1OH5IsOiqnEkvA5XzrB6Xow7Pz4z7pztNm8F+ZzSo1xlvhpr\n\tksOWF0AJ11DbsjMoVjW+uXti3/xWJH/jdnXAVgqzJciQJoy/ikZleyBbL/MRwG92F8Ku\n\tQGVvMhaTNbJHHOJnCjh/GKGmJLby+kT4RqX2HE2rCv9FkRqW/sS6KNKVKE61FLri6QhW\n\titm/lCcA6QOKcqtepSHFcBAwHkI0XjvxC8y3XDRq+IV/iwtYiK5aKNrPhARyOhu4YyBh\n\tCQ9g==","X-Gm-Message-State":"AOJu0YzOafAdy5KLT6Wmn1BP3KPd4iO6HD5BrsC4hYo8UpSQ2xC5EMeH\n\t3lMPQKwivK+B3Sn+aVu4rsOvdZM7l92+4orUJJAN7dNxScF1S8QC/AlpLC3i","X-Gm-Gg":"ATEYQzxiCgEccM8tDHCEk63macBumdG1Mv8kKvTRk4Vi29sjRgzBqqvd7UNO4ofz+89\n\tfz9Uix9wl6rbUTAEYdWs/HJjtbbQMgkdUBPmNsKmpsVnwDEW5faDlHvuaLwH+pGDhoPND8Bw80s\n\t2EfJbucfKKbBp9yNosE9keJikqg0DEu3zyWed3+4+Nhiw6kQpag7UESjTP3YHt+Qb0xIm1cAmUE\n\txTQNN0rFYbIJRLAu36y87SerAleM3gZDmKjobsic+JgcfyppiuPWTvsw+cPWNLfvRJqrKiPAO8K\n\tqeK4beBD56n+HHPu9syZTjcLgYk9GVUMO9/kPkj+Ioz3/Q9qjgSunXN70DFGkgKhRm6DWRRqP5g\n\tTX9ONB1LgJ66IroqumWsQl+8UgFKJbKiDXr9OojHNtSY1GamTx4N79lJk5UhR/k+xOkEQG2S5lz\n\ttEjID6uX/I9wXD93iXxhY8+AwpxLV0jIYlTQ==","X-Received":"by 2002:a05:600c:3b07:b0:485:419c:4eab with SMTP id\n\t5b1f17b1804b1-486fedab40emr183511675e9.6.1774296774274; \n\tMon, 23 Mar 2026 13:12:54 -0700 (PDT)","From":"Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>","Subject":"[PATCH v2] libcamera: software_isp: debayer_egl: Teardown the output\n\ttexture","Date":"Mon, 23 Mar 2026 21:10:17 +0100","Message-Id":"<20260323201015.4480-1-gianfranco.mariotti94@gmail.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Destroy the EGL image associated with the output DMA-BUF texture\nafter processing the frame.\n\nWithout this change memory can be seen building up while running\na gstreamer pipeline using GPUISP, and on end of available memory\nthe stream freezes and the error message `eglCreateImageKHR fail`\nis reported repeatedly.\n\nSigned-off-by: Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>\n---\nChanges in v2:\n- use utils::scope_exit to teardown\n\n src/libcamera/software_isp/debayer_egl.cpp | 1 +\n 1 file changed, 1 insertion(+)","diff":"diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\nindex 8147eca1..14ea98eb 100644\n--- a/src/libcamera/software_isp/debayer_egl.cpp\n+++ b/src/libcamera/software_isp/debayer_egl.cpp\n@@ -506,6 +506,7 @@ int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParam\n \n \t/* Generate the output render framebuffer as render to texture */\n \tegl_.createOutputDMABufTexture2D(*eglImageBayerOut_, out_fd);\n+\tutils::scope_exit outImageGuard([&] { egl_.destroyDMABufTexture(*eglImageBayerOut_); });\n \n \tsetShaderVariableValues(params);\n \tglViewport(0, 0, width_, height_);\n","prefixes":["v2"]}