[{"id":34250,"web_url":"https://patchwork.libcamera.org/comment/34250/","msgid":"<20250515222712.GE12492@pendragon.ideasonboard.com>","date":"2025-05-15T22:27:12","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Milan,\n\nThank you for the patch.\n\nOn Thu, May 15, 2025 at 06:25:36PM +0200, Milan Zamazal wrote:\n> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n> device that can be opened and that doesn't fail when asked about\n> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n> supported by the device).\n> \n> There can be matching devices that are not display devices.  This can\n\nCan you share an example of such a device ? Are we talking about a\ndevice that sets DRIVER_MODESET but is not a display device ?\n\n> lead to selection of such a device and inability to use KMS output with\n> `cam' application.  The ultimate goal is to display something on the\n> device and later the KMS sink will fail if there is no connector\n> attached to the device (although it can actually fail earlier, when\n> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n> supported).  Let's avoid selecting devices without connectors.\n> \n> A question is whether the added check makes the check for\n> DRM_CAP_DUMB_BUFFER API redundant or not.\n> \n> Changes in v2:\n> - Rebased on current master.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/apps/cam/drm.cpp | 12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n> \n> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n> index 47bbb6b0..e19e848c 100644\n> --- a/src/apps/cam/drm.cpp\n> +++ b/src/apps/cam/drm.cpp\n> @@ -479,6 +479,18 @@ int Device::openCard()\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> +\t\t/* Skip devices without connectors. */\n> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n> +\t\t\tdrmModeGetResources(fd_),\n> +\t\t\t&drmModeFreeResources\n> +\t\t};\n> +\t\tif (!resources || resources->count_connectors <= 0) {\n> +\t\t\tresources.reset();\n> +\t\t\tdrmClose(fd_);\n> +\t\t\tfd_ = -1;\n> +\t\t\tcontinue;\n> +\t\t}\n> +\n>  \t\tfound = true;\n>  \t\tbreak;\n>  \t}","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 9A2B2C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 May 2025 22:27:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78D8968B70;\n\tFri, 16 May 2025 00:27:21 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B60876175B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 May 2025 00:27:19 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cust-east-par-46-193-72-226.cust.wifirst.net [46.193.72.226])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 483396DC;\n\tFri, 16 May 2025 00:27:02 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"CcJt2FoA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747348022;\n\tbh=5vlWCH9Z7J0PAneWPt3rM6x8HuM1RkUKNcOduMIrrPQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CcJt2FoAbeXXICOlC2mPHufDyDMVMxNg+2ondOrMDUzmd4rzi23J2ym+m82tJfK6X\n\t9TkkUT2iI48nJDQtSGBUDOPdpDpfsPHqlpSjtzmFjeN2O8Vw91snMdOdHsOXtwSQUq\n\tN4C5ZrnziaXMMlIH0D8DLTdYRriF4zwS10H1POEo=","Date":"Fri, 16 May 2025 00:27:12 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","Message-ID":"<20250515222712.GE12492@pendragon.ideasonboard.com>","References":"<20250515162536.131131-1-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250515162536.131131-1-mzamazal@redhat.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34261,"web_url":"https://patchwork.libcamera.org/comment/34261/","msgid":"<85o6vsio2j.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-05-16T15:15:48","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Laurent,\n\nLaurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> Hi Milan,\n>\n> Thank you for the patch.\n>\n> On Thu, May 15, 2025 at 06:25:36PM +0200, Milan Zamazal wrote:\n>> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n>> device that can be opened and that doesn't fail when asked about\n>> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n>> supported by the device).\n>> \n>> There can be matching devices that are not display devices.  This can\n>\n> Can you share an example of such a device ? Are we talking about a\n> device that sets DRIVER_MODESET but is not a display device ?\n\nI guess so.  I have the following on TI AM69:\n\n  # ls -l /dev/dri/\n  total 0\n  drwxr-xr-x 2 root root        100 Mar  7 01:00 by-path/\n  crw-rw---- 1 root video  226,   0 Mar  7 01:00 card0\n  crw-rw---- 1 root video  226,   1 Mar  7 01:00 card1\n  crw-rw-rw- 1 root render 226, 128 Mar  7 01:00 renderD128\n\n  # ls -l /sys/class/drm/\n  total 0\n  lrwxrwxrwx 1 root root    0 Mar  7 01:00 card0 -> '../../devices/platform/bus@100000/4a00000.dss/drm/card0'/\n  lrwxrwxrwx 1 root root    0 Mar  7 01:00 card0-DP-1 -> '../../devices/platform/bus@100000/4a00000.dss/drm/card0/card0-DP-1'/\n  lrwxrwxrwx 1 root root    0 Mar  7 01:00 card0-HDMI-A-1 -> '../../devices/platform/bus@100000/4a00000.dss/drm/card0/card0-HDMI-A-1'/\n  lrwxrwxrwx 1 root root    0 May 16 14:31 card1 -> '../../devices/platform/bus@100000/4e20000000.gpu/drm/card1'/\n  lrwxrwxrwx 1 root root    0 May 16 14:31 renderD128 -> '../../devices/platform/bus@100000/4e20000000.gpu/drm/renderD128'/\n  -r--r--r-- 1 root root 4096 May 16 16:49 version\n\ncard1 causes the problem.\n\n>> lead to selection of such a device and inability to use KMS output with\n>> `cam' application.  The ultimate goal is to display something on the\n>> device and later the KMS sink will fail if there is no connector\n>> attached to the device (although it can actually fail earlier, when\n>> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n>> supported).  Let's avoid selecting devices without connectors.\n>> \n>> A question is whether the added check makes the check for\n>> DRM_CAP_DUMB_BUFFER API redundant or not.\n>> \n>> Changes in v2:\n>> - Rebased on current master.\n>> \n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/apps/cam/drm.cpp | 12 ++++++++++++\n>>  1 file changed, 12 insertions(+)\n>> \n>> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n>> index 47bbb6b0..e19e848c 100644\n>> --- a/src/apps/cam/drm.cpp\n>> +++ b/src/apps/cam/drm.cpp\n>> @@ -479,6 +479,18 @@ int Device::openCard()\n>>  \t\t\tcontinue;\n>>  \t\t}\n>>  \n>> +\t\t/* Skip devices without connectors. */\n>> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n>> +\t\t\tdrmModeGetResources(fd_),\n>> +\t\t\t&drmModeFreeResources\n>> +\t\t};\n>> +\t\tif (!resources || resources->count_connectors <= 0) {\n>> +\t\t\tresources.reset();\n>> +\t\t\tdrmClose(fd_);\n>> +\t\t\tfd_ = -1;\n>> +\t\t\tcontinue;\n>> +\t\t}\n>> +\n>>  \t\tfound = true;\n>>  \t\tbreak;\n>>  \t}","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 9F488BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 May 2025 15:15:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CE76868B70;\n\tFri, 16 May 2025 17:15:57 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DD9A568B66\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 May 2025 17:15:55 +0200 (CEST)","from mail-ed1-f69.google.com (mail-ed1-f69.google.com\n\t[209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-413-EzZu3SIfO9usJpwy9NvRjQ-1; Fri, 16 May 2025 11:15:52 -0400","by mail-ed1-f69.google.com with SMTP id\n\t4fb4d7f45d1cf-5fbf31ae1b7so1804611a12.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 May 2025 08:15:52 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t4fb4d7f45d1cf-6004d502736sm1581887a12.25.2025.05.16.08.15.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 16 May 2025 08:15:49 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"VLepMr97\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1747408554;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=6uRzWfzQBf0qj3mjvW/gx6Ro+i1O0fqcnHP3UkxhloU=;\n\tb=VLepMr97eud3w3MgeIrq6h+Qh5C+TTXo47oQGUdHkpTtt4QotxQLas3Ax+gW+xFAbBnvrL\n\tB392glUdBj2oEAN9Xl1X0rZcPMfg5mhYPkYfnlI1EAthAZQhtJ0CPF5B3KVa6p9jbYFEEl\n\tD2IQbJY9c6OSrZCWSeC1pYfETv/+gXc=","X-MC-Unique":"EzZu3SIfO9usJpwy9NvRjQ-1","X-Mimecast-MFC-AGG-ID":"EzZu3SIfO9usJpwy9NvRjQ_1747408551","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1747408551; x=1748013351;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=6uRzWfzQBf0qj3mjvW/gx6Ro+i1O0fqcnHP3UkxhloU=;\n\tb=HCUrLW9a/feRF9VIlpjEaw8TA9v+6Y5TS6VgD9r+RV0IeDpMFs/nXNi3ZdX+XP+omi\n\tUyq61TBo8gs3NQ9cc+WUaMbL0u7lPbrP/5fe7K8q2h6gbxdMd7S1HXhrKta7nqSRSCAX\n\trPVfw/5z6H3RkwgaYlNKOLI348F1eLncdKfqMIsFhSlFYHpCktCFcRSB3WvqVuCcw0Vn\n\tmY3mQ4MiHMSItOp6vMpPYyA++O7IStWgN/s5BvvmGooqrh95EbKTwiDkhk7IUfiwDn5l\n\t9DehZZSenvqZaHbxXxWzTeQrUxCgZdHAMJf22tB8Ky/AVam6QBwu5y1IVhLLhmwkJnqp\n\tpoew==","X-Gm-Message-State":"AOJu0Yy8bhG1wDScaYZSwYHfPVxLhvhqS0o+1sEaJLcprXmBig3wNP/P\n\tNGDCifM+FhAOizrkGswNk8rXh3KiPeaS2/GUxL8s4f/dfkc+NqCy5mAupeedIzR5OF+/lYpiSSN\n\tl9Sfzx49He1QrZmt+1UGRjfbo1jun7jPpsY0ZeGNploFLM54m46PlpaDhk1SMvCTe05V2zO0fdg\n\tFCYIVw+bGLSltuzos67+jNA73YRnV8+pZnEOpXsEtP+M477z0HIvo80vLJBp0=","X-Gm-Gg":"ASbGncttF9aW/lxnWCXOiqa2FrHPlkP0s7Vr43lrKTAImiqlwCVfKJWhiaf0TnU3Xdz\n\tPkwHHfYZ2WAfYeO9wxvxnNzpxU88KSAmMyeSY+aRX3UE7wp31fhnJCBhcZ57b5UhEj7I0XwZ2pN\n\t73p3dVXyMAtHUnKd8FX5rcYz2FZaD8c8wBmKqgHgRT/r7YNmGAgWs8IwVADkjvSc5c1dpBOXUo6\n\t0CULyOJksnjOEX57M1S5RAdFNXhmShkLdlI1SViDCk+/F1vUbqYVxz3atikGsu2wY2qddrM5XJ+\n\tLOZYS/Es3OpUkDIOrpz/ByIsX8MMAm2UAQRZPdw/qOw3q55pHeeazRbsoRwgsW1l","X-Received":["by 2002:a05:6402:35ca:b0:5fb:1be2:270d with SMTP id\n\t4fb4d7f45d1cf-60090112f44mr2815449a12.29.1747408550740; \n\tFri, 16 May 2025 08:15:50 -0700 (PDT)","by 2002:a05:6402:35ca:b0:5fb:1be2:270d with SMTP id\n\t4fb4d7f45d1cf-60090112f44mr2815416a12.29.1747408550182; \n\tFri, 16 May 2025 08:15:50 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IFWyMlIUmek86k7cY8h5uSMA+rAxOvzYfEC6B5TWPccs6ZOCg6Awjxntm4mmShdbh6eV2bofQ==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","In-Reply-To":"<20250515222712.GE12492@pendragon.ideasonboard.com> (Laurent\n\tPinchart's message of \"Fri, 16 May 2025 00:27:12 +0200\")","References":"<20250515162536.131131-1-mzamazal@redhat.com>\n\t<20250515222712.GE12492@pendragon.ideasonboard.com>","Date":"Fri, 16 May 2025 17:15:48 +0200","Message-ID":"<85o6vsio2j.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"FyoqkErR-v1pKaHzF-Fot5do_GGPzkPo1DBmH4h8X7M_1747408551","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34366,"web_url":"https://patchwork.libcamera.org/comment/34366/","msgid":"<87frgpug4k.fsf@kernel.org>","date":"2025-05-28T11:30:35","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":228,"url":"https://patchwork.libcamera.org/api/people/228/","name":null,"email":"Mattijs@ideasonboard.com, \"Korpershoek <mkorpershoek\"@kernel.org"},"content":"Hi Milan,\n\nThank you for the patch.\n\nOn jeu., mai 15, 2025 at 18:25, Milan Zamazal <mzamazal@redhat.com> wrote:\n\n> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n> device that can be opened and that doesn't fail when asked about\n> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n> supported by the device).\n>\n> There can be matching devices that are not display devices.  This can\n> lead to selection of such a device and inability to use KMS output with\n> `cam' application.  The ultimate goal is to display something on the\n> device and later the KMS sink will fail if there is no connector\n> attached to the device (although it can actually fail earlier, when\n> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n> supported).  Let's avoid selecting devices without connectors.\n>\n> A question is whether the added check makes the check for\n> DRM_CAP_DUMB_BUFFER API redundant or not.\n>\n> Changes in v2:\n> - Rebased on current master.\n>\n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/apps/cam/drm.cpp | 12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n>\n> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n> index 47bbb6b0..e19e848c 100644\n> --- a/src/apps/cam/drm.cpp\n> +++ b/src/apps/cam/drm.cpp\n> @@ -479,6 +479,18 @@ int Device::openCard()\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> +\t\t/* Skip devices without connectors. */\n\nThis makes me think of what drm_hwcomposer does [1] with\nthe IsKMSDev() check.\n\nThe commit [2] introducing IsKMSDev() also gives some\nadditional justification which might be useful to include (gpu devices\nbeing a different /dev/dri card).\n\n> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n> +\t\t\tdrmModeGetResources(fd_),\n> +\t\t\t&drmModeFreeResources\n> +\t\t};\n> +\t\tif (!resources || resources->count_connectors <= 0) {\n\nShould we also check for count_crtcs and count_encoders ?\n\n> +\t\t\tresources.reset();\n> +\t\t\tdrmClose(fd_);\n> +\t\t\tfd_ = -1;\n> +\t\t\tcontinue;\n> +\t\t}\n> +\n\nRegards,\nMattijs\n\n[1] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/blob/main/drm/DrmDevice.cpp?ref_type=heads#L234\n[2] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/commit/ec75ccd0735213423d6cf89409f8a3bfdaeddcee\n\n>  \t\tfound = true;\n>  \t\tbreak;\n>  \t}\n> -- \n> 2.49.0","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 80CE0C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 May 2025 11:30:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5EFFC68DA1;\n\tWed, 28 May 2025 13:30:42 +0200 (CEST)","from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EE18C614CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 13:30:39 +0200 (CEST)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby sea.source.kernel.org (Postfix) with ESMTP id 206CF439FD;\n\tWed, 28 May 2025 11:30:38 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id A2882C4CEE7;\n\tWed, 28 May 2025 11:30:37 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"SJHb9UAA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1748431838;\n\tbh=wef29P+WVy7VrJJCCOaa0QO+THP/Gl30x7D7y92sYsA=;\n\th=From:To:Cc:Subject:In-Reply-To:References:Date:From;\n\tb=SJHb9UAACtuez1xEnXm30qcLrTz95CSMrC4axlxOMUBBu3mm5PEXiDGj6Xka/xfxi\n\tIrSEuvn5TEa37NsC3MpmJ2Ug8U74BWofcb34IZoyqAA1ZarIu8peDSGXFs6n/a/O0R\n\tkgRWlflBV22n0ehyR0812TQqT03D9GSM+XV9Wkap2qdRJPh9STNiX/Pn3vLLAK0rF7\n\tk8E9vocQrNVRhAbutvkbVJsnMfRMlDWA/wqpMrxW7y19kcULmn5kZmVHDbooD8xGbc\n\tvy0+moHJ9oRm1u8rRKSZbzHjGurcOovSM3RsWMAFz1kzO7uAM3UQxgPcZB/yhejqxD\n\tyduyePAUj9cdw==","From":"Mattijs@ideasonboard.com,\n\t\"Korpershoek <mkorpershoek\"@kernel.org","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","In-Reply-To":"<20250515162536.131131-1-mzamazal@redhat.com>","References":"<20250515162536.131131-1-mzamazal@redhat.com>","Date":"Wed, 28 May 2025 13:30:35 +0200","Message-ID":"<87frgpug4k.fsf@kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34368,"web_url":"https://patchwork.libcamera.org/comment/34368/","msgid":"<87cybsvpdf.fsf@kernel.org>","date":"2025-05-28T13:25:32","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":229,"url":"https://patchwork.libcamera.org/api/people/229/","name":"Mattijs Korpershoek","email":"mkorpershoek@kernel.org"},"content":"On mer., mai 28, 2025 at 13:30, Mattijs@ideasonboard.com,\t\"Korpershoek <mkorpershoek\"@kernel.org wrote:\n\nI don't know what went wrong, but I think I forgot a trailing '>' in\nthe From: section of the email.\n\nSorry about that.\n\n> Hi Milan,\n>\n> Thank you for the patch.\n>\n> On jeu., mai 15, 2025 at 18:25, Milan Zamazal <mzamazal@redhat.com> wrote:\n>\n>> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n>> device that can be opened and that doesn't fail when asked about\n>> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n>> supported by the device).\n>>\n>> There can be matching devices that are not display devices.  This can\n>> lead to selection of such a device and inability to use KMS output with\n>> `cam' application.  The ultimate goal is to display something on the\n>> device and later the KMS sink will fail if there is no connector\n>> attached to the device (although it can actually fail earlier, when\n>> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n>> supported).  Let's avoid selecting devices without connectors.\n>>\n>> A question is whether the added check makes the check for\n>> DRM_CAP_DUMB_BUFFER API redundant or not.\n>>\n>> Changes in v2:\n>> - Rebased on current master.\n>>\n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/apps/cam/drm.cpp | 12 ++++++++++++\n>>  1 file changed, 12 insertions(+)\n>>\n>> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n>> index 47bbb6b0..e19e848c 100644\n>> --- a/src/apps/cam/drm.cpp\n>> +++ b/src/apps/cam/drm.cpp\n>> @@ -479,6 +479,18 @@ int Device::openCard()\n>>  \t\t\tcontinue;\n>>  \t\t}\n>>  \n>> +\t\t/* Skip devices without connectors. */\n>\n> This makes me think of what drm_hwcomposer does [1] with\n> the IsKMSDev() check.\n>\n> The commit [2] introducing IsKMSDev() also gives some\n> additional justification which might be useful to include (gpu devices\n> being a different /dev/dri card).\n>\n>> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n>> +\t\t\tdrmModeGetResources(fd_),\n>> +\t\t\t&drmModeFreeResources\n>> +\t\t};\n>> +\t\tif (!resources || resources->count_connectors <= 0) {\n>\n> Should we also check for count_crtcs and count_encoders ?\n>\n>> +\t\t\tresources.reset();\n>> +\t\t\tdrmClose(fd_);\n>> +\t\t\tfd_ = -1;\n>> +\t\t\tcontinue;\n>> +\t\t}\n>> +\n>\n> Regards,\n> Mattijs\n>\n> [1] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/blob/main/drm/DrmDevice.cpp?ref_type=heads#L234\n> [2] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/commit/ec75ccd0735213423d6cf89409f8a3bfdaeddcee\n>\n>>  \t\tfound = true;\n>>  \t\tbreak;\n>>  \t}\n>> -- \n>> 2.49.0","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 DF716C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 May 2025 13:25:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C2B5768DA1;\n\tWed, 28 May 2025 15:25:37 +0200 (CEST)","from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5618F614CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 15:25:36 +0200 (CEST)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby nyc.source.kernel.org (Postfix) with ESMTP id 2561DA4F9F1;\n\tWed, 28 May 2025 13:25:35 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 7F1B4C4CEE7;\n\tWed, 28 May 2025 13:25:34 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"b1i3I0ZM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1748438734;\n\tbh=lrkMebmuidK69mIoucNjTcbg/IQKwB/ELDzg37yrJSI=;\n\th=From:To:Cc:Subject:In-Reply-To:References:Date:From;\n\tb=b1i3I0ZMgOYDgW6ovHQbQUSZIMZbo9vwl/gbWz16kYKsm7A2Lkd0ol1lxBrjSe4og\n\t1Ly28sV4YO+zye9jktGoMZtDmnmtHKCP26geK6r+KD4NydhbWDl5wlHKsB+zcOMa4a\n\t64sfANzsDPUksbbAPbwudILrUHg0ixmUG6W7v4JHDKJkphcgxRb8bRfDcT8mMtipKz\n\tSQGtst74l6ANzeSbkokbOoYOWWT64g0ARyqgLZwBsB8tvdxakr/DjQv95omJCFwVPn\n\tihL0v5wHY9XpunSw92YqX083Q0N25I0K8nUFd38uho4wDCYQm/E4f8Q05UxKPIfSvv\n\t02zNFlzObsFqA==","From":"Mattijs Korpershoek <mkorpershoek@kernel.org>","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","In-Reply-To":"<87frgpug4k.fsf@kernel.org>","References":"<20250515162536.131131-1-mzamazal@redhat.com>\n\t<87frgpug4k.fsf@kernel.org>","Date":"Wed, 28 May 2025 15:25:32 +0200","Message-ID":"<87cybsvpdf.fsf@kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34370,"web_url":"https://patchwork.libcamera.org/comment/34370/","msgid":"<85plfsdd47.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-05-28T14:27:36","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Mattijs,\n\nthank you for review.\n\nMattijs Korpershoek <mkorpershoek@kernel.org writes:\n\n> Hi Milan,\n>\n> Thank you for the patch.\n>\n> On jeu., mai 15, 2025 at 18:25, Milan Zamazal <mzamazal@redhat.com> wrote:\n>\n>> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n>> device that can be opened and that doesn't fail when asked about\n>> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n>> supported by the device).\n>>\n>> There can be matching devices that are not display devices.  This can\n>> lead to selection of such a device and inability to use KMS output with\n>> `cam' application.  The ultimate goal is to display something on the\n>> device and later the KMS sink will fail if there is no connector\n>> attached to the device (although it can actually fail earlier, when\n>> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n>> supported).  Let's avoid selecting devices without connectors.\n>>\n>> A question is whether the added check makes the check for\n>> DRM_CAP_DUMB_BUFFER API redundant or not.\n>>\n>> Changes in v2:\n>> - Rebased on current master.\n>>\n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/apps/cam/drm.cpp | 12 ++++++++++++\n>>  1 file changed, 12 insertions(+)\n>>\n>> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n>> index 47bbb6b0..e19e848c 100644\n>> --- a/src/apps/cam/drm.cpp\n>> +++ b/src/apps/cam/drm.cpp\n>> @@ -479,6 +479,18 @@ int Device::openCard()\n>>  \t\t\tcontinue;\n>>  \t\t}\n>>  \n>> +\t\t/* Skip devices without connectors. */\n>\n> This makes me think of what drm_hwcomposer does [1] with\n> the IsKMSDev() check.\n>\n> The commit [2] introducing IsKMSDev() also gives some\n> additional justification which might be useful to include (gpu devices\n> being a different /dev/dri card).\n\nI see, a good example, thank you.\n\n>> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n>> +\t\t\tdrmModeGetResources(fd_),\n>> +\t\t\t&drmModeFreeResources\n>> +\t\t};\n>> +\t\tif (!resources || resources->count_connectors <= 0) {\n>\n> Should we also check for count_crtcs and count_encoders ?\n\nBased on the commit you mentioned, probably yes and it (still) works for\nme.  Unless there are objections, I'll update the patch accordingly.\n\n>> +\t\t\tresources.reset();\n>> +\t\t\tdrmClose(fd_);\n>> +\t\t\tfd_ = -1;\n>> +\t\t\tcontinue;\n>> +\t\t}\n>> +\n>\n> Regards,\n> Mattijs\n>\n> [1] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/blob/main/drm/DrmDevice.cpp?ref_type=heads#L234\n> [2] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/commit/ec75ccd0735213423d6cf89409f8a3bfdaeddcee\n>\n>>  \t\tfound = true;\n>>  \t\tbreak;\n>>  \t}\n>> -- \n>> 2.49.0","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 E2C0BC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 May 2025 14:27:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 93BE368DA0;\n\tWed, 28 May 2025 16:27:43 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CACA614CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 16:27:42 +0200 (CEST)","from mail-ed1-f71.google.com (mail-ed1-f71.google.com\n\t[209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-658-Y0fNwmP0OBqUTj6_4U742g-1; Wed, 28 May 2025 10:27:40 -0400","by mail-ed1-f71.google.com with SMTP id\n\t4fb4d7f45d1cf-604e82a5d37so2280370a12.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 07:27:39 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t4fb4d7f45d1cf-6051d5f2290sm840751a12.19.2025.05.28.07.27.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 28 May 2025 07:27:37 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"OMuuv+tf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1748442461;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=c6+/gV94GvAdN/duSR3euXQujaoUw7+VHmETpemi7rY=;\n\tb=OMuuv+tf1+g1mdqzatTUD6PfsexbGnFqY9JZ3vwlKBspTFmH2Phjjl2icPJ1mri1HlWN2J\n\terQ1L2rd/TT+XRxoOCBs5vO2d52En5wmnguwL5wqVUET5Jp6tEtvGFcHH4+9kjiHenjceV\n\t0NjkvH7poBhnwMEkhuGqXD24ApBwVWY=","X-MC-Unique":"Y0fNwmP0OBqUTj6_4U742g-1","X-Mimecast-MFC-AGG-ID":"Y0fNwmP0OBqUTj6_4U742g_1748442459","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1748442458; x=1749047258;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=c6+/gV94GvAdN/duSR3euXQujaoUw7+VHmETpemi7rY=;\n\tb=LrZEP5EubC3s7WlVUv2P8RHtU2pj51Fb6q5SQyweK/SIhWaLzzg+oAZ9DYUu+TavW+\n\trul2xSCG8EAKoKG3OkcHdc5CDiY1vTy3IUhCBv+QW5R7JFiRo8fshjZZt97okNAH4nev\n\tfMxjIrQkL7lnsEH67Wj0f7Hl8+fGNUQnKpc3dkEX9+0xZz+8pAPEG+rzryUbFALkn5H2\n\t/tmYMxwqPCD0eutVoEDToyXmiEVSIKhJjs5Tn2fGzlyEKTXqPyqR/J2abpsBUTySI042\n\txtrriYuUjIHhtVvKaf7tgrOjG1D75MvUe2oa2GpkViHPoGserdGwxq7vUCVKasd/9Wbb\n\tLmEQ==","X-Gm-Message-State":"AOJu0Yx+niGXwgGwYQd84u8xBsXE63QAXUAn3ajSs3mQhIJrIDC3a26j\n\tH1gUbkpCnP6Rd8AcDKVq40M0SX2rj3TAp/pSZD/RapAhXfMmk3CRtfUfWKqsCtMhahVBBeWKZ9o\n\tPm8+MNeSpapoopeQThCcbkJFbkEnqGQTvEy5xxdTJ90OAAUMNsN1opOfqq0RKL5xuDDVTckXoEE\n\tkHdHRL8SJDxmkDEGwaPwij62NbJHiQ2uLFpMZIiNltq7/S+w4dzV3HEygx9nI=","X-Gm-Gg":"ASbGncsab8Rl0wyVo5e16w5cdoVo1kVQSlQrhc06phTx4mzkC4QxmoLGQjrypiylgKA\n\tcyqcwbn5wjHtmSuL8SXmYJ5chkiz0sh0msHqNIyguxGuIfGGH41VY5mLHPHz/42MqhS81f46tPl\n\tYgLlmW809cRoYr8208tsLxlZPKakUNbFheLL7xPYkCLY3nPhYe/nLdVlqOp7k+2408GmBEXiV/a\n\tZuaFP8rVFJc38e0akCJtmfWLXaOxGrie+6reY3vkla1TmW51eN6ERIB2LxIhpSwuKd2+CgRovxp\n\tL/gTc14ZkY8GqC9C1Qsubj+tqo/AQOCDzXarXH4nc+KW9pLd7aZR2YwYMpoaeVYL","X-Received":["by 2002:a05:6402:510b:b0:601:94ab:790c with SMTP id\n\t4fb4d7f45d1cf-6051c3919d7mr2190571a12.18.1748442458460; \n\tWed, 28 May 2025 07:27:38 -0700 (PDT)","by 2002:a05:6402:510b:b0:601:94ab:790c with SMTP id\n\t4fb4d7f45d1cf-6051c3919d7mr2190539a12.18.1748442457995; \n\tWed, 28 May 2025 07:27:37 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IHBiKGGC3p8/RAg2bEwtQrjcWSXvP4ZLjgqbbelFRr4N2A7iwrGwoNFvmjWTEj3SP/RvQgF5g==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Mattijs Korpershoek <mkorpershoek@kernel.org>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","In-Reply-To":"<87frgpug4k.fsf@kernel.org> (Mattijs Korpershoek's message of\n\t\"Wed, 28 May 2025 13:30:35 +0200\")","References":"<20250515162536.131131-1-mzamazal@redhat.com>\n\t<87frgpug4k.fsf@kernel.org>","Date":"Wed, 28 May 2025 16:27:36 +0200","Message-ID":"<85plfsdd47.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"wLtagdiDcFQyn7D_ox0JonEegFfrV8QDJQAFy3NfUzs_1748442459","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34372,"web_url":"https://patchwork.libcamera.org/comment/34372/","msgid":"<20250528143713.GP12492@pendragon.ideasonboard.com>","date":"2025-05-28T14:37:13","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, May 16, 2025 at 05:15:48PM +0200, Milan Zamazal wrote:\n> Laurent Pinchart writes:\n> > On Thu, May 15, 2025 at 06:25:36PM +0200, Milan Zamazal wrote:\n> >> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n> >> device that can be opened and that doesn't fail when asked about\n> >> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n> >> supported by the device).\n> >> \n> >> There can be matching devices that are not display devices.  This can\n> >\n> > Can you share an example of such a device ? Are we talking about a\n> > device that sets DRIVER_MODESET but is not a display device ?\n> \n> I guess so.  I have the following on TI AM69:\n> \n>   # ls -l /dev/dri/\n>   total 0\n>   drwxr-xr-x 2 root root        100 Mar  7 01:00 by-path/\n>   crw-rw---- 1 root video  226,   0 Mar  7 01:00 card0\n>   crw-rw---- 1 root video  226,   1 Mar  7 01:00 card1\n>   crw-rw-rw- 1 root render 226, 128 Mar  7 01:00 renderD128\n> \n>   # ls -l /sys/class/drm/\n>   total 0\n>   lrwxrwxrwx 1 root root    0 Mar  7 01:00 card0 -> '../../devices/platform/bus@100000/4a00000.dss/drm/card0'/\n>   lrwxrwxrwx 1 root root    0 Mar  7 01:00 card0-DP-1 -> '../../devices/platform/bus@100000/4a00000.dss/drm/card0/card0-DP-1'/\n>   lrwxrwxrwx 1 root root    0 Mar  7 01:00 card0-HDMI-A-1 -> '../../devices/platform/bus@100000/4a00000.dss/drm/card0/card0-HDMI-A-1'/\n>   lrwxrwxrwx 1 root root    0 May 16 14:31 card1 -> '../../devices/platform/bus@100000/4e20000000.gpu/drm/card1'/\n>   lrwxrwxrwx 1 root root    0 May 16 14:31 renderD128 -> '../../devices/platform/bus@100000/4e20000000.gpu/drm/renderD128'/\n>   -r--r--r-- 1 root root 4096 May 16 16:49 version\n> \n> card1 causes the problem.\n\nRight. The usual story of out-of-tree drivers being full of bugs. One\nday I'll tackle the fundamental unfairness of upstream developers having\nto suffer from bugs of non-upstream code. After tackling the other\nunfairness that we software developers always have to suffer from\nhardware bugs, and never the other way around.\n\nSkipping devices without connectors seems to be the best workaround.\nShould we drop the DRM_CAP_DUMB_BUFFER capability query too ?\n\n> >> lead to selection of such a device and inability to use KMS output with\n> >> `cam' application.  The ultimate goal is to display something on the\n> >> device and later the KMS sink will fail if there is no connector\n> >> attached to the device (although it can actually fail earlier, when\n> >> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n> >> supported).  Let's avoid selecting devices without connectors.\n> >> \n> >> A question is whether the added check makes the check for\n> >> DRM_CAP_DUMB_BUFFER API redundant or not.\n> >> \n> >> Changes in v2:\n> >> - Rebased on current master.\n> >> \n> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >> ---\n> >>  src/apps/cam/drm.cpp | 12 ++++++++++++\n> >>  1 file changed, 12 insertions(+)\n> >> \n> >> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n> >> index 47bbb6b0..e19e848c 100644\n> >> --- a/src/apps/cam/drm.cpp\n> >> +++ b/src/apps/cam/drm.cpp\n> >> @@ -479,6 +479,18 @@ int Device::openCard()\n> >>  \t\t\tcontinue;\n> >>  \t\t}\n> >>  \n> >> +\t\t/* Skip devices without connectors. */\n> >> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n> >> +\t\t\tdrmModeGetResources(fd_),\n> >> +\t\t\t&drmModeFreeResources\n> >> +\t\t};\n> >> +\t\tif (!resources || resources->count_connectors <= 0) {\n> >> +\t\t\tresources.reset();\n> >> +\t\t\tdrmClose(fd_);\n> >> +\t\t\tfd_ = -1;\n> >> +\t\t\tcontinue;\n> >> +\t\t}\n> >> +\n> >>  \t\tfound = true;\n> >>  \t\tbreak;\n> >>  \t}","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 E7B55C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 May 2025 14:37:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BDF0668DA0;\n\tWed, 28 May 2025 16:37:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A6F32614CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 16:37:18 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [77.241.226.16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2230CD6;\n\tWed, 28 May 2025 16:36:52 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TZsuAbgc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1748443012;\n\tbh=G/RQn6zOjwNZpSaW5p0rG0HyQ5yDuAall8eUwycvdQY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=TZsuAbgcB8w/VUAQkuQHQbpREsayWC8kJTcdhHbgsELiXT3UptXlO+3tNBJAXPC1e\n\tCiBbdrZSNzAWyyuLlGS+xAjNTJXQDNheCNMOH9Ihv69rqJtYHnUPw6Zm6lEgLmhAJI\n\tQZC+rg6fWPAA2jxJZ2TzwFY/WprC+3blpEQjrwjY=","Date":"Wed, 28 May 2025 16:37:13 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","Message-ID":"<20250528143713.GP12492@pendragon.ideasonboard.com>","References":"<20250515162536.131131-1-mzamazal@redhat.com>\n\t<20250515222712.GE12492@pendragon.ideasonboard.com>\n\t<85o6vsio2j.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<85o6vsio2j.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34373,"web_url":"https://patchwork.libcamera.org/comment/34373/","msgid":"<20250528144126.GQ12492@pendragon.ideasonboard.com>","date":"2025-05-28T14:41:26","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, May 28, 2025 at 04:27:36PM +0200, Milan Zamazal wrote:\n> Mattijs Korpershoek writes:\n> > On jeu., mai 15, 2025 at 18:25, Milan Zamazal wrote:\n> >\n> >> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n> >> device that can be opened and that doesn't fail when asked about\n> >> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n> >> supported by the device).\n> >>\n> >> There can be matching devices that are not display devices.  This can\n> >> lead to selection of such a device and inability to use KMS output with\n> >> `cam' application.  The ultimate goal is to display something on the\n> >> device and later the KMS sink will fail if there is no connector\n> >> attached to the device (although it can actually fail earlier, when\n> >> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n> >> supported).  Let's avoid selecting devices without connectors.\n> >>\n> >> A question is whether the added check makes the check for\n> >> DRM_CAP_DUMB_BUFFER API redundant or not.\n> >>\n> >> Changes in v2:\n> >> - Rebased on current master.\n> >>\n> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >> ---\n> >>  src/apps/cam/drm.cpp | 12 ++++++++++++\n> >>  1 file changed, 12 insertions(+)\n> >>\n> >> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n> >> index 47bbb6b0..e19e848c 100644\n> >> --- a/src/apps/cam/drm.cpp\n> >> +++ b/src/apps/cam/drm.cpp\n> >> @@ -479,6 +479,18 @@ int Device::openCard()\n> >>  \t\t\tcontinue;\n> >>  \t\t}\n> >>  \n> >> +\t\t/* Skip devices without connectors. */\n> >\n> > This makes me think of what drm_hwcomposer does [1] with\n> > the IsKMSDev() check.\n> >\n> > The commit [2] introducing IsKMSDev() also gives some\n> > additional justification which might be useful to include (gpu devices\n> > being a different /dev/dri card).\n> \n> I see, a good example, thank you.\n> \n> >> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n> >> +\t\t\tdrmModeGetResources(fd_),\n> >> +\t\t\t&drmModeFreeResources\n> >> +\t\t};\n> >> +\t\tif (!resources || resources->count_connectors <= 0) {\n> >\n> > Should we also check for count_crtcs and count_encoders ?\n> \n> Based on the commit you mentioned, probably yes and it (still) works for\n> me.  Unless there are objections, I'll update the patch accordingly.\n\nSounds good to me.\n\nIt would be nice to avoid querying resources twice, but it's not a very\nbig deal.\n\n> >> +\t\t\tresources.reset();\n> >> +\t\t\tdrmClose(fd_);\n> >> +\t\t\tfd_ = -1;\n> >> +\t\t\tcontinue;\n> >> +\t\t}\n> >> +\n> >\n> > [1] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/blob/main/drm/DrmDevice.cpp?ref_type=heads#L234\n> > [2] https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/commit/ec75ccd0735213423d6cf89409f8a3bfdaeddcee\n> >\n> >>  \t\tfound = true;\n> >>  \t\tbreak;\n> >>  \t}","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 D2729C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 May 2025 14:41:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AEDD068DA0;\n\tWed, 28 May 2025 16:41:32 +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 3715F614CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 16:41:31 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [77.241.226.16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AE0D0FE;\n\tWed, 28 May 2025 16:41:04 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"CkjOsS/e\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1748443264;\n\tbh=ZrU6DfwmYlsEqPvT7QzmdOwP1LA+ba5/cdg0U44BeuA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CkjOsS/eA8NLDnAHzkfVluezQ/CReFFzalF0iDO6k6Q0pg5Wvy6Gfb+ZDMTRU7uxd\n\tdXfBtCPoIRhOr03kC6dFd63EtHCRl+MX39ttwlvdKWtvPqopx7ERQg9cnJVWnVGV3a\n\t9NKiqOw36w198Sq7df2BYcXRsQmpeVxKLHblVLWw=","Date":"Wed, 28 May 2025 16:41:26 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"Mattijs Korpershoek <mkorpershoek@kernel.org>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","Message-ID":"<20250528144126.GQ12492@pendragon.ideasonboard.com>","References":"<20250515162536.131131-1-mzamazal@redhat.com>\n\t<87frgpug4k.fsf@kernel.org>\n\t<85plfsdd47.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<85plfsdd47.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34376,"web_url":"https://patchwork.libcamera.org/comment/34376/","msgid":"<85bjrcd44b.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-05-28T17:41:56","subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Laurent,\n\nLaurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> On Fri, May 16, 2025 at 05:15:48PM +0200, Milan Zamazal wrote:\n>> Laurent Pinchart writes:\n>> > On Thu, May 15, 2025 at 06:25:36PM +0200, Milan Zamazal wrote:\n>\n>> >> Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*\n>> >> device that can be opened and that doesn't fail when asked about\n>> >> DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is\n>> >> supported by the device).\n>> >> \n>> >> There can be matching devices that are not display devices.  This can\n>> >\n>> > Can you share an example of such a device ? Are we talking about a\n>> > device that sets DRIVER_MODESET but is not a display device ?\n>> \n>> I guess so.  I have the following on TI AM69:\n>> \n>>   # ls -l /dev/dri/\n>>   total 0\n>>   drwxr-xr-x 2 root root        100 Mar  7 01:00 by-path/\n>>   crw-rw---- 1 root video  226,   0 Mar  7 01:00 card0\n>>   crw-rw---- 1 root video  226,   1 Mar  7 01:00 card1\n>>   crw-rw-rw- 1 root render 226, 128 Mar  7 01:00 renderD128\n>> \n>>   # ls -l /sys/class/drm/\n>>   total 0\n>>   lrwxrwxrwx 1 root root 0 Mar 7 01:00 card0 -> '../../devices/platform/bus@100000/4a00000.dss/drm/card0'/\n>>   lrwxrwxrwx 1 root root 0 Mar 7 01:00 card0-DP-1 ->\n>> '../../devices/platform/bus@100000/4a00000.dss/drm/card0/card0-DP-1'/\n>>   lrwxrwxrwx 1 root root 0 Mar 7 01:00 card0-HDMI-A-1 ->\n>> '../../devices/platform/bus@100000/4a00000.dss/drm/card0/card0-HDMI-A-1'/\n>>   lrwxrwxrwx 1 root root 0 May 16 14:31 card1 -> '../../devices/platform/bus@100000/4e20000000.gpu/drm/card1'/\n>>   lrwxrwxrwx 1 root root 0 May 16 14:31 renderD128 ->\n>> '../../devices/platform/bus@100000/4e20000000.gpu/drm/renderD128'/\n>>   -r--r--r-- 1 root root 4096 May 16 16:49 version\n>> \n>> card1 causes the problem.\n>\n> Right. The usual story of out-of-tree drivers being full of bugs. One\n> day I'll tackle the fundamental unfairness of upstream developers having\n> to suffer from bugs of non-upstream code. After tackling the other\n> unfairness that we software developers always have to suffer from\n> hardware bugs, and never the other way around.\n\nThere are reasons why I avoid touching hardware and proprietary software\nto the extent possible.\n\n> Skipping devices without connectors seems to be the best workaround.\n> Should we drop the DRM_CAP_DUMB_BUFFER capability query too ?\n\nThe check looks redundant to me now.  I'm not an expert but let's try to\ndrop it.\n\n>> >> lead to selection of such a device and inability to use KMS output with\n>> >> `cam' application.  The ultimate goal is to display something on the\n>> >> device and later the KMS sink will fail if there is no connector\n>> >> attached to the device (although it can actually fail earlier, when\n>> >> trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not\n>> >> supported).  Let's avoid selecting devices without connectors.\n>> >> \n>> >> A question is whether the added check makes the check for\n>> >> DRM_CAP_DUMB_BUFFER API redundant or not.\n>> >> \n>> >> Changes in v2:\n>> >> - Rebased on current master.\n>> >> \n>> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> >> ---\n>> >>  src/apps/cam/drm.cpp | 12 ++++++++++++\n>> >>  1 file changed, 12 insertions(+)\n>> >> \n>> >> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n>> >> index 47bbb6b0..e19e848c 100644\n>> >> --- a/src/apps/cam/drm.cpp\n>> >> +++ b/src/apps/cam/drm.cpp\n>> >> @@ -479,6 +479,18 @@ int Device::openCard()\n>> >>  \t\t\tcontinue;\n>> >>  \t\t}\n>> >>  \n>> >> +\t\t/* Skip devices without connectors. */\n>> >> +\t\tstd::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n>> >> +\t\t\tdrmModeGetResources(fd_),\n>> >> +\t\t\t&drmModeFreeResources\n>> >> +\t\t};\n>> >> +\t\tif (!resources || resources->count_connectors <= 0) {\n>> >> +\t\t\tresources.reset();\n>> >> +\t\t\tdrmClose(fd_);\n>> >> +\t\t\tfd_ = -1;\n>> >> +\t\t\tcontinue;\n>> >> +\t\t}\n>> >> +\n>> >>  \t\tfound = true;\n>> >>  \t\tbreak;\n>> >>  \t}","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 8828DC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 May 2025 17:42:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4001068DA5;\n\tWed, 28 May 2025 19:42:04 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7081C68D8B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 19:42:02 +0200 (CEST)","from mail-ej1-f69.google.com (mail-ej1-f69.google.com\n\t[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-219-EC3iCuVrPESUlpjslD5sKw-1; Wed, 28 May 2025 13:41:59 -0400","by mail-ej1-f69.google.com with SMTP id\n\ta640c23a62f3a-acb8f9f58ebso388587866b.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 May 2025 10:41:59 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-ad8a1b47a97sm140984366b.138.2025.05.28.10.41.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 28 May 2025 10:41:57 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"O9RWGvmK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1748454121;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=loqu+Z6rPleaXX1GUXWdC5iSJDrGlRcHZICyPqfFykg=;\n\tb=O9RWGvmKcKK8WZZo8PsBQcSgFyewLGxDernTfxQHIb2fAQhNGoBI1GyfJyjuagkzsg1kDN\n\tjlDjAcVVpY92X2ibb8qZ/c5XfeUXJQEgvbzlybjcptd7G9qgrJMe9Sx8CjXcP3NzAPxBvI\n\tPEJ1DQ8mBlO9umlMrkhV8HoTbAhNBLs=","X-MC-Unique":"EC3iCuVrPESUlpjslD5sKw-1","X-Mimecast-MFC-AGG-ID":"EC3iCuVrPESUlpjslD5sKw_1748454119","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1748454118; x=1749058918;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=loqu+Z6rPleaXX1GUXWdC5iSJDrGlRcHZICyPqfFykg=;\n\tb=OiNLNwhr2rJEdpIkyOj8mqiocHL2AKTZrvuOBmG1px0YmlJZVWECw4Bqb4Ieo8pJQt\n\t47eltqcLGNbEXZoUtmpjMXOUb2p8nd555acFkLsrLrdw2qYco0iFuCtcZqHxiOwm9hqi\n\tcjNxLXoljluvEB10uBdtC9kkTSyQ0xCaYFHme/+avRYwtDzxkePm5rIYs0YwRmA9UK//\n\tdmCupTi0QlbVDTqaowWTnyAVaD/xgLgY4W48auP+9XIwKpoDMom3YZOpX7Mx/OssRI4c\n\tB29tK57Ah4to0/MXqMBtFYI8AEZqJl2OvrZLsRzA1g9JzfB/Ovdj5WN38fCLEi4F/D+0\n\tgytg==","X-Gm-Message-State":"AOJu0YzJLn/zrbrWEzJkOGqsuNIU47evpzxv1wT0PD33ygcy9h/y7uv6\n\tyt23KWmLwoK4Z/yw0DqXoh+InHAc8UWHCRIGSkjIHEnTM+ByKgigzSXHP1CETckbp6xo4IeeQDd\n\tLuH0HXlnLC/zGmQ89iWikK5kjgNaRcJ7x574vt+s5Mxix6LZAYeGd47SR6VSEk0FRKS+M9yft39\n\t5yr8C+HRBMhXVkbrnDEl2mt/fHBsqYjrzk19QgU6pDVVj933kFy4fiCIYVhWQ=","X-Gm-Gg":"ASbGncvfzy2Z3lIs7T2mKlx394s8Mz4gJPHMH40R0AG5pGcTsm01O7IzOon9PwEV4+p\n\t7PGwW8Ab0G3Ninbc+6KtLi5aWzeNsNgBqI33V0IR6eJaHkhlEnz2VhvZy9RnezDMr/BfF3OXZOA\n\tj7vi8/HvjpoAtefSGE/4qkK8EWy7RxblnSAg5unLdo6/X+f70SEc38S0OMNzETJpTH/ck4k0gwL\n\tKNoYRlUqGN33Aj60T15c6uku/SqSaGftbA/FAHptLAF3f/fsA3WutvMen/iwRwzMSVJNlooGC8d\n\tOF9bTr+47AEJfJubCm9Lnx5x38BGHyTG85AsAJXyJG9X+aApHS+bU7HigHgx8/nZ","X-Received":["by 2002:a17:907:7ea3:b0:ac2:a50a:51ad with SMTP id\n\ta640c23a62f3a-ad85b0d1dcemr1720303666b.14.1748454118322; \n\tWed, 28 May 2025 10:41:58 -0700 (PDT)","by 2002:a17:907:7ea3:b0:ac2:a50a:51ad with SMTP id\n\ta640c23a62f3a-ad85b0d1dcemr1720301666b.14.1748454117883; \n\tWed, 28 May 2025 10:41:57 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IHLrZZkJh0qDPG00Vx+6ic+HeprOXmlOvy2wvR2I7c3/EFddrJCwCCNDkNnJpz4/nz0Nzxtgw==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] apps: cam: Skip devices without connectors","In-Reply-To":"<20250528143713.GP12492@pendragon.ideasonboard.com> (Laurent\n\tPinchart's message of \"Wed, 28 May 2025 16:37:13 +0200\")","References":"<20250515162536.131131-1-mzamazal@redhat.com>\n\t<20250515222712.GE12492@pendragon.ideasonboard.com>\n\t<85o6vsio2j.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<20250528143713.GP12492@pendragon.ideasonboard.com>","Date":"Wed, 28 May 2025 19:41:56 +0200","Message-ID":"<85bjrcd44b.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"GsDE6qUVUkCaCpFrA0oPnf5yI5vWAF83pQA2TsSPm2A_1748454119","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]