{"id":27025,"url":"https://patchwork.libcamera.org/api/patches/27025/?format=json","web_url":"https://patchwork.libcamera.org/patch/27025/","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":"<20260624082705.272795-3-naush@raspberrypi.com>","date":"2026-06-24T08:24:32","name":"[2/2] pipeline: rpi: pisp: Ensure we don't run our SW correction with packed","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"7800e54e5130b016c99bb7729b25864c01f94f21","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/27025/mbox/","series":[{"id":6014,"url":"https://patchwork.libcamera.org/api/series/6014/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6014","date":"2026-06-24T08:24:30","name":"RPi pipeline handler fixes","version":1,"mbox":"https://patchwork.libcamera.org/series/6014/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/27025/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/27025/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 62146C3306\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Jun 2026 08:35:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B101B65879;\n\tWed, 24 Jun 2026 10:35:39 +0200 (CEST)","from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 21C5F6587E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Jun 2026 10:35:37 +0200 (CEST)","by mail-wr1-x436.google.com with SMTP id\n\tffacd0b85a97d-45ef93a0b0fso83097f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Jun 2026 01:35:37 -0700 (PDT)","from naush-dell.pitowers.org\n\t([2a00:1098:3142:1f:4e02:b684:b0f9:89f0])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-49260d77e8asm23857675e9.1.2026.06.24.01.35.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 24 Jun 2026 01:35:35 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"S2kpZTGz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1782290136; x=1782894936;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=CyBkl13CqzTha84hvi80lhjBtEbQVrFJNvmrm70osXQ=;\n\tb=S2kpZTGzQrrjf7rJ2PbNGjK5xQQtcPKoxL/bQ3h1sflwNTpDZ0Okoy51eh3mvIbKGu\n\tPUXq/g62ZwwjM3d0bpEmlCXl2hnGMbjEnIzVhEQHmFdGjd4SWSLGHYviN44lV2jw7m1u\n\tSKUDbRlEnUeOCKRIzS4p6Xo42xO1Kk3e1ATtQWL0Kvmdb0mFDael3xNzTkdLTAVevsaI\n\tcGHreOrclHkaiINPOAqK295Jh52ezf1ObzYsJihGJ+Yk5jbCggfzeYiuHlOdOB588lzb\n\trEQV6imR3pl84PEMrrgBkRAFnmpKJkmVz07pULwNbP3q6TfKvZBkgn5ih1XfyhmpOQt8\n\t3t6w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782290136; x=1782894936;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=CyBkl13CqzTha84hvi80lhjBtEbQVrFJNvmrm70osXQ=;\n\tb=gSHI4qoXJ5xbuyGTo5oOIBk/L4S2TwZJJoqf164rJLTxSKKQ1wN8GgCkM+u3l5dm1x\n\tYL07X66vfGymcUw9aAuRXuW1Vg4FTQ+azPqLJhW3C2I+79Z7wHF7grv8TEmLrpVoNcth\n\tuqqvnYFt8+CGXjy+5TTm2fDrosbUHNksdKvSyx5lW0r5RXsd8meaFPKtEPi8LeaY1kdq\n\t9vCFgJkusxQQaFSPLMnZGyfoWKnA26K2EpZuyx8uTwR4nz2YDrL+rh7nON/EeNL428ga\n\tv++vbpWm7qHjiVttLqYgvLJcyL3WmPhUlwJC88qqPiAADR1ifSdB2lpP28XRsN7BEi7N\n\tyxJA==","X-Gm-Message-State":"AOJu0YwYgPVztdB8V/qQ4beSk77CdGLEpkaCXvak3QfJk57z6uRkk0AP\n\tUakTl/SgL4kcmlvCylkFo5tG9YXdoAw6DamMYKX+arbh8kFl5F485RfJ1RzpnFl/74wawDKXnSL\n\tq46Ry19M=","X-Gm-Gg":"AfdE7cleBwSV0bqdtvUO9JWhJlzmys8hA0jjXQF/jzSyFfnTRC3wB5YdIzAqUfW0d+J\n\tvGFZS5gKdgZaYGhx0ZNtlTtJk3k1lvK5WJhFTex3g5E5ospaK7cxiaZ6STWxnS12bsOYxAAKdnI\n\truUQgLBX9cJueabQWAPlhaITp7F1a0DfDCg3Af5nA0Ga+Jqd7FlGB4KjufWEbLy7WfeeKSWz1nW\n\tQqq0xMHhjgRPP6u3yNscPZMgoxBbpZQ8+QE75O92c3QiPRXM7TazItG1PRRTzTo30B4r0sXhe4S\n\ts/2LoJltDh/nCpBwB6EvCAPCqYTi4ml/4K3R1G3jJZ2xb5UZiK6hKve2P072isjsUibkzWz6TQo\n\t7f+ypLhtNFAAKPya/CP9J74oy0oipHO/z15Ps0yGsKk85HAuEVriK6vHwL2zWhvMsa+zuxgYrkK\n\twGMN4r/Q4hsS8vTbxSy46NFQ1Q7OnE5zZXzclnGsxTAs8OcQnAazX0ZC10upgsvHtWXteFCoRrl\n\t3AN5m0X9BvUX5YWQBYh0WkJx/XMRFtYjCDpuagrIdz1ILiveZ3DZWUoa+Uy2TDR7kPqqRDeA6Di\n\tBTuHIP36dStqc+xV6DNT","X-Received":"by 2002:a05:600c:4e55:b0:490:b71f:2ed with SMTP id\n\t5b1f17b1804b1-4925989e231mr67684255e9.5.1782290136385; \n\tWed, 24 Jun 2026 01:35:36 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"laurent.pinchart@ideasonboard.com, david.plowman@raspberrypi.com,\n\tNaushir Patuck <naush@raspberrypi.com>","Subject":"[PATCH 2/2] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","Date":"Wed, 24 Jun 2026 09:24:32 +0100","Message-ID":"<20260624082705.272795-3-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260624082705.272795-1-naush@raspberrypi.com>","References":"<20260624082705.272795-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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":"Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\npacked samples and swap endian order in 16-bit samples both in software.\nThese SW routines only work on unpacked/uncompresssed samples.\n\nFor this reason, ensure the user cannot configure 14/16-bit RAW streams\nwith PiSP Bayer compression in platformValidate().\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n 1 file changed, 11 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\nindex b744c901f751..8e8da116ef6f 100644\n--- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n+++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n@@ -1223,6 +1223,17 @@ PiSPCameraData::platformValidate(RPi::RPiCameraConfiguration *rpiConfig) const\n \t\t\tstatus = CameraConfiguration::Adjusted;\n \t\t}\n \n+\t\tunsigned bpp = MediaBusFormatInfo::info(rpiConfig->sensorFormat_.code).bitsPerPixel;\n+\t\tif ((bpp == 16 || bpp == 14) &&\n+\t\t    bayer.packing != BayerFormat::Packing::None) {\n+\t\t\tLOG(RPI, Info)\n+\t\t\t\t<< \"The sensor is configured for a 16/14-bit output, \"\n+\t\t\t\t<< \"compression is not available for SW fixups needed.\";\n+\t\t\tbayer.packing = BayerFormat::Packing::None;\n+\t\t\trawStream->pixelFormat = bayer.toPixelFormat();\n+\t\t\tstatus = CameraConfiguration::Adjusted;\n+\t\t}\n+\n \t\trawStreams[0].format =\n \t\t\tRPi::PipelineHandlerBase::toV4L2DeviceFormat(cfe_[Cfe::Output0].dev(), rawStream);\n \n","prefixes":["2/2"]}