{"id":911,"url":"https://patchwork.libcamera.org/api/patches/911/?format=json","web_url":"https://patchwork.libcamera.org/patch/911/","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":"<20190403150735.27580-7-jacopo@jmondi.org>","date":"2019-04-03T15:07:33","name":"[libcamera-devel,v3,6/8] libcamera: ipu3: Queue request for multiple streams","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"75489f53c6dbcaab890e7bc2c7663f4cae986c21","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/911/mbox/","series":[{"id":239,"url":"https://patchwork.libcamera.org/api/series/239/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=239","date":"2019-04-03T15:07:27","name":"libcamera: ipu3: Multiple streams support","version":3,"mbox":"https://patchwork.libcamera.org/series/239/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/911/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/911/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6484A610BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Apr 2019 17:06:59 +0200 (CEST)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id EC96CFF806;\n\tWed,  3 Apr 2019 15:06:58 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  3 Apr 2019 17:07:33 +0200","Message-Id":"<20190403150735.27580-7-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.21.0","In-Reply-To":"<20190403150735.27580-1-jacopo@jmondi.org>","References":"<20190403150735.27580-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 6/8] libcamera: ipu3: Queue request for\n\tmultiple streams","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":"Wed, 03 Apr 2019 15:07:00 -0000"},"content":"Add support for queue request on the main and secondary outputs of the\nImgU.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 26 ++++++++++++++------------\n 1 file changed, 14 insertions(+), 12 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex f7e75fac1dfe..8c67cf985d1e 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -572,20 +572,22 @@ void PipelineHandlerIPU3::stop(Camera *camera)\n int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)\n {\n \tIPU3CameraData *data = cameraData(camera);\n-\tV4L2Device *output = data->imgu_->output_.dev;\n-\tStream *stream = &data->outStream_;\n \n-\t/* Queue a buffer to the ImgU output for capture. */\n-\tBuffer *buffer = request->findBuffer(stream);\n-\tif (!buffer) {\n-\t\tLOG(IPU3, Error)\n-\t\t\t<< \"Attempt to queue request with invalid stream\";\n-\t\treturn -ENOENT;\n-\t}\n+\tfor (Stream *stream : request->streams()) {\n+\t\tBuffer *buffer = request->findBuffer(stream);\n+\t\tif (!buffer) {\n+\t\t\tLOG(IPU3, Error) << \"Attempt to queue invalid request\";\n+\t\t\treturn -ENOENT;\n+\t\t}\n \n-\tint ret = output->queueBuffer(buffer);\n-\tif (ret < 0)\n-\t\treturn ret;\n+\t\tV4L2Device *videoDevice = isOutput(data, stream)\n+\t\t\t\t\t? data->imgu_->output_.dev\n+\t\t\t\t\t: data->imgu_->viewfinder_.dev;\n+\n+\t\tint ret = videoDevice->queueBuffer(buffer);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n \n \tPipelineHandler::queueRequest(camera, request);\n \n","prefixes":["libcamera-devel","v3","6/8"]}