[{"id":16028,"web_url":"https://patchwork.libcamera.org/comment/16028/","msgid":"<CAA2F3E433ZB.3S0AOLJ4CVBAO@notapiano>","date":"2021-03-29T19:00:55","subject":"Re: [libcamera-devel] [PATCH v4 0/3] lc-compliance: Add a libcamera\n\tcompliance tool","submitter":{"id":84,"url":"https://patchwork.libcamera.org/api/people/84/","name":"Nícolas F. R. A. Prado","email":"nfraprado@collabora.com"},"content":"Hi Niklas,\n\nRunning lc-compliance on the Rock Pi 4 with a imx219 camera fails for me,\nalthough I think this indicates a bug in the rkisp1 pipeline rather than in\nlc-compliance.\n\nI'm able to stream from the camera on this platform using cam.\n\nThese are my libcamera and kernel trees for reference:\n\nhttps://gitlab.collabora.com/nfraprado/libcamera/-/tree/lc-compliance\nhttps://gitlab.collabora.com/nfraprado/linux/-/tree/rockpi4-cam\n\nFirst of all, as already mentioned on\nhttps://patchwork.libcamera.org/cover/11542/#15629 , rkisp1 doesn't seem to\nsupport raw streaming, thus the following SEGFAULT occurs:\n\n\tuser@gst-build-sdk:~$ lc-compliance -c '/base/i2c@ff3d0000/sensor@10'\n\t[0:05:52.419438332] [336]  INFO Camera camera_manager.cpp:298 libcamera v0.0.0+2470-8029d912\n\t[0:05:52.442680790] [337]  WARN CameraSensor camera_sensor.cpp:306 'imx219 4-0010': Recommended V4L2 control 0x009a0922 not supported\n\t[0:05:52.442872415] [337]  WARN CameraSensor camera_sensor.cpp:358 'imx219 4-0010': The sensor kernel driver needs to be fixed\n\t[0:05:52.442946790] [337]  WARN CameraSensor camera_sensor.cpp:360 'imx219 4-0010': See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information\n\t[0:05:52.449002374] [337]  WARN CameraSensor camera_sensor.cpp:473 'imx219 4-0010': Failed to retrieve the camera location\n\tUsing camera /base/i2c@ff3d0000/sensor@10\n\t= Test role raw\n\t* Test single capture cycles\n\t[0:05:52.459568749] [336]  WARN RkISP1 rkisp1.cpp:537 Requested stream role not supported: 0\n\tSegmentation fault\n\nDisabling the raw streaming though, I now get a \"No BufferCache available to\nqueue.\" error:\n\n\tuser@gst-build-sdk:~$ lc-compliance -c '/base/i2c@ff3d0000/sensor@10'\n\t[0:01:19.542206077] [326]  INFO Camera camera_manager.cpp:298 libcamera v0.0.0+2469-229601cc\n\t[0:01:19.566360452] [327]  WARN CameraSensor camera_sensor.cpp:306 'imx219 4-0010': Recommended V4L2 control 0x009a0922 not supported\n\t[0:01:19.566502785] [327]  WARN CameraSensor camera_sensor.cpp:358 'imx219 4-0010': The sensor kernel driver needs to be fixed\n\t[0:01:19.566545660] [327]  WARN CameraSensor camera_sensor.cpp:360 'imx219 4-0010': SSee Documentation/sensor_driver_requirements.rst in the libcamera sources for more information\n\t[0:01:19.574099160] [327]  WARN CameraSensor camera_sensor.cpp:473 'imx219 4-0010': Failed to retrieve the camera location\n\tUsing camera /base/i2c@ff3d0000/sensor@10\n\t= Test role still\n\t* Test single capture cycles\n\t[0:01:19.585448577] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:19.587510869] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- SKIP: Camera needs 4 requests, can't test only 1\n\t[0:01:19.651448077] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:19.653177869] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- SKIP: Camera needs 4 requests, can't test only 2\n\t[0:01:19.714663619] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:19.716524952] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- SKIP: Camera needs 4 requests, can't test only 3\n\t[0:01:19.787002202] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:19.788506285] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 5 requests with 1 start cycles\n\t[0:01:20.442971911] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:20.444870327] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 8 requests with 1 start cycles\n\t[0:01:21.308764328] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:21.310607911] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 13 requests with 1 start cycles\n\t[0:01:22.508115453] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:22.509954953] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 21 requests with 1 start cycles\n\t[0:01:24.240576371] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:24.242428996] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 34 requests with 1 start cycles\n\t[0:01:26.839422081] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:26.841328081] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 55 requests with 1 start cycles\n\t[0:01:30.838071457] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:30.839926124] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 89 requests with 1 start cycles\n\t* Test multiple start/stop cycles\n\t[0:01:37.103226919] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:37.105141377] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- SKIP: Camera needs 4 requests, can't test only 1\n\t[0:01:37.175349669] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:37.177253044] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- SKIP: Camera needs 4 requests, can't test only 2\n\t[0:01:37.245730044] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:37.247179585] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- SKIP: Camera needs 4 requests, can't test only 3\n\t[0:01:37.310524961] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:37.312106044] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 5 requests with 3 start cycles\n\t[0:01:39.286329003] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:39.288254753] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 8 requests with 3 start cycles\n\t[0:01:41.875714796] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:41.877583088] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 13 requests with 3 start cycles\n\t[0:01:45.463695506] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:45.465565256] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 21 requests with 3 start cycles\n\t[0:01:50.632783759] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:50.635397967] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 34 requests with 3 start cycles\n\t[0:01:58.396298012] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:01:58.398886554] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 55 requests with 3 start cycles\n\t[0:02:10.352359601] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:02:10.354941726] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Balanced capture of 89 requests with 3 start cycles\n\t* Test unbalanced stop\n\t[0:02:29.101426527] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:02:29.103894902] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t- PASS: Unbalanced capture of 1 requests\n\t[0:02:29.482435069] [326]  INFO Camera camera.cpp:905 configuring streams: (0) 3280x2464-NV12\n\t[0:02:29.484985694] [327]  INFO IPARkISP1 rkisp1.cpp:127 Exposure: 4-3522 Gain: 1-232\n\t[0:02:29.969575319] [327] FATAL V4L2 v4l2_videodevice.cpp:1400 /dev/video0[13:cap]: No BufferCache available to queue.\n\tBacktrace:\n\t/usr/local/lib/libcamera.so(_ZN9libcamera15V4L2VideoDevice11queueBufferEPNS_11FrameBufferE+0xa8) [0x7fb33adfa8]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera10RkISP1Path11queueBufferEPNS_11FrameBufferE+0x24) [0x7fb33f0a7c]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera16RkISP1CameraData16queueFrameActionEjRKNS_3ipa6rkisp112RkISP1ActionE+0x110) [0x7fb33ed0f8]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera17BoundMethodMemberINS_16RkISP1CameraDataEvJjRKNS_3ipa6rkisp112RkISP1ActionEEE8activateEjS6_b+0x9c) [0x7fb33f4f9c]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera6SignalIJjRKNS_3ipa6rkisp112RkISP1ActionEEE4emitEjS5_+0x94) [0x7fb32e8f24]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera3ipa6rkisp114IPAProxyRkISP122queueFrameActionThreadEjRKNS1_12RkISP1ActionE+0x7c) [0x7fb32e7c2c]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera17BoundMethodMemberINS_3ipa6rkisp114IPAProxyRkISP1EvJjRKNS2_12RkISP1ActionEEE6invokeEjS6_+0x84) [0x7fb32eaf7c]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera15BoundMethodArgsIvJjRKNS_3ipa6rkisp112RkISP1ActionEEE10invokePackIJLm0ELm1EEEEvPNS_19BoundMethodPackBaseESt16integer_sequenceImJXspT_EEE+0x5c) [0x7fb32eb210]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera15BoundMethodArgsIvJjRKNS_3ipa6rkisp112RkISP1ActionEEE10invokePackEPNS_19BoundMethodPackBaseE+0x1c) [0x7fb32ead94]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera13InvokeMessage6invokeEv+0x44) [0x7fb3383b5c]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera6Object7messageEPNS_7MessageE+0x48) [0x7fb33840dc]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera6Thread16dispatchMessagesENS_7Message4TypeE+0x1fc) [0x7fb3398b98]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera3ipa6rkisp114IPAProxyRkISP110stopThreadEv+0xdc) [0x7fb32e6d40]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera3ipa6rkisp114IPAProxyRkISP14stopEv+0x30) [0x7fb32e6c50]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera21PipelineHandlerRkISP14stopEPNS_6CameraE+0x178) [0x7fb33ef484]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera17BoundMethodMemberINS_15PipelineHandlerEvJPNS_6CameraEEE6invokeES3_+0x7c) [0x7fb3308c50]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera15BoundMethodArgsIvJPNS_6CameraEEE10invokePackIJLm0EEEEvPNS_19BoundMethodPackBaseESt16integer_sequenceImJXspT_EEE+0x4c) [0x7fb33090cc]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera15BoundMethodArgsIvJPNS_6CameraEEE10invokePackEPNS_19BoundMethodPackBaseE+0x1c) [0x7fb3308bc8]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera13InvokeMessage6invokeEv+0x44) [0x7fb3383b5c]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera6Object7messageEPNS_7MessageE+0x48) [0x7fb33840dc]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera6Thread16dispatchMessagesENS_7Message4TypeE+0x1fc) [0x7fb3398b98]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera19EventDispatcherPoll13processEventsEv+0x20) [0x7fb33569c0]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera6Thread4execEv+0x78) [0x7fb3398164]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera13CameraManager7Private3runEv+0xbc) [0x7fb3309d9c]\n\t/usr/local/lib/libcamera.so(_ZN9libcamera6Thread11startThreadEv+0x100) [0x7fb33980e0]\n\t/usr/local/lib/libcamera.so(_ZSt13__invoke_implIvMN9libcamera6ThreadEFvvEPS1_JEET_St21__invoke_memfun_derefOT0_OT1_DpOT2_+0x78) [0x7fb339c554]\n\t/usr/local/lib/libcamera.so(_ZSt8__invokeIMN9libcamera6ThreadEFvvEJPS1_EENSt15__invoke_resultIT_JDpT0_EE4typeEOS6_DpOS7_+0x38) [0x7fb339c46c]\n\t/usr/local/lib/libcamera.so(_ZNSt6thread8_InvokerISt5tupleIJMN9libcamera6ThreadEFvvEPS3_EEE9_M_invokeIJLm0ELm1EEEEvSt12_Index_tupleIJXspT_EEE+0x3c) [0x7fb339c3d0]\n\t/usr/local/lib/libcamera.so(_ZNSt6thread8_InvokerISt5tupleIJMN9libcamera6ThreadEFvvEPS3_EEEclEv+0x14) [0x7fb339c388]\n\t/usr/local/lib/libcamera.so(_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJMN9libcamera6ThreadEFvvEPS4_EEEEE6_M_runEv+0x18) [0x7fb339c368]\n\tAborted\n\nThe comment in the code suggests that this is something that should be fixed in\nthe pipeline:\n\n\t/*\n\t * Pipeline handlers should not requeue buffers after releasing the\n\t * buffers on the device. Any occurence of this error should be fixed\n\t * in the pipeline handler directly.\n\t */\n\nAlso, just running it a second time after that error, a kernel panic occurs:\n\n\t[  195.788185] SError Interrupt on CPU1, code 0xbf000000 -- SError\n\t[  195.788205] CPU: 1 PID: 367 Comm: lc-compliance Not tainted 5.11.0-00001-g16b7543b296a #45\n\t[  195.788215] Hardware name: Radxa ROCK Pi 4A (DT)\n\t[  195.788224] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--)\n\t[  195.788231] pc : get_random_u64+0x28/0xd4\n\t[  195.788238] lr : copy_process+0x2e8/0x1260\n\t[  195.788245] sp : ffffffc012103c10\n\t[  195.788252] x29: ffffffc012103c10 x28: ffffff80050d5700 \n\t[  195.788273] x27: ffffffc011a90fc4 x26: ffffff800d804e80 \n\t[  195.788290] x25: ffffff800d804e80 x24: ffffffc012828000 \n\t[  195.788308] x23: ffffff80050d1d00 x22: ffffffc011a358d0 \n\t[  195.788326] x21: ffffffc012103db0 x20: 0000000000000000 \n\t[  195.788343] x19: 00000000003d0f00 x18: 0000000000000000 \n\t[  195.788361] x17: 0000000000000000 x16: 0000000000000000 \n\t[  195.788379] x15: 0000000000000000 x14: 0000000000000000 \n\t[  195.788397] x13: 0000000000000000 x12: 0000000000000000 \n\t[  195.788414] x11: 0000000000000000 x10: 0000000000000000 \n\t[  195.788432] x9 : ffffffc01003ea00 x8 : 0000000000000000 \n\t[  195.788450] x7 : 0000000000000000 x6 : ffffff80050d6580 \n\t[  195.788467] x5 : 0000000000000000 x4 : 0000000000000000 \n\t[  195.788485] x3 : 0000000000000000 x2 : 0000000000000000 \n\t[  195.788502] x1 : ffffffffffffffff x0 : 0000000000000027 \n\t[  195.788521] Kernel panic - not syncing: Asynchronous SError Interrupt\n\t[  195.788532] CPU: 1 PID: 367 Comm: lc-compliance Not tainted 5.11.0-00001-g16b7543b296a #45\n\t[  195.788541] Hardware name: Radxa ROCK Pi 4A (DT)\n\t[  195.788548] Call trace:\n\t[  195.788554]  dump_backtrace+0x0/0x1b4\n\t[  195.788560]  show_stack+0x24/0x34\n\t[  195.788566]  dump_stack+0xcc/0x10c\n\t[  195.788573]  panic+0x170/0x348\n\t[  195.788579]  nmi_panic+0x7c/0xa0\n\t[  195.788585]  arm64_serror_panic+0x7c/0x88\n\t[  195.788592]  do_serror+0x2c/0x68\n\t[  195.788598]  el1_error+0x78/0xf0\n\t[  195.788604]  get_random_u64+0x28/0xd4\n\t[  195.788611]  copy_process+0x2e8/0x1260\n\t[  195.788617]  kernel_clone+0xa8/0x2b0\n\t[  195.788624]  __do_sys_clone+0x58/0x80\n\t[  195.788631]  __arm64_sys_clone+0x28/0x34\n\t[  195.788638]  el0_svc_common.constprop.0+0x114/0x188\n\t[  195.788645]  do_el0_svc+0x8c/0x98\n\t[  195.788651]  el0_svc+0x20/0x30\n\t[  195.788658]  el0_sync_handler+0x144/0x1f0\n\t[  195.788664]  el0_sync+0x174/0x180\n\t[  195.788713] SMP: stopping secondary CPUs\n\t[  195.788721] Kernel Offset: disabled\n\t[  195.788728] CPU features: 0x00040022,6100200c\n\t[  195.788735] Memory Limit: none\n\nJust thought I'd document these issues in case it's reproducible by others as\nwell.\n\nThanks,\nNícolas","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 78F5CC32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 29 Mar 2021 19:20:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 06E4268783;\n\tMon, 29 Mar 2021 21:20:58 +0200 (CEST)","from bhuna.collabora.co.uk (bhuna.collabora.co.uk\n\t[IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E600E68782\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Mar 2021 21:20:55 +0200 (CEST)","from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: nfraprado) with ESMTPSA id D97B91F4549E"],"Mime-Version":"1.0","From":"=?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\t<libcamera-devel@lists.libcamera.org>","Date":"Mon, 29 Mar 2021 16:00:55 -0300","Message-Id":"<CAA2F3E433ZB.3S0AOLJ4CVBAO@notapiano>","In-Reply-To":"<20210329170250.937120-1-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v4 0/3] lc-compliance: Add a libcamera\n\tcompliance tool","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16029,"web_url":"https://patchwork.libcamera.org/comment/16029/","msgid":"<YGJXxUyms1jeZu2Y@pendragon.ideasonboard.com>","date":"2021-03-29T22:42:13","subject":"Re: [libcamera-devel] [PATCH v4 1/3] meson: Move libevent\n\tdependency lookup","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Mon, Mar 29, 2021 at 07:02:48PM +0200, Niklas Söderlund wrote:\n> The libevent library will be needed by both cam and the soon to be added\n> lc-compliacne tool. Move the dependency lookup to a shared meson file to\n\ns/compliacne/compliance/ (libcamera doesn't address skin issues yet)\n\n> avoid having to look it up twice.\n> \n> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/cam/meson.build | 2 --\n>  src/meson.build     | 2 ++\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/cam/meson.build b/src/cam/meson.build\n> index 5e1a7f387d60a98f..13e6201a08a214cf 100644\n> --- a/src/cam/meson.build\n> +++ b/src/cam/meson.build\n> @@ -1,7 +1,5 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n> -libevent = dependency('libevent_pthreads', required : get_option('cam'))\n> -\n>  if not libevent.found()\n\nThis is a bit of an annoying once, as if the 'cam' option is set to\nenabled, it shouldn't be disabled silently. The cam option is new, so\nthe problem didn't occur before.\n\nWe could print an error message manually here if the 'cam' option is set\nto enabled, but that's not great. I'm tempted to keep the code as-is and\nduplicate the dependency() in the lc-compliance meson.build.\n\nSorry for the bad suggestion.\n\n>      cam_enabled = false\n>      subdir_done()\n> diff --git a/src/meson.build b/src/meson.build\n> index c908b0675773301d..14c49f6eeb1f5a01 100644\n> --- a/src/meson.build\n> +++ b/src/meson.build\n> @@ -11,6 +11,8 @@ else\n>      ipa_sign_module = false\n>  endif\n>  \n> +libevent = dependency('libevent_pthreads', required : false)\n> +\n>  libcamera_objects = []\n>  \n>  # The 'android' subdir must be processed first, and the build targets","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 B667EC32F0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 29 Mar 2021 22:43:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BEE4A68784;\n\tTue, 30 Mar 2021 00:42:59 +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 23D6F6084F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Mar 2021 00:42:58 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 80147292;\n\tTue, 30 Mar 2021 00:42:57 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"YlxEppY+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1617057777;\n\tbh=HsapinV//L89etkAZxb1WqOuSjv4VRvK1r8PNzP6+9M=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=YlxEppY+T3K4VKm0v7JKGteOT6Lne0BR7TxveUnkQuK/RvgAl2ebbRe36j44cmv3N\n\tkFK3EDipiwe7RWQPlTb3YkekXyK/jQ9vba3maRCRgmeVkLjv3CJQba1zJubEKT8WPd\n\t5k/6lJ+wlZro3MlCxvCbANWU+zufeR62T2CqdNWU=","Date":"Tue, 30 Mar 2021 01:42:13 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<YGJXxUyms1jeZu2Y@pendragon.ideasonboard.com>","References":"<20210329170250.937120-1-niklas.soderlund@ragnatech.se>\n\t<20210329170250.937120-2-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210329170250.937120-2-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v4 1/3] meson: Move libevent\n\tdependency lookup","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]