Show a patch.

GET /api/1.1/patches/14254/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 14254,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14254/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14254/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20211022115537.2964533-3-naush@raspberrypi.com>",
    "date": "2021-10-22T11:55:33",
    "name": "[libcamera-devel,2/6] pipeline: raspberrypi: Convert the pipeline handler to use media controller",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a57125c39b701caac950506d7e91d97f233a9e4c",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14254/mbox/",
    "series": [
        {
            "id": 2649,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2649/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2649",
            "date": "2021-10-22T11:55:31",
            "name": "Raspberry Pi: Conversion to media controller",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2649/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14254/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14254/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 7E5F6BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Oct 2021 11:55:47 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E000768F63;\n\tFri, 22 Oct 2021 13:55:45 +0200 (CEST)",
            "from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 862446012A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 13:55:43 +0200 (CEST)",
            "by mail-wr1-x430.google.com with SMTP id v17so294200wrv.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 04:55:43 -0700 (PDT)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:f00d:ddf0:61b0:a4cd])\n\tby smtp.gmail.com with ESMTPSA id\n\tl5sm7853364wru.24.2021.10.22.04.55.41\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Oct 2021 04:55:41 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"KlxdnJxV\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=sCKKLF8TUAwbk+gOcEEPUCf0R0HWOcxv1bN+xA23Zrs=;\n\tb=KlxdnJxVePVYLGthIvBR02mdQVFJUaDyVDODk8nNGGOLiU4d0T6NZThNkU++wzqLIE\n\tPa+i9WioOQYSyoqD+XfuUFKs8EHtZbPW82xZMnn2GH1HRec6HPCCMvVqNAg/EQ8jHqVL\n\tftDPvbKwK1nj4pO/0aYlA6lQRbIBAi0BF3G1YhrK6ZNvdbIWUOU1k+202A6UzE26gQN3\n\tAx9rgbd535Nw+EooI5SDK/5ASbybiJEsX3KsUFbPb0ZVQEGpYf9kOTOZSwzlpFRLDpW+\n\tSSyGIpUs8p4joKiXRwVyS7X+CxxluQFOjIWxxRczuyaA2IZA7qq2j6kkdTAtB0VDoE7e\n\t5EqA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=sCKKLF8TUAwbk+gOcEEPUCf0R0HWOcxv1bN+xA23Zrs=;\n\tb=4S2gniyOp+R7rlCO10khW1w8/4Val8a9+6PWpYu8pNjx3yB7Oh421aHwoBdWRPzY0Q\n\thWH60jaJA2Y7r7z2RmKktvuoqoX2xCiK880lviQCqLS8pza8oGaJC12K6RNPvBJAcsAh\n\tKEIcc6SuwF2BaqnuXt41Zt6MQuGIHzcAD3LljkMxCr7r2VnTwJsGKvvKcSpqlCUUwLaM\n\tl9SjmjvAeHuTJjgZSH0KryNJ+ko4Yk7UVg/YI8I3mKV/eKq7R93T7il9g/2lmaa0B19W\n\trvJObMvQzx2NNyXpI9RPeollFpOOkhCeZRDX7CqffBeNoC30xhxzKUGZCiryXU2c+jDk\n\tlxRg==",
        "X-Gm-Message-State": "AOAM530BpLQMwavto+Q1bL3PItJMyQb0ZOkRYwvDEqNmexG1DiNaiibJ\n\tnJXPIwQ3SJeq9yeXad8TvWSv9SFSjCUlDUaJ",
        "X-Google-Smtp-Source": "ABdhPJzAFj8zNp0q/ZjVmIye1ebKA7WuRvshaDXhhrqK0nVZVCD/QNIApI86/d+l+6Gd2aHzONkSpA==",
        "X-Received": "by 2002:a05:6000:86:: with SMTP id\n\tm6mr7978169wrx.129.1634903742813; \n\tFri, 22 Oct 2021 04:55:42 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 22 Oct 2021 12:55:33 +0100",
        "Message-Id": "<20211022115537.2964533-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211022115537.2964533-1-naush@raspberrypi.com>",
        "References": "<20211022115537.2964533-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/6] pipeline: raspberrypi: Convert the\n\tpipeline handler to use media controller",
        "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": "Switch the pipeline handler to use the new Unicam media controller based driver.\nWith this change, we directly talk to the sensor device driver to set controls\nand set/get formats in the pipeline handler.\n\nThis change requires the accompanying Raspberry Pi linux kernel change at\nhttps://github.com/raspberrypi/linux/pull/4645. If this kernel change is not\npresent, the pipeline handler will fail to run with an error message informing\nthe user to update the kernel build.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp      | 113 +++++++++++-------\n 1 file changed, 67 insertions(+), 46 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 1634ca98f481..730f1575095c 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -48,6 +48,19 @@ LOG_DEFINE_CATEGORY(RPI)\n \n namespace {\n \n+/* Map of mbus codes to supported sizes reported by the sensor. */\n+using SensorFormats = std::map<unsigned int, std::vector<Size>>;\n+\n+SensorFormats populateSensorFormats(std::unique_ptr<CameraSensor> &sensor)\n+{\n+\tSensorFormats formats;\n+\n+\tfor (auto const mbusCode : sensor->mbusCodes())\n+\t\tformats.emplace(mbusCode, sensor->sizes(mbusCode));\n+\n+\treturn formats;\n+}\n+\n bool isRaw(PixelFormat &pixFmt)\n {\n \t/*\n@@ -74,8 +87,7 @@ double scoreFormat(double desired, double actual)\n \treturn score;\n }\n \n-V4L2DeviceFormat findBestMode(V4L2VideoDevice::Formats &formatsMap,\n-\t\t\t      const Size &req)\n+V4L2DeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &req)\n {\n \tdouble bestScore = std::numeric_limits<double>::max(), score;\n \tV4L2DeviceFormat bestMode;\n@@ -88,18 +100,17 @@ V4L2DeviceFormat findBestMode(V4L2VideoDevice::Formats &formatsMap,\n \n \t/* Calculate the closest/best mode from the user requested size. */\n \tfor (const auto &iter : formatsMap) {\n-\t\tV4L2PixelFormat v4l2Format = iter.first;\n+\t\tconst unsigned int mbus_code = iter.first;\n+\t\tconst V4L2PixelFormat v4l2Format = BayerFormat::fromMbusCode(mbus_code).toV4L2PixelFormat();\n \t\tconst PixelFormatInfo &info = PixelFormatInfo::info(v4l2Format);\n \n-\t\tfor (const SizeRange &sz : iter.second) {\n-\t\t\tdouble modeWidth = sz.contains(req) ? req.width : sz.max.width;\n-\t\t\tdouble modeHeight = sz.contains(req) ? req.height : sz.max.height;\n+\t\tfor (const Size &sz : iter.second) {\n \t\t\tdouble reqAr = static_cast<double>(req.width) / req.height;\n-\t\t\tdouble modeAr = modeWidth / modeHeight;\n+\t\t\tdouble modeAr = sz.width / sz.height;\n \n \t\t\t/* Score the dimensions for closeness. */\n-\t\t\tscore = scoreFormat(req.width, modeWidth);\n-\t\t\tscore += scoreFormat(req.height, modeHeight);\n+\t\t\tscore = scoreFormat(req.width, sz.width);\n+\t\t\tscore += scoreFormat(req.height, sz.height);\n \t\t\tscore += PENALTY_AR * scoreFormat(reqAr, modeAr);\n \n \t\t\t/* Add any penalties... this is not an exact science! */\n@@ -116,10 +127,10 @@ V4L2DeviceFormat findBestMode(V4L2VideoDevice::Formats &formatsMap,\n \t\t\tif (score <= bestScore) {\n \t\t\t\tbestScore = score;\n \t\t\t\tbestMode.fourcc = v4l2Format;\n-\t\t\t\tbestMode.size = Size(modeWidth, modeHeight);\n+\t\t\t\tbestMode.size = sz;\n \t\t\t}\n \n-\t\t\tLOG(RPI, Info) << \"Mode: \" << modeWidth << \"x\" << modeHeight\n+\t\t\tLOG(RPI, Info) << \"Mode: \" << sz.width << \"x\" << sz.height\n \t\t\t\t       << \" fmt \" << v4l2Format.toString()\n \t\t\t\t       << \" Score: \" << score\n \t\t\t\t       << \" (best \" << bestScore << \")\";\n@@ -170,6 +181,7 @@ public:\n \tstd::unique_ptr<ipa::RPi::IPAProxyRPi> ipa_;\n \n \tstd::unique_ptr<CameraSensor> sensor_;\n+\tSensorFormats sensorFormats_;\n \t/* Array of Unicam and ISP device streams and associated buffers/streams. */\n \tRPi::Device<Unicam, 2> unicam_;\n \tRPi::Device<Isp, 4> isp_;\n@@ -352,8 +364,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n \t\t\t * Calculate the best sensor mode we can use based on\n \t\t\t * the user request.\n \t\t\t */\n-\t\t\tV4L2VideoDevice::Formats fmts = data_->unicam_[Unicam::Image].dev()->formats();\n-\t\t\tV4L2DeviceFormat sensorFormat = findBestMode(fmts, cfg.size);\n+\t\t\tV4L2DeviceFormat sensorFormat = findBestMode(data_->sensorFormats_, cfg.size);\n \t\t\tint ret = data_->unicam_[Unicam::Image].dev()->tryFormat(&sensorFormat);\n \t\t\tif (ret)\n \t\t\t\treturn Invalid;\n@@ -487,8 +498,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n \t\tswitch (role) {\n \t\tcase StreamRole::Raw:\n \t\t\tsize = data->sensor_->resolution();\n-\t\t\tfmts = data->unicam_[Unicam::Image].dev()->formats();\n-\t\t\tsensorFormat = findBestMode(fmts, size);\n+\t\t\tsensorFormat = findBestMode(data->sensorFormats_, size);\n \t\t\tpixelFormat = sensorFormat.fourcc.toPixelFormat();\n \t\t\tASSERT(pixelFormat.isValid());\n \t\t\tbufferCount = 2;\n@@ -599,32 +609,32 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \t}\n \n \t/* First calculate the best sensor mode we can use based on the user request. */\n-\tV4L2VideoDevice::Formats fmts = data->unicam_[Unicam::Image].dev()->formats();\n-\tV4L2DeviceFormat sensorFormat = findBestMode(fmts, rawStream ? sensorSize : maxSize);\n+\tV4L2DeviceFormat unicamFormat = findBestMode(data->sensorFormats_, rawStream ? sensorSize : maxSize);\n+\n+\tunsigned int mbus_code = BayerFormat::fromV4L2PixelFormat(unicamFormat.fourcc).toMbusCode();\n+\tV4L2SubdeviceFormat sensorFormat { .mbus_code = mbus_code, .size = unicamFormat.size };\n+\n+\tret = data->sensor_->setFormat(&sensorFormat);\n+\tif (ret)\n+\t\treturn ret;\n \n \t/*\n \t * Unicam image output format. The ISP input format gets set at start,\n \t * just in case we have swapped bayer orders due to flips.\n \t */\n-\tret = data->unicam_[Unicam::Image].dev()->setFormat(&sensorFormat);\n+\tret = data->unicam_[Unicam::Image].dev()->setFormat(&unicamFormat);\n \tif (ret)\n \t\treturn ret;\n \n-\t/*\n-\t * The control ranges associated with the sensor may need updating\n-\t * after a format change.\n-\t * \\todo Use the CameraSensor::setFormat API instead.\n-\t */\n-\tdata->sensor_->updateControlInfo();\n-\n \tLOG(RPI, Info) << \"Sensor: \" << camera->id()\n-\t\t       << \" - Selected mode: \" << sensorFormat.toString();\n+\t\t       << \" - Selected sensor mode: \" << sensorFormat.toString()\n+\t\t       << \" - Selected unicam mode: \" << unicamFormat.toString();\n \n \t/*\n \t * This format may be reset on start() if the bayer order has changed\n \t * because of flips in the sensor.\n \t */\n-\tret = data->isp_[Isp::Input].dev()->setFormat(&sensorFormat);\n+\tret = data->isp_[Isp::Input].dev()->setFormat(&unicamFormat);\n \tif (ret)\n \t\treturn ret;\n \n@@ -746,8 +756,8 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \tdata->ispMinCropSize_ = testCrop.size();\n \n \t/* Adjust aspect ratio by providing crops on the input image. */\n-\tSize size = sensorFormat.size.boundedToAspectRatio(maxSize);\n-\tRectangle crop = size.centeredTo(Rectangle(sensorFormat.size).center());\n+\tSize size = unicamFormat.size.boundedToAspectRatio(maxSize);\n+\tRectangle crop = size.centeredTo(Rectangle(unicamFormat.size).center());\n \tdata->ispCrop_ = crop;\n \n \tdata->isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n@@ -761,10 +771,11 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \t * supports it.\n \t */\n \tif (data->sensorMetadata_) {\n-\t\tformat = {};\n-\t\tformat.fourcc = V4L2PixelFormat(V4L2_META_FMT_SENSOR_DATA);\n+\t\tV4L2SubdeviceFormat embeddedFormat;\n \n-\t\tLOG(RPI, Debug) << \"Setting embedded data format.\";\n+\t\tdata->sensor_->device()->getFormat(1, &embeddedFormat);\n+\t\tformat.fourcc = V4L2PixelFormat(V4L2_META_FMT_SENSOR_DATA);\n+\t\tformat.planes[0].size = embeddedFormat.size.width * embeddedFormat.size.height;\n \t\tret = data->unicam_[Unicam::Embedded].dev()->setFormat(&format);\n \t\tif (ret) {\n \t\t\tLOG(RPI, Error) << \"Failed to set format on Unicam embedded: \"\n@@ -847,9 +858,14 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n \t * IPA configure may have changed the sensor flips - hence the bayer\n \t * order. Get the sensor format and set the ISP input now.\n \t */\n-\tV4L2DeviceFormat sensorFormat;\n-\tdata->unicam_[Unicam::Image].dev()->getFormat(&sensorFormat);\n-\tret = data->isp_[Isp::Input].dev()->setFormat(&sensorFormat);\n+\tV4L2SubdeviceFormat sensorFormat;\n+\tdata->sensor_->device()->getFormat(0, &sensorFormat);\n+\n+\tV4L2DeviceFormat ispFormat;\n+\tispFormat.fourcc = BayerFormat::fromMbusCode(sensorFormat.mbus_code).toV4L2PixelFormat();\n+\tispFormat.size = sensorFormat.size;\n+\n+\tret = data->isp_[Isp::Input].dev()->setFormat(&ispFormat);\n \tif (ret) {\n \t\tstop(camera);\n \t\treturn ret;\n@@ -1004,6 +1020,8 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \tif (data->sensor_->init())\n \t\treturn false;\n \n+\tdata->sensorFormats_ = populateSensorFormats(data->sensor_);\n+\n \tipa::RPi::SensorConfig sensorConfig;\n \tif (data->loadIPA(&sensorConfig)) {\n \t\tLOG(RPI, Error) << \"Failed to load a suitable IPA library\";\n@@ -1030,6 +1048,11 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t\t\treturn false;\n \t}\n \n+\tif (!(data->unicam_[Unicam::Image].dev()->caps().device_caps() & V4L2_CAP_IO_MC)) {\n+\t\tLOG(RPI, Error) << \"Unicam driver did not advertise V4L2_CAP_IO_MC, please update your kernel!\";\n+\t\treturn false;\n+\t}\n+\n \t/*\n \t * Setup our delayed control writer with the sensor default\n \t * gain and exposure delays. Mark VBLANK for priority write.\n@@ -1039,7 +1062,7 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t\t{ V4L2_CID_EXPOSURE, { sensorConfig.exposureDelay, false } },\n \t\t{ V4L2_CID_VBLANK, { sensorConfig.vblankDelay, true } }\n \t};\n-\tdata->delayedCtrls_ = std::make_unique<DelayedControls>(data->unicam_[Unicam::Image].dev(), params);\n+\tdata->delayedCtrls_ = std::make_unique<DelayedControls>(data->sensor_->device(), params);\n \tdata->sensorMetadata_ = sensorConfig.sensorMetadata;\n \n \t/* Register the controls that the Raspberry Pi IPA can handle. */\n@@ -1066,15 +1089,14 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t * As part of answering the final question, we reset the camera to\n \t * no transform at all.\n \t */\n-\n-\tV4L2VideoDevice *dev = data->unicam_[Unicam::Image].dev();\n-\tconst struct v4l2_query_ext_ctrl *hflipCtrl = dev->controlInfo(V4L2_CID_HFLIP);\n+\tconst V4L2Subdevice *sensor = data->sensor_->device();\n+\tconst struct v4l2_query_ext_ctrl *hflipCtrl = sensor->controlInfo(V4L2_CID_HFLIP);\n \tif (hflipCtrl) {\n \t\t/* We assume it will support vflips too... */\n \t\tdata->supportsFlips_ = true;\n \t\tdata->flipsAlterBayerOrder_ = hflipCtrl->flags & V4L2_CTRL_FLAG_MODIFY_LAYOUT;\n \n-\t\tControlList ctrls(dev->controls());\n+\t\tControlList ctrls(data->sensor_->controls());\n \t\tctrls.set(V4L2_CID_HFLIP, 0);\n \t\tctrls.set(V4L2_CID_VFLIP, 0);\n \t\tdata->setSensorControls(ctrls);\n@@ -1082,9 +1104,8 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \n \t/* Look for a valid Bayer format. */\n \tBayerFormat bayerFormat;\n-\tfor (const auto &iter : dev->formats()) {\n-\t\tV4L2PixelFormat v4l2Format = iter.first;\n-\t\tbayerFormat = BayerFormat::fromV4L2PixelFormat(v4l2Format);\n+\tfor (const auto &iter : data->sensorFormats_) {\n+\t\tbayerFormat = BayerFormat::fromMbusCode(iter.first);\n \t\tif (bayerFormat.isValid())\n \t\t\tbreak;\n \t}\n@@ -1271,7 +1292,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \t\t}\n \t}\n \n-\tentityControls.emplace(0, unicam_[Unicam::Image].dev()->controls());\n+\tentityControls.emplace(0, sensor_->controls());\n \tentityControls.emplace(1, isp_[Isp::Input].dev()->controls());\n \n \t/* Always send the user transform to the IPA. */\n@@ -1406,10 +1427,10 @@ void RPiCameraData::setSensorControls(ControlList &controls)\n \t\tControlList vblank_ctrl;\n \n \t\tvblank_ctrl.set(V4L2_CID_VBLANK, controls.get(V4L2_CID_VBLANK));\n-\t\tunicam_[Unicam::Image].dev()->setControls(&vblank_ctrl);\n+\t\tsensor_->setControls(&vblank_ctrl);\n \t}\n \n-\tunicam_[Unicam::Image].dev()->setControls(&controls);\n+\tsensor_->setControls(&controls);\n }\n \n void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n",
    "prefixes": [
        "libcamera-devel",
        "2/6"
    ]
}