[{"id":39588,"web_url":"https://patchwork.libcamera.org/comment/39588/","msgid":"<178332863847.292172.10004235596211295135@neptunite.rasen.tech>","date":"2026-07-06T09:03:58","subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Naush,\n\nThanks for the patch.\n\nQuoting Naushir Patuck (2026-06-30 18:00:20)\n> Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\n> packed samples and swap endian order in 16-bit samples both in software.\n> These SW routines only work on unpacked/uncompresssed samples.\n> \n> For this reason, ensure the user cannot configure 14/16-bit RAW streams\n> with PiSP Bayer compression in platformValidate().\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nLooks good to me.\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n>  1 file changed, 11 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> index 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>                         status = CameraConfiguration::Adjusted;\n>                 }\n>  \n> +               unsigned bpp = MediaBusFormatInfo::info(rpiConfig->sensorFormat_.code).bitsPerPixel;\n> +               if ((bpp == 16 || bpp == 14) &&\n> +                   bayer.packing != BayerFormat::Packing::None) {\n> +                       LOG(RPI, Info)\n> +                               << \"The sensor is configured for a 16/14-bit output, \"\n> +                               << \"compression is not available for SW fixups needed.\";\n> +                       bayer.packing = BayerFormat::Packing::None;\n> +                       rawStream->pixelFormat = bayer.toPixelFormat();\n> +                       status = CameraConfiguration::Adjusted;\n> +               }\n> +\n>                 rawStreams[0].format =\n>                         RPi::PipelineHandlerBase::toV4L2DeviceFormat(cfe_[Cfe::Output0].dev(), rawStream);\n>  \n> -- \n> 2.53.0\n>","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 E021ABF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 09:04:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A32866003;\n\tMon,  6 Jul 2026 11:04:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9C77B65FF1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 11:04:04 +0200 (CEST)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:172d:69a4:1f4a:e2])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id E5625524;\n\tMon,  6 Jul 2026 11:03:15 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Zfz2F1r0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1783328596;\n\tbh=dW+7fF06q8qLsQq8nnTz3SLIBxHip7YfPGrMixnjEJQ=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Zfz2F1r0MUcxF3GCeuk4XkuJacwO2dgNVZz+xEpAb6ClBYfffdgyK13rZpYPOUZvb\n\tSUcbbHqhg47z9duJ0wKDOLZDzEi9ZCg566iI3KW9OsEAhCtCaLraQ4KyOGAQhjreUq\n\tubsvuR+d+htF/zPdOwAiWyzhCDZ1kSJtN/H2WydI=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260630090215.813311-2-naush@raspberrypi.com>","References":"<20260630090215.813311-1-naush@raspberrypi.com>\n\t<20260630090215.813311-2-naush@raspberrypi.com>","Subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 06 Jul 2026 18:03:58 +0900","Message-ID":"<178332863847.292172.10004235596211295135@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","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>"}},{"id":39590,"web_url":"https://patchwork.libcamera.org/comment/39590/","msgid":"<20260706110036.GA94158@killaraus.ideasonboard.com>","date":"2026-07-06T11:00:36","subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Jun 30, 2026 at 10:00:20AM +0100, Naushir Patuck wrote:\n> Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\n> packed samples and swap endian order in 16-bit samples both in software.\n> These SW routines only work on unpacked/uncompresssed samples.\n> \n> For this reason, ensure the user cannot configure 14/16-bit RAW streams\n> with PiSP Bayer compression in platformValidate().\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n>  1 file changed, 11 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> index 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\nI still can't parse the message:\n\n\"The sensor is configured for a 16/14-bit output, compression is not available for SW fixups needed.\"\n\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>","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 3D4BAC3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:00:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 46A4D66007;\n\tMon,  6 Jul 2026 13:00:39 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F3A5F658E0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:00:37 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 44D1E33D;\n\tMon,  6 Jul 2026 12:59:49 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lDnIYo1C\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1783335589;\n\tbh=qlZXP1qSXdRMOcMHhNv2AfQ89J4OG0aOqdQt8pzZSMo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lDnIYo1CibeVW8F9Swt0M4KvILFzdXlpV4Ryf7UesILSgCkdWJT1jk1x9PJARH+q7\n\tz7hTl/z3C8udLOSsZwvFZI1tCelMYdeHS6ljrGGPmW120xR3muWAdpBY9BQVGABFfD\n\tlVepMPsigcoHRGdNs49x42FO+a0gvO7+18r6OMYY=","Date":"Mon, 6 Jul 2026 14:00:36 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>","Subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","Message-ID":"<20260706110036.GA94158@killaraus.ideasonboard.com>","References":"<20260630090215.813311-1-naush@raspberrypi.com>\n\t<20260630090215.813311-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260630090215.813311-2-naush@raspberrypi.com>","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>"}},{"id":39591,"web_url":"https://patchwork.libcamera.org/comment/39591/","msgid":"<CAEmqJPrOV1cywRGcC6YNJA5K+T76Pskz1aEnXTdwFxmPs8_ryQ@mail.gmail.com>","date":"2026-07-06T11:06:11","subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Mon, 6 Jul 2026 at 12:00, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> On Tue, Jun 30, 2026 at 10:00:20AM +0100, Naushir Patuck wrote:\n> > Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\n> > packed samples and swap endian order in 16-bit samples both in software.\n> > These SW routines only work on unpacked/uncompresssed samples.\n> >\n> > For this reason, ensure the user cannot configure 14/16-bit RAW streams\n> > with PiSP Bayer compression in platformValidate().\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> > ---\n> >  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n> >  1 file changed, 11 insertions(+)\n> >\n> > diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> > index 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> >                       status = CameraConfiguration::Adjusted;\n> >               }\n> >\n> > +             unsigned bpp = MediaBusFormatInfo::info(rpiConfig->sensorFormat_.code).bitsPerPixel;\n> > +             if ((bpp == 16 || bpp == 14) &&\n> > +                 bayer.packing != BayerFormat::Packing::None) {\n> > +                     LOG(RPI, Info)\n> > +                             << \"The sensor is configured for a 16/14-bit output, \"\n> > +                             << \"compression is not available for SW fixups needed.\";\n>\n> I still can't parse the message:\n>\n> \"The sensor is configured for a 16/14-bit output, compression is not available for SW fixups needed.\"\n\nHow about:\n\nLOG(RPI, Info)\n        << \"The sensor is configured for \"\n        << bpp\n        << \"-bit pixel readout. PISP compression will be unavilable\nbecause of the\"\n        << \" software fixups necessary in this format.\"\n\n\n>\n> > +                     bayer.packing = BayerFormat::Packing::None;\n> > +                     rawStream->pixelFormat = bayer.toPixelFormat();\n> > +                     status = CameraConfiguration::Adjusted;\n> > +             }\n> > +\n> >               rawStreams[0].format =\n> >                       RPi::PipelineHandlerBase::toV4L2DeviceFormat(cfe_[Cfe::Output0].dev(), rawStream);\n> >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 98881C3308\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:06:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AB33C6601D;\n\tMon,  6 Jul 2026 13:06:50 +0200 (CEST)","from mail-vk1-xa34.google.com (mail-vk1-xa34.google.com\n\t[IPv6:2607:f8b0:4864:20::a34])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1CCA65EFF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:06:48 +0200 (CEST)","by mail-vk1-xa34.google.com with SMTP id\n\t71dfb90a1353d-5bdb8034270so65323e0c.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 Jul 2026 04:06:48 -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=\"DzDIjHIZ\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1783336007; cv=none;\n\td=google.com; s=arc-20260327;\n\tb=KDjxEsGrbWwbQbEPB1jkGXbHBRrQ+j9YtJ+hb57t+dfAHbD5KCAISw/7adTIUqqwXp\n\tGTFDxIGt0YdyF3QiXUiKDg6NBittMzAz1RBGF8DAnMQNKM9Wig8ZF9GsG44MgEe18Yln\n\th86mP7zTE5kld9neGlrMyHP6bu/GfvItSXNrcq4fC/pwq8UGJVHGDBGhylT+onXnoIKK\n\t4dMIalo1QajDqkiKyddliNofYjK+GZvQqzmpoRy0hoMp13dFMiEs1TF+x4pFs+IyBBqp\n\tY0b7ZFAI162/jzaB/54DiZxSXYFuku7FQYj+8n06Up7HGPiZGU86AC2UI6vuicLNPGjF\n\t1h/w==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20260327; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:dkim-signature;\n\tbh=PfenJdlh0MSReQTBMaJihUWa0tcGjrjiChs3GfmoZ14=;\n\tfh=eLep5S4i4Xhp1tHw8eIVrVQrFVzeUf5ZscK5FIQG40U=;\n\tb=aluRU49wARo7X+ceOSgjZ94hCeUlDTCqvvhDE2zhN65v+4kynNjyrkaPkDUtzgkR8a\n\tjDcrTkp1FfC7GFSNevLx1/MOfELMjKJZY896AdcfY8H83eSDN9qOMysvURIL4cEJgKJC\n\tcWLdwzN4ZFuYnSMO2Yy5ioexxb4Hn4INkqyEeX8UAU7SsKPFxRW3q9Chmg5jbDRc230n\n\tc3OGnYe/SIAjzZEZz64GFwzaKda3UbhklXjjJWSxsIXcJq9Ar2Pafg23FAyJ7EGHQhAF\n\t9IdmSvGqlpPi6PiMfLW5qI+Z3VuyNVO47xSKcO71zd1ThBC4321/+yeT1neAVUxcaqq6\n\t9omw==; darn=lists.libcamera.org","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1783336007; x=1783940807;\n\tdarn=lists.libcamera.org; \n\th=content-type:cc:to:subject:message-id:date:from:in-reply-to\n\t:references:mime-version:from:to:cc:subject:date:message-id:reply-to\n\t:content-type; bh=PfenJdlh0MSReQTBMaJihUWa0tcGjrjiChs3GfmoZ14=;\n\tb=DzDIjHIZ6POowvL06bsFmZkPF4DScVe4dF/RwLTU3x1O+XqgaSB2iBhcBHPWBcXUmf\n\t2UBzwparWoydRNdDOAZ4yu1UYCirp9oLEFv9/RDqwDCQVZrg1ul0KKrOUoZ3S5Nanw/x\n\t1sX6877/wd7/crLkh5AGWDanSL5zSffI6O+9dry40k4blHTpAf2LePnyGHTAObllh2Ok\n\tpwLG1KXnjdwqkzQvcZkxrXzKsxDnwhjQBfi0mK7h19cdcgM6Q5ZCfUYuTFGL+SrX+xjM\n\t87stqJmdkFyUR+h+6hknHPvQlyyqOzOq44BF3048WdtxrQjEhEwq949tgDnaE9DRmime\n\tG+iA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1783336007; x=1783940807;\n\th=content-type:cc:to:subject:message-id:date:from:in-reply-to\n\t:references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to:content-type;\n\tbh=PfenJdlh0MSReQTBMaJihUWa0tcGjrjiChs3GfmoZ14=;\n\tb=GwunQPFYYU0FcnKU1UxPa6uwDgDWGfGB4vBbPCpF1nlmghq2cH6nghkBmrLfxNO5Ms\n\tb2EnYJQRIWkMSCLM4z1v0Fs0E4STp1yFbBU4IPZ/TaJ+DsDvfER00P6k8qBZ0UaTBRWj\n\ttWnsIVPj1dxQ7aX4qgET6O1AQjvHERGxzr8Dp/1wsPgjqWnr/b7bFFeESKqIG+e79+7U\n\txLYYMc2WrfCBmhbU0Tqf+T5Tjzsps0rJUg67YJ0yJ8oim5bpdH2QCLYTbkPf0SICQ2Aa\n\t1Ps4lEkBVZnQ4DYZVe9RU0a3t7x4caW/nYElVxYG1zI9aZZHNVvvps0Nmr1rT9ils1ZH\n\t8sEA==","X-Gm-Message-State":"AOJu0Yzc9SGSbjzNsKu3umhsAEJta2ArTwJHJTUQsVDskkj1NPvq2Odk\n\tT0C+gXxHcgiKpGRoqVodTavWDATPHCOEASwSjpJOUwpgUmY5JqhyrO/ArmSgWLDM3BXYX0bK/gx\n\tZhMsiY3IoianuAu03lqz3DkVXdtpf4dSwQ624xjFcZw==","X-Gm-Gg":"AfdE7clRREFmupfcCLLSdFaM6WqGP3z6LmKB8f8xUmALhUrLnvWJzemMU/UfxkNeFgt\n\tKZRnLQozG38ov+vLEue4wEznJbwVLJkOc0xS0jzqmCm7RVso6EsNDSiiNWHr8+L4PGNatIa39aD\n\tY2aZTp1skPYn37mvRjVnmRM/py80tFujzEpqWF3H97lSsaj1QqI2nAcEfYrT5kB3nzu0QejaeGG\n\tTmnMcsYOU8cQMOHlh0qEcqm+/fzz875Xx93i0asnYfFdtz/4O0XJzyj9+UGLnEqaS+xU9DPOLmn\n\tm1mnPo09kBToiic/1UEyO4upjzhVSuFKuIuhEhybKf9fNia3gU1JnhZwyv3FWmW6PDNJgKOu3io\n\tbO3K+tQo3s/Hjbla+XsBlBH5rpgO2+Yn+nbJjknx0EOAEh7W9L3JyzgPIxoqsaMY144J/ZE9gKk\n\tQsdGVdpJid3/I=","X-Received":"by 2002:a05:6122:e46a:b0:5bd:4143:6a8a with SMTP id\n\t71dfb90a1353d-5be0fb26f1cmr1267638e0c.1.1783336007597;\n\tMon, 06 Jul 2026 04:06:47 -0700 (PDT)","MIME-Version":"1.0","References":"<20260630090215.813311-1-naush@raspberrypi.com>\n\t<20260630090215.813311-2-naush@raspberrypi.com>\n\t<20260706110036.GA94158@killaraus.ideasonboard.com>","In-Reply-To":"<20260706110036.GA94158@killaraus.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 6 Jul 2026 12:06:11 +0100","X-Gm-Features":"AVVi8Ccdo_FH4lw4n5Lht8aBqy8_vuzwI-auT826pQGt30Nzz-y9mgasoZnrEw0","Message-ID":"<CAEmqJPrOV1cywRGcC6YNJA5K+T76Pskz1aEnXTdwFxmPs8_ryQ@mail.gmail.com>","Subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","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>"}},{"id":39596,"web_url":"https://patchwork.libcamera.org/comment/39596/","msgid":"<20260706115915.GB94158@killaraus.ideasonboard.com>","date":"2026-07-06T11:59:15","subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Jul 06, 2026 at 12:06:11PM +0100, Naushir Patuck wrote:\n> On Mon, 6 Jul 2026 at 12:00, Laurent Pinchart\n> <laurent.pinchart@ideasonboard.com> wrote:\n> >\n> > On Tue, Jun 30, 2026 at 10:00:20AM +0100, Naushir Patuck wrote:\n> > > Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\n> > > packed samples and swap endian order in 16-bit samples both in software.\n> > > These SW routines only work on unpacked/uncompresssed samples.\n> > >\n> > > For this reason, ensure the user cannot configure 14/16-bit RAW streams\n> > > with PiSP Bayer compression in platformValidate().\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n> > >  1 file changed, 11 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> > > index 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> > >                       status = CameraConfiguration::Adjusted;\n> > >               }\n> > >\n> > > +             unsigned bpp = MediaBusFormatInfo::info(rpiConfig->sensorFormat_.code).bitsPerPixel;\n> > > +             if ((bpp == 16 || bpp == 14) &&\n> > > +                 bayer.packing != BayerFormat::Packing::None) {\n> > > +                     LOG(RPI, Info)\n> > > +                             << \"The sensor is configured for a 16/14-bit output, \"\n> > > +                             << \"compression is not available for SW fixups needed.\";\n> >\n> > I still can't parse the message:\n> >\n> > \"The sensor is configured for a 16/14-bit output, compression is not available for SW fixups needed.\"\n> \n> How about:\n> \n> LOG(RPI, Info)\n>         << \"The sensor is configured for \"\n>         << bpp\n>         << \"-bit pixel readout. PISP compression will be unavilable because of the\"\n>         << \" software fixups necessary in this format.\"\n\ns/unavilable/unvailable/\n\nI can understand that :-)\n\nI'd write \"Disabling PISP compression\" instead of \"PISP compression will\nbe unavailable\", to be clear.\n\n\t\t\tLOG(RPI, Info)\n \t\t\t\t<< \"The sensor is configured for \" << bpp\n\t\t\t\t<< \"-bit pixel readout. Disabling PISP compression because of the\"\n\t\t\t\t<< \" software fixups necessary in this format.\"\n\nWe could also shorten it:\n\n\t\t\tLOG(RPI, Info)\n\t\t\t        << \"Sensor configured in RAW\" << bpp\n\t\t\t        << \", disabling PISP compression incompatible with required software fixups.\"\n\nor\n\n\t\t\tLOG(RPI, Info)\n\t\t\t        << \"PISP compression incompatible with software fixups required for RAW\"\n\t\t\t\t<< bpp << \", disabling\"\n\nWith one of those messages,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > > +                     bayer.packing = BayerFormat::Packing::None;\n> > > +                     rawStream->pixelFormat = bayer.toPixelFormat();\n> > > +                     status = CameraConfiguration::Adjusted;\n> > > +             }\n> > > +\n> > >               rawStreams[0].format =\n> > >                       RPi::PipelineHandlerBase::toV4L2DeviceFormat(cfe_[Cfe::Output0].dev(), rawStream);\n> > >","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 DF977C3308\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:59:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3142F66031;\n\tMon,  6 Jul 2026 13:59:18 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00B0166022\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:59:16 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 88EEF524;\n\tMon,  6 Jul 2026 13:58:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dExVkBSX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1783339108;\n\tbh=Pi6dTHokTlLxuCbpBUz1ck23It7U7f5M9mByOtKP4Cw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dExVkBSXOveJb31LRgnk0fGRLiB+iH7EHe8Heb2EDGZAZGPreNNpI3zJmG/k3Kj5p\n\tK2uNKa9qhViNPAgugZ14idG/o1lftvz3CrBA64Y9yT4wsDuEXT6mMdV1cGTgXOJhQv\n\tJMQCf4HOSOQdoDtXX58JGCprb85gtvMT7u0lRaik=","Date":"Mon, 6 Jul 2026 14:59:15 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>","Subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","Message-ID":"<20260706115915.GB94158@killaraus.ideasonboard.com>","References":"<20260630090215.813311-1-naush@raspberrypi.com>\n\t<20260630090215.813311-2-naush@raspberrypi.com>\n\t<20260706110036.GA94158@killaraus.ideasonboard.com>\n\t<CAEmqJPrOV1cywRGcC6YNJA5K+T76Pskz1aEnXTdwFxmPs8_ryQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrOV1cywRGcC6YNJA5K+T76Pskz1aEnXTdwFxmPs8_ryQ@mail.gmail.com>","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>"}},{"id":39598,"web_url":"https://patchwork.libcamera.org/comment/39598/","msgid":"<CAEmqJPrSN2qoFCMiVWRs5Xr9NJSRuD9zkuQYveZ2o1KYr38fVQ@mail.gmail.com>","date":"2026-07-06T13:51:58","subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Mon, 6 Jul 2026 at 12:59, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> On Mon, Jul 06, 2026 at 12:06:11PM +0100, Naushir Patuck wrote:\n> > On Mon, 6 Jul 2026 at 12:00, Laurent Pinchart\n> > <laurent.pinchart@ideasonboard.com> wrote:\n> > >\n> > > On Tue, Jun 30, 2026 at 10:00:20AM +0100, Naushir Patuck wrote:\n> > > > Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\n> > > > packed samples and swap endian order in 16-bit samples both in\n> software.\n> > > > These SW routines only work on unpacked/uncompresssed samples.\n> > > >\n> > > > For this reason, ensure the user cannot configure 14/16-bit RAW\n> streams\n> > > > with PiSP Bayer compression in platformValidate().\n> > > >\n> > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> > > > ---\n> > > >  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n> > > >  1 file changed, 11 insertions(+)\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> > > > index 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 @@\n> PiSPCameraData::platformValidate(RPi::RPiCameraConfiguration *rpiConfig)\n> const\n> > > >                       status = CameraConfiguration::Adjusted;\n> > > >               }\n> > > >\n> > > > +             unsigned bpp =\n> MediaBusFormatInfo::info(rpiConfig->sensorFormat_.code).bitsPerPixel;\n> > > > +             if ((bpp == 16 || bpp == 14) &&\n> > > > +                 bayer.packing != BayerFormat::Packing::None) {\n> > > > +                     LOG(RPI, Info)\n> > > > +                             << \"The sensor is configured for a\n> 16/14-bit output, \"\n> > > > +                             << \"compression is not available for\n> SW fixups needed.\";\n> > >\n> > > I still can't parse the message:\n> > >\n> > > \"The sensor is configured for a 16/14-bit output, compression is not\n> available for SW fixups needed.\"\n> >\n> > How about:\n> >\n> > LOG(RPI, Info)\n> >         << \"The sensor is configured for \"\n> >         << bpp\n> >         << \"-bit pixel readout. PISP compression will be unavilable\n> because of the\"\n> >         << \" software fixups necessary in this format.\"\n>\n> s/unavilable/unvailable/\n>\n> I can understand that :-)\n>\n> I'd write \"Disabling PISP compression\" instead of \"PISP compression will\n> be unavailable\", to be clear.\n>\n>                         LOG(RPI, Info)\n>                                 << \"The sensor is configured for \" << bpp\n>                                 << \"-bit pixel readout. Disabling PISP\n> compression because of the\"\n>                                 << \" software fixups necessary in this\n> format.\"\n>\n> We could also shorten it:\n>\n>                         LOG(RPI, Info)\n>                                 << \"Sensor configured in RAW\" << bpp\n>                                 << \", disabling PISP compression\n> incompatible with required software fixups.\"\n>\n> or\n>\n>                         LOG(RPI, Info)\n>                                 << \"PISP compression incompatible with\n> software fixups required for RAW\"\n>                                 << bpp << \", disabling\"\n>\n>\nI'm good with either.  Would you be able to make the change before merging,\nor should I post a follow-on patch?\n\nNaush\n\n\n\n\n> With one of those messages,\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> > > > +                     bayer.packing = BayerFormat::Packing::None;\n> > > > +                     rawStream->pixelFormat = bayer.toPixelFormat();\n> > > > +                     status = CameraConfiguration::Adjusted;\n> > > > +             }\n> > > > +\n> > > >               rawStreams[0].format =\n> > > >\n>  RPi::PipelineHandlerBase::toV4L2DeviceFormat(cfe_[Cfe::Output0].dev(),\n> rawStream);\n> > > >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 BF0F6C3308\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 13:52:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E067266022;\n\tMon,  6 Jul 2026 15:52:36 +0200 (CEST)","from mail-vs1-xe2d.google.com (mail-vs1-xe2d.google.com\n\t[IPv6:2607:f8b0:4864:20::e2d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A4B896601C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 15:52:35 +0200 (CEST)","by mail-vs1-xe2d.google.com with SMTP id\n\tada2fe7eead31-73d809c9b63so88347137.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 Jul 2026 06:52: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=\"IYh1yhbU\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1783345954; cv=none;\n\td=google.com; s=arc-20260327;\n\tb=L80NJI/JvWPRinpxCdcYb9+PY3HuYTUC0Y4/Jdt1IJdHC6e0U9ZiERQTj5mp1qTad/\n\tH0+d5TYjVI1H8zeZANxoOJdX8GFHiHNO724/Rvyv480OAt9H/vHXzwSHlsg9zzLW53/R\n\t6Pe9QKRhcBuMyXip5yXt8DLNSzeDOoUm+9Kr5VSzWs+qrESCKe3ob53+kDqTgTawn0DT\n\tg5+XThXk7nUdJTRC4SxEv9L2tt98xTwwQkCYDQGUgOixq0LQmEdviDr1SjewB6SoMrMZ\n\tPR9ymTeIBX0IJ+mtiAYxLEQKvNy7Qu/uVf5ze8CCJ7l/mU9bGWil9aGLwuKRXDWGf63k\n\t9Apw==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20260327; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:dkim-signature;\n\tbh=F5jFrquXAEv4bu6qOFFuh3QnSJg15RtHZQ0Lj2B/1Rg=;\n\tfh=eLep5S4i4Xhp1tHw8eIVrVQrFVzeUf5ZscK5FIQG40U=;\n\tb=iO/QijnmAahWB2VVCmgQFu4xIkQmIqUEyECxgvU8ps+AxTafyZHnxB6tRVentnfOf1\n\tPC3uQAqd54MyYiCqJZVNb6p03ak/9YdzlU3c/ZdW4YolMV4Tx7Ai7+yEh565V4RFPG/X\n\tFN0cQevJgo98lUtvr3fQl48gxziFCNib1PufjmJq/dSGzh1eFWuuNawbp7rS9D2IJ3eH\n\tFbdmIRA5iAJZ5YISwGnX6lzUKZ1DIn+ZKqzIrq790Rfha2xANHwhiOSXhSZCVtx5uLJ5\n\t9MkDOPlSluAgv8ULN3APZZfxJIXtkOmJNuT3Oysey5C1OZGrljAJU6kUnkNSWahg7E1+\n\tqzqA==; darn=lists.libcamera.org","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1783345954; x=1783950754;\n\tdarn=lists.libcamera.org; \n\th=content-type:cc:to:subject:message-id:date:from:in-reply-to\n\t:references:mime-version:from:to:cc:subject:date:message-id:reply-to\n\t:content-type; bh=F5jFrquXAEv4bu6qOFFuh3QnSJg15RtHZQ0Lj2B/1Rg=;\n\tb=IYh1yhbUWHrmcCrrNikDzQ31xS5Oca0/LmxNUAnEK6oivLIk1kvvgevUz762kw6W6Q\n\tO33Z30J5J2B8tPE+w6zhuO3GEOLHsfx8BOH15f5ClWeR1KJnvS1A9HPwO8hRrnhhRg5P\n\t6GVbq2xb42VRueg3sgQCr2tVdbjTSgKc3hGiqYC9eUitGr21JAJ4baU490cf4KjmFVul\n\tRUWEi2iGAfjQlWyTQtq4YB7AnJkfsCXM3x+M17wriv1Pz+oZCQq0QX7/5EGZQsuigUvu\n\t0Xu78qbdGtFQIQctnwy8H+HdNOE7V/B2uj3LyxxysTLfyygbS3rO/SoQIpnwH6YdThUY\n\t2FJg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1783345954; x=1783950754;\n\th=content-type:cc:to:subject:message-id:date:from:in-reply-to\n\t:references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to:content-type;\n\tbh=F5jFrquXAEv4bu6qOFFuh3QnSJg15RtHZQ0Lj2B/1Rg=;\n\tb=NCfYPLa8QNKkLjmvpqu1j9m4HeBW3rPHF3/5/2HBB12mSGm4REpaSLAjqNPsMh0r/M\n\tRHqEbRk8fIoaeEnqjUCDEjPMmYMaVspzJQ2slsCNoKrQtTRKPIuU8ansHfbxnbjzv0Ot\n\tyOQjC0ApcPHXlBg/36rJ38kRLz6AhfbCI0xH8stS+L1bBT/eN5LYwN4d8dpMjwODuFJb\n\tepxV/U49TDS0q+BvFfnZNTqUwX2MfWmlCDyQyphtmaz2DrQV+G336JY9xj5SF5nPGwT9\n\tj7H5ksoct9goWNH0CcI+GD1+2kbRTnhBbzw6ZJ/VAYgsAy6fmLxdaoMeofkCATQf4XsG\n\tt4JQ==","X-Gm-Message-State":"AOJu0YwKqstTgMqwdzyD5EomoKt3WgVp4QtAAtn5pA+qVZlWCmYcv59v\n\tziS6ONmDN08B+h8EmvZlY0znya8CjteejIOu7GeGJmuHmYDaoABt/SrujzWdP7oCamuIbzCzJWp\n\tyax41V91ahYVXAOI+0xb9XTr6UeWmIMTw7VZ5vEITIQ==","X-Gm-Gg":"AfdE7cnEzxOVt1YmPzajWxocqn/Ftr+QBr+pEMUovtQ66yrEqByEuGmknG2tFtSV3W7\n\t0QsE9xSHELhLMDubzZa2tcIMBVROSkH0jyVCeftCBgRG21Tt7EQPs/nDMAHXMa/Ww2MAkj2ljxQ\n\tbFWtU6u52OPex+Rbxo7pesC1FxxN8ZiZCqb5GOLt2VSLfEpRMSIbfJINh/AllxBv/YCoTZqJGwh\n\ty19otcFCpZk0jU3HzOY9zlj7kBPluiVX8HCsZrUQasyT6NVtfobcp9S4zyZ2E6P7QXNFUeGL8ad\n\tCU9UDxapADks/WwdOgzvoKMajBTUkEtfZmzXhnMyoOlfNhYqspk/0fOO1rGKOsz8I1WHY+SO0g1\n\tJlnAIAT+Rk9nDVEt9Ogsl288VPezwD/V/Cd90lVdun6orYY0oxAAtrf1xRfDPYT7eeng3o3o9k8\n\tHNoNxM34y1xNsv","X-Received":"by 2002:a05:6102:a48:b0:6d1:8f7:18a5 with SMTP id\n\tada2fe7eead31-741f6804e38mr1369745137.1.1783345954361;\n\tMon, 06 Jul 2026 06:52:34 -0700 (PDT)","MIME-Version":"1.0","References":"<20260630090215.813311-1-naush@raspberrypi.com>\n\t<20260630090215.813311-2-naush@raspberrypi.com>\n\t<20260706110036.GA94158@killaraus.ideasonboard.com>\n\t<CAEmqJPrOV1cywRGcC6YNJA5K+T76Pskz1aEnXTdwFxmPs8_ryQ@mail.gmail.com>\n\t<20260706115915.GB94158@killaraus.ideasonboard.com>","In-Reply-To":"<20260706115915.GB94158@killaraus.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 6 Jul 2026 14:51:58 +0100","X-Gm-Features":"AVVi8CcAVspAAxvL4oMlxO7S1Urz5fpek3R0X788ZDmZaD7Ho-gq_DAm6prPdFM","Message-ID":"<CAEmqJPrSN2qoFCMiVWRs5Xr9NJSRuD9zkuQYveZ2o1KYr38fVQ@mail.gmail.com>","Subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Content-Type":"multipart/alternative; boundary=\"0000000000001f38d80655f19622\"","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>"}},{"id":39643,"web_url":"https://patchwork.libcamera.org/comment/39643/","msgid":"<20260708215202.GA415610@killaraus.ideasonboard.com>","date":"2026-07-08T21:52:02","subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Jul 06, 2026 at 02:51:58PM +0100, Naushir Patuck wrote:\n> On Mon, 6 Jul 2026 at 12:59, Laurent Pinchart wrote:\n> > On Mon, Jul 06, 2026 at 12:06:11PM +0100, Naushir Patuck wrote:\n> > > On Mon, 6 Jul 2026 at 12:00, Laurent Pinchart wrote:\n> > > > On Tue, Jun 30, 2026 at 10:00:20AM +0100, Naushir Patuck wrote:\n> > > > > Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\n> > > > > packed samples and swap endian order in 16-bit samples both in software.\n> > > > > These SW routines only work on unpacked/uncompresssed samples.\n> > > > >\n> > > > > For this reason, ensure the user cannot configure 14/16-bit RAW streams\n> > > > > with PiSP Bayer compression in platformValidate().\n> > > > >\n> > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> > > > > ---\n> > > > >  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n> > > > >  1 file changed, 11 insertions(+)\n> > > > >\n> > > > > diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> > > > > index 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> > > > >                       status = CameraConfiguration::Adjusted;\n> > > > >               }\n> > > > >\n> > > > > +             unsigned bpp = MediaBusFormatInfo::info(rpiConfig->sensorFormat_.code).bitsPerPixel;\n> > > > > +             if ((bpp == 16 || bpp == 14) &&\n> > > > > +                 bayer.packing != BayerFormat::Packing::None) {\n> > > > > +                     LOG(RPI, Info)\n> > > > > +                             << \"The sensor is configured for a 16/14-bit output, \"\n> > > > > +                             << \"compression is not available for SW fixups needed.\";\n> > > >\n> > > > I still can't parse the message:\n> > > >\n> > > > \"The sensor is configured for a 16/14-bit output, compression is not available for SW fixups needed.\"\n> > >\n> > > How about:\n> > >\n> > > LOG(RPI, Info)\n> > >         << \"The sensor is configured for \"\n> > >         << bpp\n> > >         << \"-bit pixel readout. PISP compression will be unavilable because of the\"\n> > >         << \" software fixups necessary in this format.\"\n> >\n> > s/unavilable/unvailable/\n> >\n> > I can understand that :-)\n> >\n> > I'd write \"Disabling PISP compression\" instead of \"PISP compression will\n> > be unavailable\", to be clear.\n> >\n> >                         LOG(RPI, Info)\n> >                                 << \"The sensor is configured for \" << bpp\n> >                                 << \"-bit pixel readout. Disabling PISP compression because of the\"\n> >                                 << \" software fixups necessary in this format.\"\n> >\n> > We could also shorten it:\n> >\n> >                         LOG(RPI, Info)\n> >                                 << \"Sensor configured in RAW\" << bpp\n> >                                 << \", disabling PISP compression incompatible with required software fixups.\"\n> >\n> > or\n> >\n> >                         LOG(RPI, Info)\n> >                                 << \"PISP compression incompatible with software fixups required for RAW\"\n> >                                 << bpp << \", disabling\"\n> >\n> >\n> \n> I'm good with either.  Would you be able to make the change before merging,\n> or should I post a follow-on patch?\n\nKieran handled it. Thank you Kieran.\n\n> > With one of those messages,\n> >\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >\n> > > > > +                     bayer.packing = BayerFormat::Packing::None;\n> > > > > +                     rawStream->pixelFormat = bayer.toPixelFormat();\n> > > > > +                     status = CameraConfiguration::Adjusted;\n> > > > > +             }\n> > > > > +\n> > > > >               rawStreams[0].format = RPi::PipelineHandlerBase::toV4L2DeviceFormat(cfe_[Cfe::Output0].dev(), rawStream);","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 0227AC3318\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Jul 2026 21:52:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 36B9C660AE;\n\tWed,  8 Jul 2026 23:52:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 772C161451\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jul 2026 23:52:04 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 46C2E1E4;\n\tWed,  8 Jul 2026 23:51:14 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"PxcmvhQJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1783547474;\n\tbh=o3OrcQm7JxqVL9O8o+IbPrcHUMte2/X3VngaiyRKSrQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PxcmvhQJpmiiM4Nr7UqTMZTT1Y6ujn6HGwo4MurRb1NGkSEhXRMpf2TeltyP9fbjS\n\trCJlDhV9hSbqRxgGpb/vLT6tTs0203EM/c0TLhlqFmR8R9kZkXaUHuzl6SD9Odiet8\n\t7q5/0m8WzCGLeGqjQXa0EZBsWp/UgtfjOarXVTe4=","Date":"Thu, 9 Jul 2026 00:52:02 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>","Subject":"Re: [PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed","Message-ID":"<20260708215202.GA415610@killaraus.ideasonboard.com>","References":"<20260630090215.813311-1-naush@raspberrypi.com>\n\t<20260630090215.813311-2-naush@raspberrypi.com>\n\t<20260706110036.GA94158@killaraus.ideasonboard.com>\n\t<CAEmqJPrOV1cywRGcC6YNJA5K+T76Pskz1aEnXTdwFxmPs8_ryQ@mail.gmail.com>\n\t<20260706115915.GB94158@killaraus.ideasonboard.com>\n\t<CAEmqJPrSN2qoFCMiVWRs5Xr9NJSRuD9zkuQYveZ2o1KYr38fVQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrSN2qoFCMiVWRs5Xr9NJSRuD9zkuQYveZ2o1KYr38fVQ@mail.gmail.com>","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>"}}]