{"id":12566,"url":"https://patchwork.libcamera.org/api/patches/12566/?format=json","web_url":"https://patchwork.libcamera.org/patch/12566/","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":"<20210611084228.1830629-4-hiroh@chromium.org>","date":"2021-06-11T08:42:27","name":"[libcamera-devel,RFC,3/4] libcamera: ipu3: Apply a requested test pattern mode","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"dc26c2742e005f813d2fe4f821107824dd485ba3","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/12566/mbox/","series":[{"id":2121,"url":"https://patchwork.libcamera.org/api/series/2121/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2121","date":"2021-06-11T08:42:24","name":"Support sensor test pattern mode in Android HAL","version":1,"mbox":"https://patchwork.libcamera.org/series/2121/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12566/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12566/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 28F90C3214\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 11 Jun 2021 08:42:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 301996893B;\n\tFri, 11 Jun 2021 10:42:42 +0200 (CEST)","from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com\n\t[IPv6:2607:f8b0:4864:20::1031])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 551C96029E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jun 2021 10:42:40 +0200 (CEST)","by mail-pj1-x1031.google.com with SMTP id\n\tg6-20020a17090adac6b029015d1a9a6f1aso6913648pjx.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jun 2021 01:42:40 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:367e:c2e4:d691:eca1])\n\tby smtp.gmail.com with ESMTPSA id\n\t20sm4323542pfi.170.2021.06.11.01.42.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 11 Jun 2021 01:42:38 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"ND1qP+vS\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=oT1OFuDrbYyFFxu/+kTv9BHGwA3kSmtUGooGvF71484=;\n\tb=ND1qP+vSVFfjBDc4dYR58HMBcyyPLaTl4QP5CLK5zJIi7+lQXvNAhmm8iZrwBzkmDV\n\tvKyKMSBkQiYNW6sdjPlrtks4do7f4YX4bb6We5+SpbWSlo2LU186ioD62aLM1qwzELiU\n\tUFelZw2ezo6d/HWZuRmMIdmR6GiAc2Det6wHw=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=oT1OFuDrbYyFFxu/+kTv9BHGwA3kSmtUGooGvF71484=;\n\tb=GBlBU6reWa6gvn9ttPsH+s9eRR8WGxjEiqyCIELW3Q0aFb6n1dCz4k03mZaI/y7ZTW\n\tB3A+oRzGzIXkQwM5My+zsS664/s6eSa/t6QHQGQY8do5osLX1dPH34SZveGDilLizkfp\n\tb8MCklEj2q8NEg3nvQQCOAV+pqtnVGy2yIQazHpUdPWMsTAj+Z1tzR4R5/ydJnBoanW2\n\t2Ku9aSw+xqG2gdz6XTjYcOQFcnDeesFdQXBa/tTkfP9YaMPJ4Xj+4OLQyU2UengYU52u\n\t49zFs5Z8D7/yxN3+gdpBXd2ak8L5LdQPFX9/5aNIPnicGdYyU6ei+hSvfBeLfLiosaQI\n\t+A4A==","X-Gm-Message-State":"AOAM531GYabEGcZ93sgQDel7s0v6I4S0CZmwB5kVCHhs/XURgOQ6ly2M\n\tv9+UvfzX5XHkOD5eE3jV/AR4GJpUep53uQ==","X-Google-Smtp-Source":"ABdhPJx7RfCImwru/H7n9gq4tC2tGjyowGj6+wU4PjK6eDexyy003/UwlVwK2gZYZ0nxIdEsilhjBA==","X-Received":"by 2002:a17:90b:1e46:: with SMTP id\n\tpi6mr8137079pjb.212.1623400958810; \n\tFri, 11 Jun 2021 01:42:38 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 11 Jun 2021 17:42:27 +0900","Message-Id":"<20210611084228.1830629-4-hiroh@chromium.org>","X-Mailer":"git-send-email 2.32.0.272.g935e593368-goog","In-Reply-To":"<20210611084228.1830629-1-hiroh@chromium.org>","References":"<20210611084228.1830629-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH 3/4] libcamera: ipu3: Apply a\n\trequested test pattern mode","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":"Apply a camera sensor a requested test pattern mode. The test\npattern mode can be specified per frame.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/libcamera/pipeline/ipu3/cio2.cpp | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp\nindex 8548f749..9d1ff07d 100644\n--- a/src/libcamera/pipeline/ipu3/cio2.cpp\n+++ b/src/libcamera/pipeline/ipu3/cio2.cpp\n@@ -12,6 +12,7 @@\n #include <libcamera/control_ids.h>\n #include <libcamera/formats.h>\n #include <libcamera/geometry.h>\n+#include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n #include \"libcamera/internal/camera_sensor.h\"\n@@ -289,6 +290,20 @@ FrameBuffer *CIO2Device::queueBuffer(Request *request, FrameBuffer *rawBuffer)\n \t\tbuffer->setRequest(request);\n \t}\n \n+\tif (request->controls().contains(controls::draft::TestPatternMode)) {\n+\t\tconst uint8_t testPatternMode =\n+\t\t\tstatic_cast<uint8_t>(request->controls().get(\n+\t\t\t\tcontrols::draft::TestPatternMode));\n+\t\tint ret = sensor_->setTestPatternMode(testPatternMode);\n+\t\tif (ret) {\n+\t\t\tLOG(IPU3, Error)\n+\t\t\t\t<< \"Failed to set test pattern mode: \" << ret;\n+\t\t} else {\n+\t\t\trequest->metadata().set(controls::draft::TestPatternMode,\n+\t\t\t\t\t\ttestPatternMode);\n+\t\t}\n+\t}\n+\n \tint ret = output_->queueBuffer(buffer);\n \tif (ret)\n \t\treturn nullptr;\n","prefixes":["libcamera-devel","RFC","3/4"]}