{"id":9899,"url":"https://patchwork.libcamera.org/api/1.1/patches/9899/?format=json","web_url":"https://patchwork.libcamera.org/patch/9899/","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":"<20201002093309.109180-2-naush@raspberrypi.com>","date":"2020-10-02T09:33:05","name":"[libcamera-devel,1/5] pipeline: raspberrypi: Sensor flips should be applied unconditionally","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"bd9fa6f340e862d0ac32415755d970c74ee993cb","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/9899/mbox/","series":[{"id":1345,"url":"https://patchwork.libcamera.org/api/1.1/series/1345/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1345","date":"2020-10-02T09:33:04","name":"RFQ: Pass controls on camera:start()","version":1,"mbox":"https://patchwork.libcamera.org/series/1345/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9899/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9899/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 4A404C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  2 Oct 2020 09:33:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8DF5C625AF;\n\tFri,  2 Oct 2020 11:33:15 +0200 (CEST)","from mail-wm1-x344.google.com (mail-wm1-x344.google.com\n\t[IPv6:2a00:1450:4864:20::344])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BFDC60394\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  2 Oct 2020 11:33:14 +0200 (CEST)","by mail-wm1-x344.google.com with SMTP id t17so995140wmi.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 02 Oct 2020 02:33:14 -0700 (PDT)","from naushir-VirtualBox.pitowers.org\n\t([2a00:1098:3142:14:a00:27ff:fe4d:f6a2])\n\tby smtp.gmail.com with ESMTPSA id\n\tt203sm1101145wmg.43.2020.10.02.02.33.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 02 Oct 2020 02:33:13 -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=\"nHcoiBMS\"; 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=tKR6QKoHMdc2FLcGM9k70wkBXqJDIsU1JD4u0rBxRzE=;\n\tb=nHcoiBMSwZ04PE/h+a1rhRh8GBwe84H0qtUTvy7N9CeeVaS5F+PGt9aYv/DVWnYDG5\n\tSK0lejTXnle8RbBLL2AImPUvyGJJ7znhIPHHhPkTMVQige1dHklm0uW0u+WqpE7eckNN\n\t9iS3WErInRuFBRWaFTZClXW1hX0pGqZGvUiZsHjFmbowedXIH32AvW3T4xeFzl7N8FE1\n\tONrIJuDJMLjbgniExSE6Bye63slY5BJDHUrF0rcvkZS6GQm959b4FHm+qAsBz/GxxD9S\n\tZ9Kxqwmiaup5galwbyROpCTaLq2gsozJFYbLBeuAK55lVR3gBcKG51kYP1S8zkVKCC7C\n\tkHgg==","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=tKR6QKoHMdc2FLcGM9k70wkBXqJDIsU1JD4u0rBxRzE=;\n\tb=NFEftH36Csjauxj3lwHbbxKC5iq3/r7G8dJDIiYrjMb7XOKkbE51tTr2RZwf5nS5Ky\n\th9+gknoGYK8CzK/6Nk/gLBzUkA2uXnp5RvsYnWTz9PnY4rLwZoEpdiFa4oI4ME0tsQ29\n\tl+hAQB7nMOciAVOJzFn5vGa+CIkLzyi5+vc5E8LCKJR02ixLPEg9782z5Q+WRAtkr6N5\n\tAaZ6sHjwRyONrpXNgi0+x1VjcOqBBMxt64X5qs9tyA+k9e7DfyRr9nX1j1mzmrlZqi8k\n\t+3UQiqn4dFfmY4nyfkIKdDuIAOCtYpw25Boe7BT4jfMcTMQ5wKkKuG3HOtvwAykwu0e8\n\tGA0A==","X-Gm-Message-State":"AOAM5321vI6fEPyQtlwuzgjACh5t4OZVG0vDAs8mofKQXjLfhU6tqWOx\n\tm10okI3jonFgPA6vtKWVIUU6GqQCgyclMw==","X-Google-Smtp-Source":"ABdhPJwcs3s+PT9VB3ZOs4HU98YSQ5foqEloea1VlrO3CN4z4AuDVaFS2rb+D/ZQWnF1FmrbHVfxLA==","X-Received":"by 2002:a1c:2cc2:: with SMTP id\n\ts185mr1876269wms.77.1601631193816; \n\tFri, 02 Oct 2020 02:33:13 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  2 Oct 2020 10:33:05 +0100","Message-Id":"<20201002093309.109180-2-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20201002093309.109180-1-naush@raspberrypi.com>","References":"<20201002093309.109180-1-naush@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 1/5] pipeline: raspberrypi: Sensor flips\n\tshould be applied unconditionally","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":"The code in pipeline_handler::start() that applies the flips were in a\nblock that was conditional on the RPi::IPA_CONFIG_SENSOR return result.\nThis should be applied unconditionally.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp      | 26 +++++++++----------\n 1 file changed, 13 insertions(+), 13 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex d4d04c0d..1052bdce 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1172,19 +1172,6 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \t\t\t\t\t      { V4L2_CID_EXPOSURE, result.data[resultIdx++] } });\n \t\t\tsensorMetadata_ = result.data[resultIdx++];\n \t\t}\n-\n-\t\t/*\n-\t\t * Configure the H/V flip controls based on the combination of\n-\t\t * the sensor and user transform.\n-\t\t */\n-\t\tif (supportsFlips_) {\n-\t\t\tControlList ctrls(unicam_[Unicam::Image].dev()->controls());\n-\t\t\tctrls.set(V4L2_CID_HFLIP,\n-\t\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));\n-\t\t\tctrls.set(V4L2_CID_VFLIP,\n-\t\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));\n-\t\t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n-\t\t}\n \t}\n \n \tif (result.operation & RPi::IPA_CONFIG_SENSOR) {\n@@ -1198,6 +1185,19 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \t\tdropFrameCount_ = result.data[resultIdx++];\n \t}\n \n+\t/*\n+\t * Configure the H/V flip controls based on the combination of\n+\t * the sensor and user transform.\n+\t */\n+\tif (supportsFlips_) {\n+\t\tControlList ctrls(unicam_[Unicam::Image].dev()->controls());\n+\t\tctrls.set(V4L2_CID_HFLIP,\n+\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));\n+\t\tctrls.set(V4L2_CID_VFLIP,\n+\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));\n+\t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n+\t}\n+\n \treturn 0;\n }\n \n","prefixes":["libcamera-devel","1/5"]}