{"id":1700,"url":"https://patchwork.libcamera.org/api/1.1/patches/1700/?format=json","web_url":"https://patchwork.libcamera.org/patch/1700/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20190715055935.21233-3-jacopo@jmondi.org>","date":"2019-07-15T05:59:34","name":"[libcamera-devel,2/3] libcamera: ipu3: Do not re-queue failed buffers","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"b88cd1b1b5aa4dedb51f84e06062808e2a0e17f7","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":{"id":15,"url":"https://patchwork.libcamera.org/api/1.1/users/15/?format=json","username":"jmondi","first_name":"Jacopo","last_name":"Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/patch/1700/mbox/","series":[{"id":431,"url":"https://patchwork.libcamera.org/api/1.1/series/431/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=431","date":"2019-07-15T05:59:32","name":"libcamera: misc fixes","version":1,"mbox":"https://patchwork.libcamera.org/series/431/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1700/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1700/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 76E9261AA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Jul 2019 07:58:32 +0200 (CEST)","from uno.localdomain (unknown [104.132.146.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 3EC7B1C0005;\n\tMon, 15 Jul 2019 05:58:30 +0000 (UTC)"],"X-Originating-IP":"104.132.146.101","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 15 Jul 2019 07:59:34 +0200","Message-Id":"<20190715055935.21233-3-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.21.0","In-Reply-To":"<20190715055935.21233-1-jacopo@jmondi.org>","References":"<20190715055935.21233-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 2/3] libcamera: ipu3: Do not re-queue\n\tfailed buffers","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Mon, 15 Jul 2019 05:58:32 -0000"},"content":"When a video device is stopped all the buffers there queued are\nreleased and their state is set to failure.\n\nCurrently, on buffer completion, failed buffers are blindly re-queued to\nthe ImgU input or CIO2 output devices, preventing them to be re-started\nsuccesfully in future capture sessions.\n\nFix that by inspecting the buffers status and skip re-queueing if\nthey're reported as failing. For the ImgU output buffers this is not\nrequired, as failed buffes should be anyhow delivered to applications in\norder to report their failure.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 6 ++++++\n 1 file changed, 6 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 5204487684c2..11bf3af66ae6 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -916,6 +916,9 @@ int PipelineHandlerIPU3::registerCameras()\n  */\n void IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n {\n+\tif (buffer->status() != Buffer::BufferSuccess)\n+\t\treturn;\n+\n \tcio2_.output_->queueBuffer(buffer);\n }\n \n@@ -946,6 +949,9 @@ void IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n  */\n void IPU3CameraData::cio2BufferReady(Buffer *buffer)\n {\n+\tif (buffer->status() != Buffer::BufferSuccess)\n+\t\treturn;\n+\n \timgu_->input_->queueBuffer(buffer);\n }\n \n","prefixes":["libcamera-devel","2/3"]}