Message ID | 20251003-ipa-match-by-name-v1-0-07b796729412@ideasonboard.com |
---|---|
Headers | show |
Series |
|
Related | show |
Hi Jacopo, I'm happy to see movement here, thanks for your work. On 2025-10-03 11:27:28 +0200, Jacopo Mondi wrote: > It is getting more and more common for different pipeline handlers to > use the same IPA modules whose name differs from the pipeline's one. > > The first case has been the softISP, and now the in-review Renesas R-Car > V4H pipeline handler will re-use the RkISP1 IPA. > > Starting from Hans' patch https://patchwork.libcamera.org/patch/23359/ > "libcamera: ipa_manager: createIPA: Allow matching by IPA name instead > of by pipeline" I here took a slightly different approach and addressed > the review comments on Hans' v1 by creating an overload for > IPAManager::createIPA() that allows pipelines to specify the IPA module > name. If they don't provide a name, the pipeline handler's name is used. > > As the next step, to further decouple IPAs from pipelines, remove the > pipelineName field from IPAModuleInfo that in all cases is identical to > the IPA name itself. > > Not tested on neither softISP or R-Car but I used the "by name" and "by > pipe" overloads on Mali and it worked. I tested this with the out-of-tree R-Car pipeline handler which makes use of the rkisp1 IPA using the original patch from Hans you reference above. It does not seem to work. Maybe I updated the pipeline handler wrong? As far as I can tell I shall only drop the name from createIPA() ? --- a/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp +++ b/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp @@ -694,7 +694,7 @@ int PipelineHandlerRCar4::createCamera(MediaDevice *mdev, /* * Load RkISP1 IPA for use with RCar4 */ - data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, 1, 1, "rkisp1"); + data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, 1, 1); if (!data->ipa_) { LOG(RCar4, Error) << "No IPA module found"; return -ENOENT; However with this change and the above patches I get no match, arm64 ~ # ./ktool/build/src/apps/cam/cam --list [1:21:46.492265975] [5498] INFO IPAManager ipa_manager.cpp:147 libcamera is not installed. Adding '/root/ktool/build/src/ipa' to the IPA search path [1:21:46.523544956] [5498] DEBUG IPAModule ipa_module.cpp:330 ipa_rkisp1.so: IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so is signed [1:21:46.524149881] [5498] DEBUG IPAManager ipa_manager.cpp:239 Loaded IPA module '/root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so' [1:21:46.524671766] [5498] INFO Camera camera_manager.cpp:340 libcamera v0.5.2 [1:21:46.525395972] [5505] DEBUG Camera camera_manager.cpp:74 Starting camera manager [1:21:46.561468814] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rcar_vin" created from /dev/media0 [1:21:46.563094648] [5505] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 28 missing dependencies [1:21:46.579583806] [5505] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found [1:21:46.579690487] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rcar_vin [1:21:46.580957577] [5505] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rcar-gen4' [1:21:46.581355620] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:318 Successful match for media device "rcar_vin" [1:21:46.584349766] [5505] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx219 1-0010: unsupported number of sinks (0) or sources (1) [1:21:46.585095032] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Exposure (0x00980911) [1:21:46.585882178] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Flip (0x00980914) [1:21:46.586161601] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Flip (0x00980915) [1:21:46.586282022] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Orientation (0x009a0922) [1:21:46.586528444] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Sensor Rotation (0x009a0923) [1:21:46.586635605] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Blanking (0x009e0901) [1:21:46.586716905] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Blanking (0x009e0902) [1:21:46.586782966] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Analogue Gain (0x009e0903) [1:21:46.586838826] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Red Pixel Value (0x009e0904) [1:21:46.586893187] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Red) Pixel Value (0x009e0905) [1:21:46.586943767] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Blue Pixel Value (0x009e0906) [1:21:46.586987388] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Blue) Pixel Value (0x009e0907) [1:21:46.587035448] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Link Frequency (0x009f0901) [1:21:46.587109909] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Pixel Rate (0x009f0902) [1:21:46.587187189] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Test Pattern (0x009f0903) [1:21:46.587272150] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Digital Gain (0x009f0905) [1:21:46.593514602] [5505] DEBUG CameraSensor camera_sensor_legacy.cpp:1027 'imx219 1-0010': Apply test pattern mode 0 [1:21:46.593797925] [5505] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx219 1-0010' matched by CameraSensorLegacy [1:21:46.594648132] [5505] DEBUG V4L2 v4l2_device.cpp:721 /dev/video8[14:cap]: Control: Alpha Component (0x00980929) [1:21:46.594980415] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video8[14:cap]: Opened device platform:e6ef0000.video: rcar_vin: R_Car_VIN [1:21:46.595954523] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[15:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp input1 [1:21:46.596398166] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[16:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp params [1:21:46.596611048] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[17:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp stats [1:21:46.596753249] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video3[18:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp output1 [1:21:46.597138393] [5505] ERROR RCar4 rcar-gen4.cpp:699 No IPA module found [1:21:46.598476584] [5505] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx462 2-001a: unsupported number of sinks (0) or sources (1) [1:21:46.598764886] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Exposure (0x00980911) [1:21:46.598989828] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Flip (0x00980914) [1:21:46.599094049] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Flip (0x00980915) [1:21:46.599162210] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Orientation (0x009a0922) [1:21:46.599259350] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Sensor Rotation (0x009a0923) [1:21:46.599317311] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Blanking (0x009e0901) [1:21:46.599371671] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Blanking (0x009e0902) [1:21:46.599417932] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Analogue Gain (0x009e0903) [1:21:46.599464852] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Link Frequency (0x009f0901) [1:21:46.599531273] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Pixel Rate (0x009f0902) [1:21:46.599577773] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Test Pattern (0x009f0903) [1:21:46.601948993] [5505] DEBUG CameraSensor camera_sensor_legacy.cpp:525 'imx462 2-001a': No static test pattern map for 'imx462' [1:21:46.602197815] [5505] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx462 2-001a' matched by CameraSensorLegacy [1:21:46.602731699] [5505] DEBUG V4L2 v4l2_device.cpp:721 /dev/video16[14:cap]: Control: Alpha Component (0x00980929) [1:21:46.603033862] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video16[14:cap]: Opened device platform:e6ef8000.video: rcar_vin: R_Car_VIN [1:21:46.603609447] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video4[15:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp input1 [1:21:46.603884549] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video5[16:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp params [1:21:46.604083931] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video6[17:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp stats [1:21:46.604240052] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video7[18:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp output1 [1:21:46.604418254] [5505] ERROR RCar4 rcar-gen4.cpp:699 No IPA module found [1:21:46.605292401] [5505] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rkisp1' Available cameras: With the old patch and without the one line diff above, arm64 ~ # ./ktool/build/src/apps/cam/cam --list [1:11:01.410543781] [5488] INFO IPAManager ipa_manager.cpp:147 libcamera is not installed. Adding '/root/ktool/build/src/ipa' to the IPA search path [1:11:01.441549195] [5488] DEBUG IPAModule ipa_module.cpp:333 ipa_rkisp1.so: IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so is signed [1:11:01.442073601] [5488] DEBUG IPAManager ipa_manager.cpp:239 Loaded IPA module '/root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so' [1:11:01.442575027] [5488] INFO Camera camera_manager.cpp:340 libcamera v0.5.2 [1:11:01.443238575] [5489] DEBUG Camera camera_manager.cpp:74 Starting camera manager [1:11:01.480244057] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rcar_vin" created from /dev/media0 [1:11:01.481929536] [5489] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 28 missing dependencies [1:11:01.498531846] [5489] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found [1:11:01.498661927] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rcar_vin [1:11:01.499823240] [5489] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rcar-gen4' [1:11:01.500258005] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:318 Successful match for media device "rcar_vin" [1:11:01.503564223] [5489] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx219 1-0010: unsupported number of sinks (0) or sources (1) [1:11:01.504309132] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Exposure (0x00980911) [1:11:01.505071680] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Flip (0x00980914) [1:11:01.505260143] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Flip (0x00980915) [1:11:01.505322963] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Orientation (0x009a0922) [1:11:01.505526366] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Sensor Rotation (0x009a0923) [1:11:01.505586246] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Blanking (0x009e0901) [1:11:01.505648887] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Blanking (0x009e0902) [1:11:01.505695087] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Analogue Gain (0x009e0903) [1:11:01.505748008] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Red Pixel Value (0x009e0904) [1:11:01.505792349] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Red) Pixel Value (0x009e0905) [1:11:01.505838069] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Blue Pixel Value (0x009e0906) [1:11:01.505879230] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Blue) Pixel Value (0x009e0907) [1:11:01.505923510] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Link Frequency (0x009f0901) [1:11:01.505977991] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Pixel Rate (0x009f0902) [1:11:01.506039071] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Test Pattern (0x009f0903) [1:11:01.506103692] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Digital Gain (0x009f0905) [1:11:01.511965879] [5489] DEBUG CameraSensor camera_sensor_legacy.cpp:1027 'imx219 1-0010': Apply test pattern mode 0 [1:11:01.512316703] [5489] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx219 1-0010' matched by CameraSensorLegacy [1:11:01.513112492] [5489] DEBUG V4L2 v4l2_device.cpp:721 /dev/video8[14:cap]: Control: Alpha Component (0x00980929) [1:11:01.513425036] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video8[14:cap]: Opened device platform:e6ef0000.video: rcar_vin: R_Car_VIN [1:11:01.514315146] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[15:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp input1 [1:11:01.514585209] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[16:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp params [1:11:01.514709890] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[17:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp stats [1:11:01.514810872] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video3[18:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp output1 [1:11:01.688954579] [5489] DEBUG IPAManager ipa_manager.cpp:311 IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so signature is valid [1:11:01.690030751] [5489] DEBUG IPAProxy rkisp1_ipa_proxy.cpp:44 initializing rkisp1 proxy in thread: loading IPA from /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so [1:11:01.697544637] [5489] INFO IPAProxy ipa_proxy.cpp:73 libcamera is not installed. Loading IPA configuration from '/root/ktool/src/ipa/rkisp1/data' [1:11:01.699111795] [5489] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /root/ktool/src/ipa/rkisp1/data/imx219.yaml [1:11:01.700205907] [5489] DEBUG IPARkISP1 rkisp1.cpp:175 rkisp1: Hardware revision is 2147483649 [1:11:01.712484087] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Agc' [1:11:01.713349237] [5489] DEBUG RkISP1Awb awb.cpp:109 Using AWB algorithm: bayes [1:11:01.715325600] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Awb' [1:11:01.715703244] [5489] DEBUG RkISP1Blc blc.cpp:100 Black levels: red 4096, green (red) 4096, green (blue) 4096, blue 4096 [1:11:01.715766485] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'BlackLevelCorrection' [1:11:01.716662595] [5489] WARN RkISP1Ccm ccm.cpp:62 Failed to parse 'offsets' parameter from tuning file; falling back to zero offsets [1:11:01.716982819] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Ccm' [1:11:01.717217241] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Filter' [1:11:01.717444404] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'GammaOutCorrection' [1:11:01.717832188] [5489] DEBUG RkISP1Lsc lsc.cpp:328 Loading tabular LSC data. [1:11:01.718942981] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'LensShadingCorrection' [1:11:01.721283788] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Vertical Blanking [1:11:01.721465110] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Exposure [1:11:01.721503870] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 1 and priority write flag 0 for Analogue Gain [1:11:01.722774505] [5489] INFO Camera camera_manager.cpp:223 Adding camera '/base/soc/i2c@e6508000/cam@10' for pipeline handler rcar-gen4 [1:11:01.723341991] [5489] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx462 2-001a: unsupported number of sinks (0) or sources (1) [1:11:01.723687835] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Exposure (0x00980911) [1:11:01.723934678] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Flip (0x00980914) [1:11:01.724113300] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Flip (0x00980915) [1:11:01.724189621] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Orientation (0x009a0922) [1:11:01.724293182] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Sensor Rotation (0x009a0923) [1:11:01.724352163] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Blanking (0x009e0901) [1:11:01.724396803] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Blanking (0x009e0902) [1:11:01.724447084] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Analogue Gain (0x009e0903) [1:11:01.724495504] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Link Frequency (0x009f0901) [1:11:01.724556465] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Pixel Rate (0x009f0902) [1:11:01.724603325] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Test Pattern (0x009f0903) [1:11:01.726786810] [5489] DEBUG CameraSensor camera_sensor_legacy.cpp:525 'imx462 2-001a': No static test pattern map for 'imx462' [1:11:01.727038693] [5489] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx462 2-001a' matched by CameraSensorLegacy [1:11:01.727580679] [5489] DEBUG V4L2 v4l2_device.cpp:721 /dev/video16[22:cap]: Control: Alpha Component (0x00980929) [1:11:01.727867423] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video16[22:cap]: Opened device platform:e6ef8000.video: rcar_vin: R_Car_VIN [1:11:01.728497310] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video4[23:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp input1 [1:11:01.728765993] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video5[24:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp params [1:11:01.728901414] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video6[25:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp stats [1:11:01.729006836] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video7[26:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp output1 [1:11:01.743642503] [5489] DEBUG IPAManager ipa_manager.cpp:311 IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so signature is valid [1:11:01.744616074] [5489] DEBUG IPAProxy rkisp1_ipa_proxy.cpp:44 initializing rkisp1 proxy in thread: loading IPA from /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so [1:11:01.745610225] [5489] INFO IPAProxy ipa_proxy.cpp:73 libcamera is not installed. Loading IPA configuration from '/root/ktool/src/ipa/rkisp1/data' [1:11:01.746263573] [5489] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /root/ktool/src/ipa/rkisp1/data/imx462.yaml [1:11:01.746738238] [5489] DEBUG IPARkISP1 rkisp1.cpp:175 rkisp1: Hardware revision is 2147483649 [1:11:01.770593970] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Agc' [1:11:01.771064555] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Lux' [1:11:01.771287818] [5489] DEBUG RkISP1Awb awb.cpp:109 Using AWB algorithm: bayes [1:11:01.771933845] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Awb' [1:11:01.772130408] [5489] DEBUG RkISP1Blc blc.cpp:100 Black levels: red 3840, green (red) 3840, green (blue) 3840, blue 3840 [1:11:01.772179848] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'BlackLevelCorrection' [1:11:01.772412531] [5489] WARN RkISP1Ccm ccm.cpp:62 Failed to parse 'offsets' parameter from tuning file; falling back to zero offsets [1:11:01.772474391] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Ccm' [1:11:01.772728374] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'ColorProcessing' [1:11:01.772795815] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Filter' [1:11:01.772860376] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'GammaOutCorrection' [1:11:01.772990277] [5489] DEBUG RkISP1Lsc lsc.cpp:328 Loading tabular LSC data. [1:11:01.775379205] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'LensShadingCorrection' [1:11:01.778213337] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Vertical Blanking [1:11:01.778328898] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Exposure [1:11:01.778369279] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Analogue Gain [1:11:01.779001926] [5489] INFO Camera camera_manager.cpp:223 Adding camera '/base/soc/i2c@e6510000/cam@1a' for pipeline handler rcar-gen4 [1:11:01.779146348] [5489] DEBUG Camera camera_manager.cpp:164 Pipeline handler "rcar-gen4" matched [1:11:01.779412931] [5489] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rkisp1' Available cameras: 1: External camera 'imx219' (/base/soc/i2c@e6508000/cam@10) 2: External camera 'imx462' (/base/soc/i2c@e6510000/cam@1a) > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > --- > Hans de Goede (1): > libcamera: ipa_manager: Create IPA by name > > Jacopo Mondi (1): > ipa: ipa_module: Remove pipelineName > > include/libcamera/internal/ipa_manager.h | 14 +++++++++++-- > include/libcamera/internal/ipa_module.h | 4 ++-- > include/libcamera/ipa/ipa_module_info.h | 1 - > src/ipa/ipu3/ipu3.cpp | 1 - > src/ipa/mali-c55/mali-c55.cpp | 1 - > src/ipa/rkisp1/rkisp1.cpp | 1 - > src/ipa/rpi/pisp/pisp.cpp | 1 - > src/ipa/rpi/vc4/vc4.cpp | 1 - > src/ipa/simple/soft_simple.cpp | 1 - > src/ipa/vimc/vimc.cpp | 1 - > src/libcamera/ipa_manager.cpp | 34 ++++++++++++++++++++++++++------ > src/libcamera/ipa_module.cpp | 27 +++++++++++-------------- > test/ipa/ipa_module_test.cpp | 3 --- > 13 files changed, 54 insertions(+), 36 deletions(-) > --- > base-commit: f0f2aca56611bf9430eb6edc23e9bd55cf96a26d > change-id: 20251002-ipa-match-by-name-82e6b34a23e9 > > Best regards, > -- > Jacopo Mondi <jacopo.mondi@ideasonboard.com> >
Hi Niklas On Fri, Oct 03, 2025 at 04:39:07PM +0200, Niklas Söderlund wrote: > Hi Jacopo, > > I'm happy to see movement here, thanks for your work. > > On 2025-10-03 11:27:28 +0200, Jacopo Mondi wrote: > > It is getting more and more common for different pipeline handlers to > > use the same IPA modules whose name differs from the pipeline's one. > > > > The first case has been the softISP, and now the in-review Renesas R-Car > > V4H pipeline handler will re-use the RkISP1 IPA. > > > > Starting from Hans' patch https://patchwork.libcamera.org/patch/23359/ > > "libcamera: ipa_manager: createIPA: Allow matching by IPA name instead > > of by pipeline" I here took a slightly different approach and addressed > > the review comments on Hans' v1 by creating an overload for > > IPAManager::createIPA() that allows pipelines to specify the IPA module > > name. If they don't provide a name, the pipeline handler's name is used. > > > > As the next step, to further decouple IPAs from pipelines, remove the > > pipelineName field from IPAModuleInfo that in all cases is identical to > > the IPA name itself. > > > > Not tested on neither softISP or R-Car but I used the "by name" and "by > > pipe" overloads on Mali and it worked. > > I tested this with the out-of-tree R-Car pipeline handler which makes > use of the rkisp1 IPA using the original patch from Hans you reference > above. It does not seem to work. Maybe I updated the pipeline handler > wrong? As far as I can tell I shall only drop the name from createIPA() > ? No because in that case you're trying to match an IPA named "rcar-gen4". As the commit message of 1/2 suggests: introducing an overload to IPAManager::createIPA(pipe, name, minVer, maxVer) that allows to specify the name of the IPA module to match. Pipeline handlers that wants to use their name as matching criteria can continue doing so using the already existing createIPA(pipe, minVer, maxVer) overload. > > --- a/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp > +++ b/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp > @@ -694,7 +694,7 @@ int PipelineHandlerRCar4::createCamera(MediaDevice *mdev, > /* > * Load RkISP1 IPA for use with RCar4 > */ > - data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, 1, 1, "rkisp1"); > + data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, 1, 1); You should specify the "rkisp1" name if the IPA name you want to match differs from the pipeline handler name. Thanks for testing > if (!data->ipa_) { > LOG(RCar4, Error) << "No IPA module found"; > return -ENOENT; > > However with this change and the above patches I get no match, > > arm64 ~ # ./ktool/build/src/apps/cam/cam --list > [1:21:46.492265975] [5498] INFO IPAManager ipa_manager.cpp:147 libcamera is not installed. Adding '/root/ktool/build/src/ipa' to the IPA search path > [1:21:46.523544956] [5498] DEBUG IPAModule ipa_module.cpp:330 ipa_rkisp1.so: IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so is signed > [1:21:46.524149881] [5498] DEBUG IPAManager ipa_manager.cpp:239 Loaded IPA module '/root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so' > [1:21:46.524671766] [5498] INFO Camera camera_manager.cpp:340 libcamera v0.5.2 > [1:21:46.525395972] [5505] DEBUG Camera camera_manager.cpp:74 Starting camera manager > [1:21:46.561468814] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rcar_vin" created from /dev/media0 > [1:21:46.563094648] [5505] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 28 missing dependencies > [1:21:46.579583806] [5505] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found > [1:21:46.579690487] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rcar_vin > [1:21:46.580957577] [5505] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rcar-gen4' > [1:21:46.581355620] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:318 Successful match for media device "rcar_vin" > [1:21:46.584349766] [5505] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx219 1-0010: unsupported number of sinks (0) or sources (1) > [1:21:46.585095032] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Exposure (0x00980911) > [1:21:46.585882178] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Flip (0x00980914) > [1:21:46.586161601] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Flip (0x00980915) > [1:21:46.586282022] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Orientation (0x009a0922) > [1:21:46.586528444] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Sensor Rotation (0x009a0923) > [1:21:46.586635605] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Blanking (0x009e0901) > [1:21:46.586716905] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Blanking (0x009e0902) > [1:21:46.586782966] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Analogue Gain (0x009e0903) > [1:21:46.586838826] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Red Pixel Value (0x009e0904) > [1:21:46.586893187] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Red) Pixel Value (0x009e0905) > [1:21:46.586943767] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Blue Pixel Value (0x009e0906) > [1:21:46.586987388] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Blue) Pixel Value (0x009e0907) > [1:21:46.587035448] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Link Frequency (0x009f0901) > [1:21:46.587109909] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Pixel Rate (0x009f0902) > [1:21:46.587187189] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Test Pattern (0x009f0903) > [1:21:46.587272150] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Digital Gain (0x009f0905) > [1:21:46.593514602] [5505] DEBUG CameraSensor camera_sensor_legacy.cpp:1027 'imx219 1-0010': Apply test pattern mode 0 > [1:21:46.593797925] [5505] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx219 1-0010' matched by CameraSensorLegacy > [1:21:46.594648132] [5505] DEBUG V4L2 v4l2_device.cpp:721 /dev/video8[14:cap]: Control: Alpha Component (0x00980929) > [1:21:46.594980415] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video8[14:cap]: Opened device platform:e6ef0000.video: rcar_vin: R_Car_VIN > [1:21:46.595954523] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[15:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp input1 > [1:21:46.596398166] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[16:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp params > [1:21:46.596611048] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[17:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp stats > [1:21:46.596753249] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video3[18:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp output1 > [1:21:46.597138393] [5505] ERROR RCar4 rcar-gen4.cpp:699 No IPA module found > [1:21:46.598476584] [5505] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx462 2-001a: unsupported number of sinks (0) or sources (1) > [1:21:46.598764886] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Exposure (0x00980911) > [1:21:46.598989828] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Flip (0x00980914) > [1:21:46.599094049] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Flip (0x00980915) > [1:21:46.599162210] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Orientation (0x009a0922) > [1:21:46.599259350] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Sensor Rotation (0x009a0923) > [1:21:46.599317311] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Blanking (0x009e0901) > [1:21:46.599371671] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Blanking (0x009e0902) > [1:21:46.599417932] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Analogue Gain (0x009e0903) > [1:21:46.599464852] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Link Frequency (0x009f0901) > [1:21:46.599531273] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Pixel Rate (0x009f0902) > [1:21:46.599577773] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Test Pattern (0x009f0903) > [1:21:46.601948993] [5505] DEBUG CameraSensor camera_sensor_legacy.cpp:525 'imx462 2-001a': No static test pattern map for 'imx462' > [1:21:46.602197815] [5505] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx462 2-001a' matched by CameraSensorLegacy > [1:21:46.602731699] [5505] DEBUG V4L2 v4l2_device.cpp:721 /dev/video16[14:cap]: Control: Alpha Component (0x00980929) > [1:21:46.603033862] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video16[14:cap]: Opened device platform:e6ef8000.video: rcar_vin: R_Car_VIN > [1:21:46.603609447] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video4[15:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp input1 > [1:21:46.603884549] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video5[16:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp params > [1:21:46.604083931] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video6[17:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp stats > [1:21:46.604240052] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video7[18:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp output1 > [1:21:46.604418254] [5505] ERROR RCar4 rcar-gen4.cpp:699 No IPA module found > [1:21:46.605292401] [5505] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rkisp1' > Available cameras: > > With the old patch and without the one line diff above, > > arm64 ~ # ./ktool/build/src/apps/cam/cam --list > [1:11:01.410543781] [5488] INFO IPAManager ipa_manager.cpp:147 libcamera is not installed. Adding '/root/ktool/build/src/ipa' to the IPA search path > [1:11:01.441549195] [5488] DEBUG IPAModule ipa_module.cpp:333 ipa_rkisp1.so: IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so is signed > [1:11:01.442073601] [5488] DEBUG IPAManager ipa_manager.cpp:239 Loaded IPA module '/root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so' > [1:11:01.442575027] [5488] INFO Camera camera_manager.cpp:340 libcamera v0.5.2 > [1:11:01.443238575] [5489] DEBUG Camera camera_manager.cpp:74 Starting camera manager > [1:11:01.480244057] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rcar_vin" created from /dev/media0 > [1:11:01.481929536] [5489] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 28 missing dependencies > [1:11:01.498531846] [5489] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found > [1:11:01.498661927] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rcar_vin > [1:11:01.499823240] [5489] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rcar-gen4' > [1:11:01.500258005] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:318 Successful match for media device "rcar_vin" > [1:11:01.503564223] [5489] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx219 1-0010: unsupported number of sinks (0) or sources (1) > [1:11:01.504309132] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Exposure (0x00980911) > [1:11:01.505071680] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Flip (0x00980914) > [1:11:01.505260143] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Flip (0x00980915) > [1:11:01.505322963] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Orientation (0x009a0922) > [1:11:01.505526366] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Sensor Rotation (0x009a0923) > [1:11:01.505586246] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Blanking (0x009e0901) > [1:11:01.505648887] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Blanking (0x009e0902) > [1:11:01.505695087] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Analogue Gain (0x009e0903) > [1:11:01.505748008] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Red Pixel Value (0x009e0904) > [1:11:01.505792349] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Red) Pixel Value (0x009e0905) > [1:11:01.505838069] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Blue Pixel Value (0x009e0906) > [1:11:01.505879230] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Blue) Pixel Value (0x009e0907) > [1:11:01.505923510] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Link Frequency (0x009f0901) > [1:11:01.505977991] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Pixel Rate (0x009f0902) > [1:11:01.506039071] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Test Pattern (0x009f0903) > [1:11:01.506103692] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Digital Gain (0x009f0905) > [1:11:01.511965879] [5489] DEBUG CameraSensor camera_sensor_legacy.cpp:1027 'imx219 1-0010': Apply test pattern mode 0 > [1:11:01.512316703] [5489] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx219 1-0010' matched by CameraSensorLegacy > [1:11:01.513112492] [5489] DEBUG V4L2 v4l2_device.cpp:721 /dev/video8[14:cap]: Control: Alpha Component (0x00980929) > [1:11:01.513425036] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video8[14:cap]: Opened device platform:e6ef0000.video: rcar_vin: R_Car_VIN > [1:11:01.514315146] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[15:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp input1 > [1:11:01.514585209] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[16:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp params > [1:11:01.514709890] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[17:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp stats > [1:11:01.514810872] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video3[18:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp output1 > [1:11:01.688954579] [5489] DEBUG IPAManager ipa_manager.cpp:311 IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so signature is valid > [1:11:01.690030751] [5489] DEBUG IPAProxy rkisp1_ipa_proxy.cpp:44 initializing rkisp1 proxy in thread: loading IPA from /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so > [1:11:01.697544637] [5489] INFO IPAProxy ipa_proxy.cpp:73 libcamera is not installed. Loading IPA configuration from '/root/ktool/src/ipa/rkisp1/data' > [1:11:01.699111795] [5489] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /root/ktool/src/ipa/rkisp1/data/imx219.yaml > [1:11:01.700205907] [5489] DEBUG IPARkISP1 rkisp1.cpp:175 rkisp1: Hardware revision is 2147483649 > [1:11:01.712484087] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Agc' > [1:11:01.713349237] [5489] DEBUG RkISP1Awb awb.cpp:109 Using AWB algorithm: bayes > [1:11:01.715325600] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Awb' > [1:11:01.715703244] [5489] DEBUG RkISP1Blc blc.cpp:100 Black levels: red 4096, green (red) 4096, green (blue) 4096, blue 4096 > [1:11:01.715766485] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'BlackLevelCorrection' > [1:11:01.716662595] [5489] WARN RkISP1Ccm ccm.cpp:62 Failed to parse 'offsets' parameter from tuning file; falling back to zero offsets > [1:11:01.716982819] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Ccm' > [1:11:01.717217241] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Filter' > [1:11:01.717444404] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'GammaOutCorrection' > [1:11:01.717832188] [5489] DEBUG RkISP1Lsc lsc.cpp:328 Loading tabular LSC data. > [1:11:01.718942981] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'LensShadingCorrection' > [1:11:01.721283788] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Vertical Blanking > [1:11:01.721465110] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Exposure > [1:11:01.721503870] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 1 and priority write flag 0 for Analogue Gain > [1:11:01.722774505] [5489] INFO Camera camera_manager.cpp:223 Adding camera '/base/soc/i2c@e6508000/cam@10' for pipeline handler rcar-gen4 > [1:11:01.723341991] [5489] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx462 2-001a: unsupported number of sinks (0) or sources (1) > [1:11:01.723687835] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Exposure (0x00980911) > [1:11:01.723934678] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Flip (0x00980914) > [1:11:01.724113300] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Flip (0x00980915) > [1:11:01.724189621] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Orientation (0x009a0922) > [1:11:01.724293182] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Sensor Rotation (0x009a0923) > [1:11:01.724352163] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Blanking (0x009e0901) > [1:11:01.724396803] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Blanking (0x009e0902) > [1:11:01.724447084] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Analogue Gain (0x009e0903) > [1:11:01.724495504] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Link Frequency (0x009f0901) > [1:11:01.724556465] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Pixel Rate (0x009f0902) > [1:11:01.724603325] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Test Pattern (0x009f0903) > [1:11:01.726786810] [5489] DEBUG CameraSensor camera_sensor_legacy.cpp:525 'imx462 2-001a': No static test pattern map for 'imx462' > [1:11:01.727038693] [5489] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx462 2-001a' matched by CameraSensorLegacy > [1:11:01.727580679] [5489] DEBUG V4L2 v4l2_device.cpp:721 /dev/video16[22:cap]: Control: Alpha Component (0x00980929) > [1:11:01.727867423] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video16[22:cap]: Opened device platform:e6ef8000.video: rcar_vin: R_Car_VIN > [1:11:01.728497310] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video4[23:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp input1 > [1:11:01.728765993] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video5[24:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp params > [1:11:01.728901414] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video6[25:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp stats > [1:11:01.729006836] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video7[26:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp output1 > [1:11:01.743642503] [5489] DEBUG IPAManager ipa_manager.cpp:311 IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so signature is valid > [1:11:01.744616074] [5489] DEBUG IPAProxy rkisp1_ipa_proxy.cpp:44 initializing rkisp1 proxy in thread: loading IPA from /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so > [1:11:01.745610225] [5489] INFO IPAProxy ipa_proxy.cpp:73 libcamera is not installed. Loading IPA configuration from '/root/ktool/src/ipa/rkisp1/data' > [1:11:01.746263573] [5489] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /root/ktool/src/ipa/rkisp1/data/imx462.yaml > [1:11:01.746738238] [5489] DEBUG IPARkISP1 rkisp1.cpp:175 rkisp1: Hardware revision is 2147483649 > [1:11:01.770593970] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Agc' > [1:11:01.771064555] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Lux' > [1:11:01.771287818] [5489] DEBUG RkISP1Awb awb.cpp:109 Using AWB algorithm: bayes > [1:11:01.771933845] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Awb' > [1:11:01.772130408] [5489] DEBUG RkISP1Blc blc.cpp:100 Black levels: red 3840, green (red) 3840, green (blue) 3840, blue 3840 > [1:11:01.772179848] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'BlackLevelCorrection' > [1:11:01.772412531] [5489] WARN RkISP1Ccm ccm.cpp:62 Failed to parse 'offsets' parameter from tuning file; falling back to zero offsets > [1:11:01.772474391] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Ccm' > [1:11:01.772728374] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'ColorProcessing' > [1:11:01.772795815] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Filter' > [1:11:01.772860376] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'GammaOutCorrection' > [1:11:01.772990277] [5489] DEBUG RkISP1Lsc lsc.cpp:328 Loading tabular LSC data. > [1:11:01.775379205] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'LensShadingCorrection' > [1:11:01.778213337] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Vertical Blanking > [1:11:01.778328898] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Exposure > [1:11:01.778369279] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Analogue Gain > [1:11:01.779001926] [5489] INFO Camera camera_manager.cpp:223 Adding camera '/base/soc/i2c@e6510000/cam@1a' for pipeline handler rcar-gen4 > [1:11:01.779146348] [5489] DEBUG Camera camera_manager.cpp:164 Pipeline handler "rcar-gen4" matched > [1:11:01.779412931] [5489] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rkisp1' > Available cameras: > 1: External camera 'imx219' (/base/soc/i2c@e6508000/cam@10) > 2: External camera 'imx462' (/base/soc/i2c@e6510000/cam@1a) > > > > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > --- > > Hans de Goede (1): > > libcamera: ipa_manager: Create IPA by name > > > > Jacopo Mondi (1): > > ipa: ipa_module: Remove pipelineName > > > > include/libcamera/internal/ipa_manager.h | 14 +++++++++++-- > > include/libcamera/internal/ipa_module.h | 4 ++-- > > include/libcamera/ipa/ipa_module_info.h | 1 - > > src/ipa/ipu3/ipu3.cpp | 1 - > > src/ipa/mali-c55/mali-c55.cpp | 1 - > > src/ipa/rkisp1/rkisp1.cpp | 1 - > > src/ipa/rpi/pisp/pisp.cpp | 1 - > > src/ipa/rpi/vc4/vc4.cpp | 1 - > > src/ipa/simple/soft_simple.cpp | 1 - > > src/ipa/vimc/vimc.cpp | 1 - > > src/libcamera/ipa_manager.cpp | 34 ++++++++++++++++++++++++++------ > > src/libcamera/ipa_module.cpp | 27 +++++++++++-------------- > > test/ipa/ipa_module_test.cpp | 3 --- > > 13 files changed, 54 insertions(+), 36 deletions(-) > > --- > > base-commit: f0f2aca56611bf9430eb6edc23e9bd55cf96a26d > > change-id: 20251002-ipa-match-by-name-82e6b34a23e9 > > > > Best regards, > > -- > > Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > > > -- > Kind Regards, > Niklas Söderlund
Hi Jacopo, On 2025-10-03 16:46:01 +0200, Jacopo Mondi wrote: > Hi Niklas > > On Fri, Oct 03, 2025 at 04:39:07PM +0200, Niklas Söderlund wrote: > > Hi Jacopo, > > > > I'm happy to see movement here, thanks for your work. > > > > On 2025-10-03 11:27:28 +0200, Jacopo Mondi wrote: > > > It is getting more and more common for different pipeline handlers to > > > use the same IPA modules whose name differs from the pipeline's one. > > > > > > The first case has been the softISP, and now the in-review Renesas R-Car > > > V4H pipeline handler will re-use the RkISP1 IPA. > > > > > > Starting from Hans' patch https://patchwork.libcamera.org/patch/23359/ > > > "libcamera: ipa_manager: createIPA: Allow matching by IPA name instead > > > of by pipeline" I here took a slightly different approach and addressed > > > the review comments on Hans' v1 by creating an overload for > > > IPAManager::createIPA() that allows pipelines to specify the IPA module > > > name. If they don't provide a name, the pipeline handler's name is used. > > > > > > As the next step, to further decouple IPAs from pipelines, remove the > > > pipelineName field from IPAModuleInfo that in all cases is identical to > > > the IPA name itself. > > > > > > Not tested on neither softISP or R-Car but I used the "by name" and "by > > > pipe" overloads on Mali and it worked. > > > > I tested this with the out-of-tree R-Car pipeline handler which makes > > use of the rkisp1 IPA using the original patch from Hans you reference > > above. It does not seem to work. Maybe I updated the pipeline handler > > wrong? As far as I can tell I shall only drop the name from createIPA() > > ? > > No because in that case you're trying to match an IPA named > "rcar-gen4". > > As the commit message of 1/2 suggests: > > introducing an overload to IPAManager::createIPA(pipe, name, minVer, > maxVer) that allows to specify the name of the IPA module to match. > Pipeline handlers that wants to use their name as matching criteria > can continue doing so using the already existing createIPA(pipe, > minVer, maxVer) overload. Ahh, I see now I missed that the signature changed too. I hit the compile error with the dropped name in the non-overloaded version. Checked how this was updated in the other pipeline handers, did the same, it compiled and I moved on. With the correct update - data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, 1, 1, "rkisp1"); + data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, "rkisp1", 1, 1); This works! Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > > > > > > --- a/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp > > +++ b/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp > > @@ -694,7 +694,7 @@ int PipelineHandlerRCar4::createCamera(MediaDevice *mdev, > > /* > > * Load RkISP1 IPA for use with RCar4 > > */ > > - data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, 1, 1, "rkisp1"); > > + data->ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(this, 1, 1); > > You should specify the "rkisp1" name if the IPA name you want to match > differs from the pipeline handler name. > > Thanks for testing > > > if (!data->ipa_) { > > LOG(RCar4, Error) << "No IPA module found"; > > return -ENOENT; > > > > However with this change and the above patches I get no match, > > > > arm64 ~ # ./ktool/build/src/apps/cam/cam --list > > [1:21:46.492265975] [5498] INFO IPAManager ipa_manager.cpp:147 libcamera is not installed. Adding '/root/ktool/build/src/ipa' to the IPA search path > > [1:21:46.523544956] [5498] DEBUG IPAModule ipa_module.cpp:330 ipa_rkisp1.so: IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so is signed > > [1:21:46.524149881] [5498] DEBUG IPAManager ipa_manager.cpp:239 Loaded IPA module '/root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so' > > [1:21:46.524671766] [5498] INFO Camera camera_manager.cpp:340 libcamera v0.5.2 > > [1:21:46.525395972] [5505] DEBUG Camera camera_manager.cpp:74 Starting camera manager > > [1:21:46.561468814] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rcar_vin" created from /dev/media0 > > [1:21:46.563094648] [5505] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 28 missing dependencies > > [1:21:46.579583806] [5505] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found > > [1:21:46.579690487] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rcar_vin > > [1:21:46.580957577] [5505] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rcar-gen4' > > [1:21:46.581355620] [5505] DEBUG DeviceEnumerator device_enumerator.cpp:318 Successful match for media device "rcar_vin" > > [1:21:46.584349766] [5505] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx219 1-0010: unsupported number of sinks (0) or sources (1) > > [1:21:46.585095032] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Exposure (0x00980911) > > [1:21:46.585882178] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Flip (0x00980914) > > [1:21:46.586161601] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Flip (0x00980915) > > [1:21:46.586282022] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Orientation (0x009a0922) > > [1:21:46.586528444] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Sensor Rotation (0x009a0923) > > [1:21:46.586635605] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Blanking (0x009e0901) > > [1:21:46.586716905] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Blanking (0x009e0902) > > [1:21:46.586782966] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Analogue Gain (0x009e0903) > > [1:21:46.586838826] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Red Pixel Value (0x009e0904) > > [1:21:46.586893187] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Red) Pixel Value (0x009e0905) > > [1:21:46.586943767] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Blue Pixel Value (0x009e0906) > > [1:21:46.586987388] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Blue) Pixel Value (0x009e0907) > > [1:21:46.587035448] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Link Frequency (0x009f0901) > > [1:21:46.587109909] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Pixel Rate (0x009f0902) > > [1:21:46.587187189] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Test Pattern (0x009f0903) > > [1:21:46.587272150] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Digital Gain (0x009f0905) > > [1:21:46.593514602] [5505] DEBUG CameraSensor camera_sensor_legacy.cpp:1027 'imx219 1-0010': Apply test pattern mode 0 > > [1:21:46.593797925] [5505] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx219 1-0010' matched by CameraSensorLegacy > > [1:21:46.594648132] [5505] DEBUG V4L2 v4l2_device.cpp:721 /dev/video8[14:cap]: Control: Alpha Component (0x00980929) > > [1:21:46.594980415] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video8[14:cap]: Opened device platform:e6ef0000.video: rcar_vin: R_Car_VIN > > [1:21:46.595954523] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[15:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp input1 > > [1:21:46.596398166] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[16:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp params > > [1:21:46.596611048] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[17:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp stats > > [1:21:46.596753249] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video3[18:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp output1 > > [1:21:46.597138393] [5505] ERROR RCar4 rcar-gen4.cpp:699 No IPA module found > > [1:21:46.598476584] [5505] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx462 2-001a: unsupported number of sinks (0) or sources (1) > > [1:21:46.598764886] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Exposure (0x00980911) > > [1:21:46.598989828] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Flip (0x00980914) > > [1:21:46.599094049] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Flip (0x00980915) > > [1:21:46.599162210] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Orientation (0x009a0922) > > [1:21:46.599259350] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Sensor Rotation (0x009a0923) > > [1:21:46.599317311] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Blanking (0x009e0901) > > [1:21:46.599371671] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Blanking (0x009e0902) > > [1:21:46.599417932] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Analogue Gain (0x009e0903) > > [1:21:46.599464852] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Link Frequency (0x009f0901) > > [1:21:46.599531273] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Pixel Rate (0x009f0902) > > [1:21:46.599577773] [5505] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Test Pattern (0x009f0903) > > [1:21:46.601948993] [5505] DEBUG CameraSensor camera_sensor_legacy.cpp:525 'imx462 2-001a': No static test pattern map for 'imx462' > > [1:21:46.602197815] [5505] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx462 2-001a' matched by CameraSensorLegacy > > [1:21:46.602731699] [5505] DEBUG V4L2 v4l2_device.cpp:721 /dev/video16[14:cap]: Control: Alpha Component (0x00980929) > > [1:21:46.603033862] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video16[14:cap]: Opened device platform:e6ef8000.video: rcar_vin: R_Car_VIN > > [1:21:46.603609447] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video4[15:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp input1 > > [1:21:46.603884549] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video5[16:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp params > > [1:21:46.604083931] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video6[17:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp stats > > [1:21:46.604240052] [5505] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video7[18:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp output1 > > [1:21:46.604418254] [5505] ERROR RCar4 rcar-gen4.cpp:699 No IPA module found > > [1:21:46.605292401] [5505] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rkisp1' > > Available cameras: > > > > With the old patch and without the one line diff above, > > > > arm64 ~ # ./ktool/build/src/apps/cam/cam --list > > [1:11:01.410543781] [5488] INFO IPAManager ipa_manager.cpp:147 libcamera is not installed. Adding '/root/ktool/build/src/ipa' to the IPA search path > > [1:11:01.441549195] [5488] DEBUG IPAModule ipa_module.cpp:333 ipa_rkisp1.so: IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so is signed > > [1:11:01.442073601] [5488] DEBUG IPAManager ipa_manager.cpp:239 Loaded IPA module '/root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so' > > [1:11:01.442575027] [5488] INFO Camera camera_manager.cpp:340 libcamera v0.5.2 > > [1:11:01.443238575] [5489] DEBUG Camera camera_manager.cpp:74 Starting camera manager > > [1:11:01.480244057] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rcar_vin" created from /dev/media0 > > [1:11:01.481929536] [5489] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 28 missing dependencies > > [1:11:01.498531846] [5489] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found > > [1:11:01.498661927] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rcar_vin > > [1:11:01.499823240] [5489] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rcar-gen4' > > [1:11:01.500258005] [5489] DEBUG DeviceEnumerator device_enumerator.cpp:318 Successful match for media device "rcar_vin" > > [1:11:01.503564223] [5489] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx219 1-0010: unsupported number of sinks (0) or sources (1) > > [1:11:01.504309132] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Exposure (0x00980911) > > [1:11:01.505071680] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Flip (0x00980914) > > [1:11:01.505260143] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Flip (0x00980915) > > [1:11:01.505322963] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Orientation (0x009a0922) > > [1:11:01.505526366] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Camera Sensor Rotation (0x009a0923) > > [1:11:01.505586246] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Vertical Blanking (0x009e0901) > > [1:11:01.505648887] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Horizontal Blanking (0x009e0902) > > [1:11:01.505695087] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Analogue Gain (0x009e0903) > > [1:11:01.505748008] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Red Pixel Value (0x009e0904) > > [1:11:01.505792349] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Red) Pixel Value (0x009e0905) > > [1:11:01.505838069] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Blue Pixel Value (0x009e0906) > > [1:11:01.505879230] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Green (Blue) Pixel Value (0x009e0907) > > [1:11:01.505923510] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Link Frequency (0x009f0901) > > [1:11:01.505977991] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Pixel Rate (0x009f0902) > > [1:11:01.506039071] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Test Pattern (0x009f0903) > > [1:11:01.506103692] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx219 1-0010': Control: Digital Gain (0x009f0905) > > [1:11:01.511965879] [5489] DEBUG CameraSensor camera_sensor_legacy.cpp:1027 'imx219 1-0010': Apply test pattern mode 0 > > [1:11:01.512316703] [5489] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx219 1-0010' matched by CameraSensorLegacy > > [1:11:01.513112492] [5489] DEBUG V4L2 v4l2_device.cpp:721 /dev/video8[14:cap]: Control: Alpha Component (0x00980929) > > [1:11:01.513425036] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video8[14:cap]: Opened device platform:e6ef0000.video: rcar_vin: R_Car_VIN > > [1:11:01.514315146] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[15:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp input1 > > [1:11:01.514585209] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[16:out]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp params > > [1:11:01.514709890] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[17:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp stats > > [1:11:01.514810872] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video3[18:cap]: Opened device platform:fed00000.isp: rcar_isp: rcar_isp fed00000.isp output1 > > [1:11:01.688954579] [5489] DEBUG IPAManager ipa_manager.cpp:311 IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so signature is valid > > [1:11:01.690030751] [5489] DEBUG IPAProxy rkisp1_ipa_proxy.cpp:44 initializing rkisp1 proxy in thread: loading IPA from /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so > > [1:11:01.697544637] [5489] INFO IPAProxy ipa_proxy.cpp:73 libcamera is not installed. Loading IPA configuration from '/root/ktool/src/ipa/rkisp1/data' > > [1:11:01.699111795] [5489] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /root/ktool/src/ipa/rkisp1/data/imx219.yaml > > [1:11:01.700205907] [5489] DEBUG IPARkISP1 rkisp1.cpp:175 rkisp1: Hardware revision is 2147483649 > > [1:11:01.712484087] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Agc' > > [1:11:01.713349237] [5489] DEBUG RkISP1Awb awb.cpp:109 Using AWB algorithm: bayes > > [1:11:01.715325600] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Awb' > > [1:11:01.715703244] [5489] DEBUG RkISP1Blc blc.cpp:100 Black levels: red 4096, green (red) 4096, green (blue) 4096, blue 4096 > > [1:11:01.715766485] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'BlackLevelCorrection' > > [1:11:01.716662595] [5489] WARN RkISP1Ccm ccm.cpp:62 Failed to parse 'offsets' parameter from tuning file; falling back to zero offsets > > [1:11:01.716982819] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Ccm' > > [1:11:01.717217241] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Filter' > > [1:11:01.717444404] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'GammaOutCorrection' > > [1:11:01.717832188] [5489] DEBUG RkISP1Lsc lsc.cpp:328 Loading tabular LSC data. > > [1:11:01.718942981] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'LensShadingCorrection' > > [1:11:01.721283788] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Vertical Blanking > > [1:11:01.721465110] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Exposure > > [1:11:01.721503870] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 1 and priority write flag 0 for Analogue Gain > > [1:11:01.722774505] [5489] INFO Camera camera_manager.cpp:223 Adding camera '/base/soc/i2c@e6508000/cam@10' for pipeline handler rcar-gen4 > > [1:11:01.723341991] [5489] DEBUG CameraSensor camera_sensor_raw.cpp:210 imx462 2-001a: unsupported number of sinks (0) or sources (1) > > [1:11:01.723687835] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Exposure (0x00980911) > > [1:11:01.723934678] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Flip (0x00980914) > > [1:11:01.724113300] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Flip (0x00980915) > > [1:11:01.724189621] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Orientation (0x009a0922) > > [1:11:01.724293182] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Camera Sensor Rotation (0x009a0923) > > [1:11:01.724352163] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Vertical Blanking (0x009e0901) > > [1:11:01.724396803] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Horizontal Blanking (0x009e0902) > > [1:11:01.724447084] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Analogue Gain (0x009e0903) > > [1:11:01.724495504] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Link Frequency (0x009f0901) > > [1:11:01.724556465] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Pixel Rate (0x009f0902) > > [1:11:01.724603325] [5489] DEBUG V4L2 v4l2_device.cpp:721 'imx462 2-001a': Control: Test Pattern (0x009f0903) > > [1:11:01.726786810] [5489] DEBUG CameraSensor camera_sensor_legacy.cpp:525 'imx462 2-001a': No static test pattern map for 'imx462' > > [1:11:01.727038693] [5489] DEBUG CameraSensor camera_sensor.cpp:469 Entity 'imx462 2-001a' matched by CameraSensorLegacy > > [1:11:01.727580679] [5489] DEBUG V4L2 v4l2_device.cpp:721 /dev/video16[22:cap]: Control: Alpha Component (0x00980929) > > [1:11:01.727867423] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video16[22:cap]: Opened device platform:e6ef8000.video: rcar_vin: R_Car_VIN > > [1:11:01.728497310] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video4[23:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp input1 > > [1:11:01.728765993] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video5[24:out]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp params > > [1:11:01.728901414] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video6[25:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp stats > > [1:11:01.729006836] [5489] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video7[26:cap]: Opened device platform:fed20000.isp: rcar_isp: rcar_isp fed20000.isp output1 > > [1:11:01.743642503] [5489] DEBUG IPAManager ipa_manager.cpp:311 IPA module /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so signature is valid > > [1:11:01.744616074] [5489] DEBUG IPAProxy rkisp1_ipa_proxy.cpp:44 initializing rkisp1 proxy in thread: loading IPA from /root/ktool/build/src/ipa/rkisp1/ipa_rkisp1.so > > [1:11:01.745610225] [5489] INFO IPAProxy ipa_proxy.cpp:73 libcamera is not installed. Loading IPA configuration from '/root/ktool/src/ipa/rkisp1/data' > > [1:11:01.746263573] [5489] INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /root/ktool/src/ipa/rkisp1/data/imx462.yaml > > [1:11:01.746738238] [5489] DEBUG IPARkISP1 rkisp1.cpp:175 rkisp1: Hardware revision is 2147483649 > > [1:11:01.770593970] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Agc' > > [1:11:01.771064555] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Lux' > > [1:11:01.771287818] [5489] DEBUG RkISP1Awb awb.cpp:109 Using AWB algorithm: bayes > > [1:11:01.771933845] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Awb' > > [1:11:01.772130408] [5489] DEBUG RkISP1Blc blc.cpp:100 Black levels: red 3840, green (red) 3840, green (blue) 3840, blue 3840 > > [1:11:01.772179848] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'BlackLevelCorrection' > > [1:11:01.772412531] [5489] WARN RkISP1Ccm ccm.cpp:62 Failed to parse 'offsets' parameter from tuning file; falling back to zero offsets > > [1:11:01.772474391] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Ccm' > > [1:11:01.772728374] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'ColorProcessing' > > [1:11:01.772795815] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'Filter' > > [1:11:01.772860376] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'GammaOutCorrection' > > [1:11:01.772990277] [5489] DEBUG RkISP1Lsc lsc.cpp:328 Loading tabular LSC data. > > [1:11:01.775379205] [5489] DEBUG IPAModuleAlgo module.h:91 rkisp1: Instantiated algorithm 'LensShadingCorrection' > > [1:11:01.778213337] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Vertical Blanking > > [1:11:01.778328898] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Exposure > > [1:11:01.778369279] [5489] DEBUG DelayedControls delayed_controls.cpp:99 Set a delay of 2 and priority write flag 0 for Analogue Gain > > [1:11:01.779001926] [5489] INFO Camera camera_manager.cpp:223 Adding camera '/base/soc/i2c@e6510000/cam@1a' for pipeline handler rcar-gen4 > > [1:11:01.779146348] [5489] DEBUG Camera camera_manager.cpp:164 Pipeline handler "rcar-gen4" matched > > [1:11:01.779412931] [5489] DEBUG Camera camera_manager.cpp:143 Found registered pipeline handler 'rkisp1' > > Available cameras: > > 1: External camera 'imx219' (/base/soc/i2c@e6508000/cam@10) > > 2: External camera 'imx462' (/base/soc/i2c@e6510000/cam@1a) > > > > > > > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > > --- > > > Hans de Goede (1): > > > libcamera: ipa_manager: Create IPA by name > > > > > > Jacopo Mondi (1): > > > ipa: ipa_module: Remove pipelineName > > > > > > include/libcamera/internal/ipa_manager.h | 14 +++++++++++-- > > > include/libcamera/internal/ipa_module.h | 4 ++-- > > > include/libcamera/ipa/ipa_module_info.h | 1 - > > > src/ipa/ipu3/ipu3.cpp | 1 - > > > src/ipa/mali-c55/mali-c55.cpp | 1 - > > > src/ipa/rkisp1/rkisp1.cpp | 1 - > > > src/ipa/rpi/pisp/pisp.cpp | 1 - > > > src/ipa/rpi/vc4/vc4.cpp | 1 - > > > src/ipa/simple/soft_simple.cpp | 1 - > > > src/ipa/vimc/vimc.cpp | 1 - > > > src/libcamera/ipa_manager.cpp | 34 ++++++++++++++++++++++++++------ > > > src/libcamera/ipa_module.cpp | 27 +++++++++++-------------- > > > test/ipa/ipa_module_test.cpp | 3 --- > > > 13 files changed, 54 insertions(+), 36 deletions(-) > > > --- > > > base-commit: f0f2aca56611bf9430eb6edc23e9bd55cf96a26d > > > change-id: 20251002-ipa-match-by-name-82e6b34a23e9 > > > > > > Best regards, > > > -- > > > Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > > > > > > -- > > Kind Regards, > > Niklas Söderlund
It is getting more and more common for different pipeline handlers to use the same IPA modules whose name differs from the pipeline's one. The first case has been the softISP, and now the in-review Renesas R-Car V4H pipeline handler will re-use the RkISP1 IPA. Starting from Hans' patch https://patchwork.libcamera.org/patch/23359/ "libcamera: ipa_manager: createIPA: Allow matching by IPA name instead of by pipeline" I here took a slightly different approach and addressed the review comments on Hans' v1 by creating an overload for IPAManager::createIPA() that allows pipelines to specify the IPA module name. If they don't provide a name, the pipeline handler's name is used. As the next step, to further decouple IPAs from pipelines, remove the pipelineName field from IPAModuleInfo that in all cases is identical to the IPA name itself. Not tested on neither softISP or R-Car but I used the "by name" and "by pipe" overloads on Mali and it worked. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> --- Hans de Goede (1): libcamera: ipa_manager: Create IPA by name Jacopo Mondi (1): ipa: ipa_module: Remove pipelineName include/libcamera/internal/ipa_manager.h | 14 +++++++++++-- include/libcamera/internal/ipa_module.h | 4 ++-- include/libcamera/ipa/ipa_module_info.h | 1 - src/ipa/ipu3/ipu3.cpp | 1 - src/ipa/mali-c55/mali-c55.cpp | 1 - src/ipa/rkisp1/rkisp1.cpp | 1 - src/ipa/rpi/pisp/pisp.cpp | 1 - src/ipa/rpi/vc4/vc4.cpp | 1 - src/ipa/simple/soft_simple.cpp | 1 - src/ipa/vimc/vimc.cpp | 1 - src/libcamera/ipa_manager.cpp | 34 ++++++++++++++++++++++++++------ src/libcamera/ipa_module.cpp | 27 +++++++++++-------------- test/ipa/ipa_module_test.cpp | 3 --- 13 files changed, 54 insertions(+), 36 deletions(-) --- base-commit: f0f2aca56611bf9430eb6edc23e9bd55cf96a26d change-id: 20251002-ipa-match-by-name-82e6b34a23e9 Best regards,