Patch Detail
Show a patch.
GET /api/patches/11101/?format=api
{ "id": 11101, "url": "https://patchwork.libcamera.org/api/patches/11101/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11101/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20210201125633.26242-1-naush@raspberrypi.com>", "date": "2021-02-01T12:56:32", "name": "[libcamera-devel,1/2] pipeline: ipa: raspberrypi: Rename RPi::ConfigParameters enum values", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "b5aeef318427311f81fa8c3fd9da22a102e5e3c1", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11101/mbox/", "series": [ { "id": 1635, "url": "https://patchwork.libcamera.org/api/series/1635/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1635", "date": "2021-02-01T12:56:32", "name": "[libcamera-devel,1/2] pipeline: ipa: raspberrypi: Rename RPi::ConfigParameters enum values", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1635/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11101/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11101/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 C6510BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 1 Feb 2021 12:56:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 533F9683FF;\n\tMon, 1 Feb 2021 13:56:48 +0100 (CET)", "from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com\n\t[IPv6:2a00:1450:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E177E683FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 1 Feb 2021 13:56:46 +0100 (CET)", "by mail-wr1-x42d.google.com with SMTP id s7so13468892wru.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Feb 2021 04:56:46 -0800 (PST)", "from naushir-VirtualBox.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tr17sm12655002wro.46.2021.02.01.04.56.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Feb 2021 04:56:45 -0800 (PST)" ], "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=\"LAlqj7w3\"; 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:mime-version\n\t:content-transfer-encoding;\n\tbh=ovn/7RwaCa9oCo+oeP0CfvsGRzh82LoJ7GIXw6ESflw=;\n\tb=LAlqj7w3y4Wb89oVoEYj81bHToJ7sBtLPUqGiTjg4wVtSbD7D1O43mlV/PES6eFTD+\n\t5lvENHaPnsiL2k4D7lWKXNU7cik3zHSFeHYI+XHsUWHfUtDcsMHe/ZXDyi2s11CNpwKR\n\tLMrDMXCCC/dnMH53opGRjo5vQRumrb9+Xzsf0U+n1VmmRi38ZCwdH2PSIpThrcHeeVtS\n\tgeGweFwIJrAchbKJi8J+jxs4SRhwdlv6U5fR4I8kQw9KxOubuDI+mU/OQfsGkSkZj4G7\n\tsLfXa5btUoaB6N4D5KZOtd4Az9a8aedIVF10ThIAm3iWWU/gppW26UZTI/ledYxA0nMC\n\tF16A==", "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:mime-version\n\t:content-transfer-encoding;\n\tbh=ovn/7RwaCa9oCo+oeP0CfvsGRzh82LoJ7GIXw6ESflw=;\n\tb=N8AW+5X1/R5LOWGyO2esUFyp9zsHoKRKq6Xv2t8mtq1QdhC5ti7W02W0W2M62vp4pJ\n\tSs6d/SPhZs4UFGiayiRhi7YTx1roL3SPVRA0oGzujziDh8tKLO1Epz1e2L5mLHo44o/t\n\ts74oqObKhVEKcxerT3n74WjA7V5+MM4uTEged05uNAApfPVtGl5GSxjZgMl+PQvVMJit\n\tbN7J21nCCIwbAkwXtWVjJsZqqFfr2+Itl0vYGJKjgOReIpw6BpvIWXtBxhWGCDcnoh+g\n\tYxU/BZ7LHowAj3WpWXZzHHOs1ZdyDDhPx9WyQOFgjFD2AE1kJAgFboyciHfxTmgmM2YE\n\tje2A==", "X-Gm-Message-State": "AOAM5316WNfvAdpQjeEtcQIdQsM6tV5ymgTnu7r9l3qpmfv8EJb1mcdc\n\tnNovT1uvjf+vm9TwrNk+KqJt7s02R1e5/dhj", "X-Google-Smtp-Source": "ABdhPJzqmdiQz4pIyWHUv3anPhYJ4u2tQHTTsq7xn4MpGm9YVo5SjhVbqaduYTBvDR+dUeSiaAIn1A==", "X-Received": "by 2002:adf:f8c8:: with SMTP id\n\tf8mr18236373wrq.132.1612184206085; \n\tMon, 01 Feb 2021 04:56:46 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 1 Feb 2021 12:56:32 +0000", "Message-Id": "<20210201125633.26242-1-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 1/2] pipeline: ipa: raspberrypi: Rename\n\tRPi::ConfigParameters enum values", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Rename the enum values to indicate pipeline handler -> IPA actions\n(IPA_CONFIG_*) and IPA -> pipeline handler return results (IPA_RESULT_*).\nAdditionally, provide more descriptive names for these values.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/ipa/raspberrypi.h | 10 +++++-----\n src/ipa/raspberrypi/raspberrypi.cpp | 18 +++++++++---------\n .../pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++------\n 3 files changed, 20 insertions(+), 20 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\nindex 5a9433825d5a..970b9e931188 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -20,11 +20,11 @@ namespace RPi {\n \n enum ConfigParameters {\n \tIPA_CONFIG_LS_TABLE = (1 << 0),\n-\tIPA_CONFIG_STAGGERED_WRITE = (1 << 1),\n-\tIPA_CONFIG_SENSOR = (1 << 2),\n-\tIPA_CONFIG_DROP_FRAMES = (1 << 3),\n-\tIPA_CONFIG_FAILED = (1 << 4),\n-\tIPA_CONFIG_STARTUP = (1 << 5),\n+\tIPA_CONFIG_STARTUP_CTRLS = (1 << 1),\n+\tIPA_RESULT_CONFIG_FAILED = (1 << 2),\n+\tIPA_RESULT_SENSOR_PARAMS = (1 << 3),\n+\tIPA_RESULT_SENSOR_CTRLS = (1 << 4),\n+\tIPA_RESULT_DROP_FRAMES = (1 << 5),\n };\n \n enum Operations {\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 681ab9211b7c..fea1ea3957bb 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -170,7 +170,7 @@ int IPARPi::start(const IPAOperationData &data, IPAOperationData *result)\n \n \tASSERT(result);\n \tresult->operation = 0;\n-\tif (data.operation & RPi::IPA_CONFIG_STARTUP) {\n+\tif (data.operation & RPi::IPA_CONFIG_STARTUP_CTRLS) {\n \t\t/* We have been given some controls to action before start. */\n \t\tqueueRequest(data.controls[0]);\n \t}\n@@ -188,7 +188,7 @@ int IPARPi::start(const IPAOperationData &data, IPAOperationData *result)\n \t\tControlList ctrls(sensorCtrls_);\n \t\tapplyAGC(&agcStatus, ctrls);\n \t\tresult->controls.emplace_back(ctrls);\n-\t\tresult->operation |= RPi::IPA_CONFIG_SENSOR;\n+\t\tresult->operation |= RPi::IPA_RESULT_SENSOR_CTRLS;\n \t}\n \n \t/*\n@@ -236,7 +236,7 @@ int IPARPi::start(const IPAOperationData &data, IPAOperationData *result)\n \t}\n \n \tresult->data.push_back(dropFrame);\n-\tresult->operation |= RPi::IPA_CONFIG_DROP_FRAMES;\n+\tresult->operation |= RPi::IPA_RESULT_DROP_FRAMES;\n \n \tfirstStart_ = false;\n \n@@ -289,7 +289,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n {\n \tif (entityControls.size() != 2) {\n \t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n-\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n+\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n \t\treturn;\n \t}\n \n@@ -300,13 +300,13 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \n \tif (!validateSensorControls()) {\n \t\tLOG(IPARPI, Error) << \"Sensor control validation failed.\";\n-\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n+\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n \t\treturn;\n \t}\n \n \tif (!validateIspControls()) {\n \t\tLOG(IPARPI, Error) << \"ISP control validation failed.\";\n-\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n+\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n \t\treturn;\n \t}\n \n@@ -325,7 +325,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tif (!helper_) {\n \t\t\tLOG(IPARPI, Error) << \"Could not create camera helper for \"\n \t\t\t\t\t << cameraName;\n-\t\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n+\t\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n \t\t\treturn;\n \t\t}\n \n@@ -342,7 +342,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tresult->data.push_back(exposureDelay); /* For VBLANK ctrl */\n \t\tresult->data.push_back(sensorMetadata);\n \n-\t\tresult->operation |= RPi::IPA_CONFIG_STAGGERED_WRITE;\n+\t\tresult->operation |= RPi::IPA_RESULT_SENSOR_PARAMS;\n \t}\n \n \t/* Re-assemble camera mode using the sensor info. */\n@@ -395,7 +395,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tapplyAGC(&agcStatus, ctrls);\n \n \t\tresult->controls.emplace_back(ctrls);\n-\t\tresult->operation |= RPi::IPA_CONFIG_SENSOR;\n+\t\tresult->operation |= RPi::IPA_RESULT_SENSOR_CTRLS;\n \t}\n \n \tlastMode_ = mode_;\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 5ad12d99638f..48e5943edc1a 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -753,7 +753,7 @@ int PipelineHandlerRPi::start(Camera *camera, [[maybe_unused]] ControlList *cont\n \tIPAOperationData ipaData = {};\n \tIPAOperationData result = {};\n \tif (controls) {\n-\t\tipaData.operation = RPi::IPA_CONFIG_STARTUP;\n+\t\tipaData.operation = RPi::IPA_CONFIG_STARTUP_CTRLS;\n \t\tipaData.controls.emplace_back(*controls);\n \t}\n \tret = data->ipa_->start(ipaData, &result);\n@@ -765,12 +765,12 @@ int PipelineHandlerRPi::start(Camera *camera, [[maybe_unused]] ControlList *cont\n \t}\n \n \t/* Apply any gain/exposure settings that the IPA may have passed back. */\n-\tif (result.operation & RPi::IPA_CONFIG_SENSOR) {\n+\tif (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {\n \t\tControlList &ctrls = result.controls[0];\n \t\tdata->unicam_[Unicam::Image].dev()->setControls(&ctrls);\n \t}\n \n-\tif (result.operation & RPi::IPA_CONFIG_DROP_FRAMES) {\n+\tif (result.operation & RPi::IPA_RESULT_DROP_FRAMES) {\n \t\t/* Configure the number of dropped frames required on startup. */\n \t\tdata->dropFrameCount_ = result.data[0];\n \t}\n@@ -1213,13 +1213,13 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \tipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,\n \t\t\t&result);\n \n-\tif (result.operation & RPi::IPA_CONFIG_FAILED) {\n+\tif (result.operation & RPi::IPA_RESULT_CONFIG_FAILED) {\n \t\tLOG(RPI, Error) << \"IPA configuration failed!\";\n \t\treturn -EPIPE;\n \t}\n \n \tunsigned int resultIdx = 0;\n-\tif (result.operation & RPi::IPA_CONFIG_STAGGERED_WRITE) {\n+\tif (result.operation & RPi::IPA_RESULT_SENSOR_PARAMS) {\n \t\t/*\n \t\t * Setup our delayed control writer with the sensor default\n \t\t * gain and exposure delays.\n@@ -1237,7 +1237,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \t\t}\n \t}\n \n-\tif (result.operation & RPi::IPA_CONFIG_SENSOR) {\n+\tif (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {\n \t\tControlList &ctrls = result.controls[0];\n \t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n \t}\n", "prefixes": [ "libcamera-devel", "1/2" ] }