[{"id":34381,"web_url":"https://patchwork.libcamera.org/comment/34381/","msgid":"<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>","date":"2025-05-29T14:08:30","subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2025-05-29 09:23:26)\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).\n> \n> Let's avoid selecting devices without connectors, CRTCs or encoders.\n> The added check makes the original check for DRM_CAP_DUMB_BUFFER API\n> most likely unnecessary, let's remove it.\n> \n> Changes in v3:\n> - Added checks for the presence of CRTCs and encoders.\n> - Removed the check for DRM_CAP_DUMB_BUFFER.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/apps/cam/drm.cpp | 22 ++++++++++------------\n>  1 file changed, 10 insertions(+), 12 deletions(-)\n> \n> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n> index 47bbb6b05..c40c31410 100644\n> --- a/src/apps/cam/drm.cpp\n> +++ b/src/apps/cam/drm.cpp\n> @@ -450,8 +450,6 @@ int Device::openCard()\n>         }\n>  \n>         for (struct dirent *res; (res = readdir(folder));) {\n> -               uint64_t cap;\n> -\n>                 if (strncmp(res->d_name, \"card\", 4))\n>                         continue;\n>  \n> @@ -464,16 +462,16 @@ int Device::openCard()\n>                         continue;\n>                 }\n>  \n> -               /*\n> -                * Skip devices that don't support the modeset API, to avoid\n> -                * selecting a DRM device corresponding to a GPU. There is no\n> -                * modeset capability, but the kernel returns an error for most\n> -                * caps if mode setting isn't support by the driver. The\n> -                * DRM_CAP_DUMB_BUFFER capability is one of those, other would\n> -                * do as well. The capability value itself isn't relevant.\n> -                */\n> -               ret = drmGetCap(fd_, DRM_CAP_DUMB_BUFFER, &cap);\n> -               if (ret < 0) {\n> +               /* Skip devices without connectors. */\n\nThis all sounds reasonable to me, though this comment now skips devices\nwithout connectors/crts/encoders.\n\nPerhaps we should update it while applying?\n\n\t\t/* Skip non-display devices */\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> +               std::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n> +                       drmModeGetResources(fd_),\n> +                       &drmModeFreeResources\n> +               };\n> +               if (!resources ||\n> +                   resources->count_connectors <= 0 ||\n> +                   resources->count_crtcs <= 0 ||\n> +                   resources->count_encoders <= 0) {\n> +                       resources.reset();\n>                         drmClose(fd_);\n>                         fd_ = -1;\n>                         continue;\n> -- \n> 2.49.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E2413C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 May 2025 14:08:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9F75B68DA6;\n\tThu, 29 May 2025 16:08:36 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 34E15614CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 May 2025 16:08:34 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B3E4B6D5;\n\tThu, 29 May 2025 16:08:06 +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=\"c9nIWTth\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1748527686;\n\tbh=QPDscVjFbwFnzKkCCUVbOD6vbPJQZZUtq6rREvTebOI=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=c9nIWTthoISisRcQ04sXZKFwgPgpYrdLqMtGZgJOJFnRa1CVnIVU0psEY0PoqPZKO\n\ta70U/q3zAqC7G5PUq22vgYjwZGvqjHvLlefXuZp9wukwBLvSka7PH/L0AB681485T0\n\tcwDoct0sKvZbZV9OC8FEHGHmqk7XOvrxG9m4bKjU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250529082326.25156-1-mzamazal@redhat.com>","References":"<20250529082326.25156-1-mzamazal@redhat.com>","Subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tMattijs Korpershoek <mkorpershoek@kernel.org>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Date":"Thu, 29 May 2025 15:08:30 +0100","Message-ID":"<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":34382,"web_url":"https://patchwork.libcamera.org/comment/34382/","msgid":"<85cybriih1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-05-29T14:45:14","subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n\n> Quoting Milan Zamazal (2025-05-29 09:23:26)\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>\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).\n>> \n>> Let's avoid selecting devices without connectors, CRTCs or encoders.\n>> The added check makes the original check for DRM_CAP_DUMB_BUFFER API\n>> most likely unnecessary, let's remove it.\n>> \n>> Changes in v3:\n>> - Added checks for the presence of CRTCs and encoders.\n>> - Removed the check for DRM_CAP_DUMB_BUFFER.\n>> \n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/apps/cam/drm.cpp | 22 ++++++++++------------\n>>  1 file changed, 10 insertions(+), 12 deletions(-)\n>> \n>> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n>> index 47bbb6b05..c40c31410 100644\n>> --- a/src/apps/cam/drm.cpp\n>> +++ b/src/apps/cam/drm.cpp\n>> @@ -450,8 +450,6 @@ int Device::openCard()\n>>         }\n>>  \n>>         for (struct dirent *res; (res = readdir(folder));) {\n>> -               uint64_t cap;\n>> -\n>>                 if (strncmp(res->d_name, \"card\", 4))\n>>                         continue;\n>>  \n>> @@ -464,16 +462,16 @@ int Device::openCard()\n>>                         continue;\n>>                 }\n>>  \n>> -               /*\n>> -                * Skip devices that don't support the modeset API, to avoid\n>> -                * selecting a DRM device corresponding to a GPU. There is no\n>> -                * modeset capability, but the kernel returns an error for most\n>> -                * caps if mode setting isn't support by the driver. The\n>> -                * DRM_CAP_DUMB_BUFFER capability is one of those, other would\n>> -                * do as well. The capability value itself isn't relevant.\n>> -                */\n>> -               ret = drmGetCap(fd_, DRM_CAP_DUMB_BUFFER, &cap);\n>> -               if (ret < 0) {\n>> +               /* Skip devices without connectors. */\n>\n> This all sounds reasonable to me, though this comment now skips devices\n> without connectors/crts/encoders.\n>\n> Perhaps we should update it while applying?\n>\n> \t\t/* Skip non-display devices */\n\nAh, yes, please.\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n>> +               std::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n>> +                       drmModeGetResources(fd_),\n>> +                       &drmModeFreeResources\n>> +               };\n>> +               if (!resources ||\n>> +                   resources->count_connectors <= 0 ||\n>> +                   resources->count_crtcs <= 0 ||\n>> +                   resources->count_encoders <= 0) {\n>> +                       resources.reset();\n>>                         drmClose(fd_);\n>>                         fd_ = -1;\n>>                         continue;\n>> -- \n>> 2.49.0\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DB665C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 May 2025 14:45:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 033FA68D94;\n\tThu, 29 May 2025 16:45:23 +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 6ABD6614CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 May 2025 16:45:20 +0200 (CEST)","from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n\t[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-31-Da41qGkTONy7-Zv66HSKCA-1; Thu, 29 May 2025 10:45:17 -0400","by mail-wm1-f70.google.com with SMTP id\n\t5b1f17b1804b1-450cb8f8b1bso2901595e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 May 2025 07:45:17 -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\tffacd0b85a97d-3a4efe5b8besm2233640f8f.16.2025.05.29.07.45.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 29 May 2025 07:45:15 -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=\"YcrYHDz3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1748529919;\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=Hk8QMbHJnR0fsHcoN9IgObLcArA26Y1U74Ew21adynY=;\n\tb=YcrYHDz3ja2L7KJCSuRxufEDZR8t7BaW/Kv9CCrOTdNuu7nTJEHvk60K3Em2SCvL9zZNUf\n\tB1StIbyilr0zljAyc3PdH1j1m0Cthl3DofeHmMr32CnXm9HluC15kb1RZNdZguy6ULYAt6\n\tguMS3EycodKH6apbV/QDJpDuriZ58/Y=","X-MC-Unique":"Da41qGkTONy7-Zv66HSKCA-1","X-Mimecast-MFC-AGG-ID":"Da41qGkTONy7-Zv66HSKCA_1748529916","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1748529916; x=1749134716;\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=Hk8QMbHJnR0fsHcoN9IgObLcArA26Y1U74Ew21adynY=;\n\tb=ZOVOOlpy6zCgXLLCaCDtsn2ZFLZSRb+Gm5siNGI4ayrh6s2DpfhyGvbN4ePm0Cosjk\n\t6ipjYwnapmHlPa8zq+bu3P1Ua0BCwsamStuc8VUx/djuMNAtOI5NWbx7zp3k7RsUsYpP\n\t5a+mfzMiKI72bTrQyRzLlIOqDK17zUtUvhlan2R7t8godP6bfmqK2f/faKSODZ+vZ8dX\n\ty8Kx377nc4c+9m2pjOdqus85O+R+8FVWut2GuhToRSJ48edoIR25DiswqFlCIMrmMCxF\n\t622M4jBItJjSIGnXJIt6qR9k0YyXRn6Bo/eq5vQXU1HNWnwsNrTAfOpq2Cjc9S0JpwdL\n\tAhQw==","X-Gm-Message-State":"AOJu0YxBSf5O2fPhbIxWuwyWxf/hPS+BUY4XyxcSrfhQNuxAi6sTCwo0\n\tvtKoHmbZsBvgPT2GpGmzD/MugKMOX96dg4ocBGNN6kab4o6l6YOpcDApzhgDixmw7jhqKuV2pIn\n\tEs+njN1lC1gRj4xVxu2TvXW4pMhWjTDcugfHRnYVZ0TY91rFAoVMMFA0GGxDlr7T5Z4X7Oazb1L\n\ts=","X-Gm-Gg":"ASbGnctjMTO1EIkkhiPIiMmfaDH+6IIwcPnNI2uBpA+kZDRZ83ake8GWkyS0BDqyGiB\n\ten5IpyM+VS4iZOhREfYyeGri58NYZCpR5UR6UVr+XZQrfI96+Gx6SNLMcpojbsJ3YrdgcQ4qwt7\n\thmA4B1fiR3UCBz4/gZwk7OWyXO26Fzv+eTIgrvUD2zV7dimrtmlwnipspHrh4xNUNuy6IObRBFj\n\tjzrgVhscM+8JpmGA7G2+g5iDO4C4AF6kTdfu5Fn3VqIO1Ih9o3uwobX3Cqx9rgfsfHYwLE+aWpA\n\t+nwL/gt+2hq954+PyeTLHWNN5zHlbYkcbEHd40XS38lMZPmWYNhyLhblRFnEvh8y","X-Received":["by 2002:a05:600c:a07:b0:448:e8c0:c778 with SMTP id\n\t5b1f17b1804b1-44c92a5495cmr178197825e9.22.1748529916339; \n\tThu, 29 May 2025 07:45:16 -0700 (PDT)","by 2002:a05:600c:a07:b0:448:e8c0:c778 with SMTP id\n\t5b1f17b1804b1-44c92a5495cmr178197535e9.22.1748529915874; \n\tThu, 29 May 2025 07:45:15 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IFI7OaLmrv9IEK9aSb0ei5MNj/4EV8PHq4KubQiysabLSmlgSOA0JvrJwIYWrCT7PiR8JJIDg==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,  Mattijs Korpershoek\n\t<mkorpershoek@kernel.org>,  Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","In-Reply-To":"<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>\n\t(Kieran Bingham's message of \"Thu, 29 May 2025 15:08:30 +0100\")","References":"<20250529082326.25156-1-mzamazal@redhat.com>\n\t<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>","Date":"Thu, 29 May 2025 16:45:14 +0200","Message-ID":"<85cybriih1.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":"QEgJuxzz2VqbjVl4aQtcgP_ti9HtWl1qeGnevGaoPQk_1748529916","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":34384,"web_url":"https://patchwork.libcamera.org/comment/34384/","msgid":"<87sekmpohm.fsf@kernel.org>","date":"2025-05-30T07:05:41","subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","submitter":{"id":229,"url":"https://patchwork.libcamera.org/api/people/229/","name":"Mattijs Korpershoek","email":"mkorpershoek@kernel.org"},"content":"On jeu., mai 29, 2025 at 15:08, Kieran Bingham <kieran.bingham@ideasonboard.com> wrote:\n\n> Quoting Milan Zamazal (2025-05-29 09:23:26)\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).\n>> \n>> Let's avoid selecting devices without connectors, CRTCs or encoders.\n>> The added check makes the original check for DRM_CAP_DUMB_BUFFER API\n>> most likely unnecessary, let's remove it.\n>> \n>> Changes in v3:\n>> - Added checks for the presence of CRTCs and encoders.\n>> - Removed the check for DRM_CAP_DUMB_BUFFER.\n>> \n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/apps/cam/drm.cpp | 22 ++++++++++------------\n>>  1 file changed, 10 insertions(+), 12 deletions(-)\n>> \n>> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n>> index 47bbb6b05..c40c31410 100644\n>> --- a/src/apps/cam/drm.cpp\n>> +++ b/src/apps/cam/drm.cpp\n>> @@ -450,8 +450,6 @@ int Device::openCard()\n>>         }\n>>  \n>>         for (struct dirent *res; (res = readdir(folder));) {\n>> -               uint64_t cap;\n>> -\n>>                 if (strncmp(res->d_name, \"card\", 4))\n>>                         continue;\n>>  \n>> @@ -464,16 +462,16 @@ int Device::openCard()\n>>                         continue;\n>>                 }\n>>  \n>> -               /*\n>> -                * Skip devices that don't support the modeset API, to avoid\n>> -                * selecting a DRM device corresponding to a GPU. There is no\n>> -                * modeset capability, but the kernel returns an error for most\n>> -                * caps if mode setting isn't support by the driver. The\n>> -                * DRM_CAP_DUMB_BUFFER capability is one of those, other would\n>> -                * do as well. The capability value itself isn't relevant.\n>> -                */\n>> -               ret = drmGetCap(fd_, DRM_CAP_DUMB_BUFFER, &cap);\n>> -               if (ret < 0) {\n>> +               /* Skip devices without connectors. */\n>\n> This all sounds reasonable to me, though this comment now skips devices\n> without connectors/crts/encoders.\n>\n> Perhaps we should update it while applying?\n>\n> \t\t/* Skip non-display devices */\n\nI agree with the fixup.\n\nIf it's applied, then:\n\nReviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>\n\n>\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n>> +               std::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n>> +                       drmModeGetResources(fd_),\n>> +                       &drmModeFreeResources\n>> +               };\n>> +               if (!resources ||\n>> +                   resources->count_connectors <= 0 ||\n>> +                   resources->count_crtcs <= 0 ||\n>> +                   resources->count_encoders <= 0) {\n>> +                       resources.reset();\n>>                         drmClose(fd_);\n>>                         fd_ = -1;\n>>                         continue;\n>> -- \n>> 2.49.0\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 57AD7C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 May 2025 07:05:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3407668DA8;\n\tFri, 30 May 2025 09:05:48 +0200 (CEST)","from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 612FB614D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 May 2025 09:05:45 +0200 (CEST)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id 2FF956115E;\n\tFri, 30 May 2025 07:05:44 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 83997C4CEE9;\n\tFri, 30 May 2025 07:05:43 +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=\"ZHU0M60I\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1748588743;\n\tbh=UrxxI7qyXVsqZ0DXQnXFS9i+ihfdtlhvAL2267EM9EI=;\n\th=From:To:Cc:Subject:In-Reply-To:References:Date:From;\n\tb=ZHU0M60ILDhiA+9dP7W1FdKiUj5PqgEDASKyPND0wQHcwTQv91X6uC5+TSxvLty9t\n\tZVIxGheRpj6JsmfhuVyTzLV4sjdelQPrVrl+Oqt+zDGgCaNGcYHymEufkptqlscpDb\n\tvEck+IA0HOrAybb9uokmf4RQpwjVDkT9sVLfh8iGclR4usX+pQGadCoSNc6AKO/ajI\n\tgf8kauO8p3Y7RVehgv54fw+HnGZ8k0QLxVtSZIGOQ41UDl4JXvj7X/Yu8110Q9LXFu\n\tGxLdoU8+g2KgZ7YhgwVlbo/5ZdtG4S85TZbEDVOR8ZCw+eSIAJ6+ReBgDRtjq2Tt4Y\n\tgvHUuH+i/8NDQ==","From":"Mattijs Korpershoek <mkorpershoek@kernel.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>, Milan Zamazal\n\t<mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>, Mattijs Korpershoek\n\t<mkorpershoek@kernel.org>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","In-Reply-To":"<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>","References":"<20250529082326.25156-1-mzamazal@redhat.com>\n\t<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>","Date":"Fri, 30 May 2025 09:05:41 +0200","Message-ID":"<87sekmpohm.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":34386,"web_url":"https://patchwork.libcamera.org/comment/34386/","msgid":"<20250530083255.GS12492@pendragon.ideasonboard.com>","date":"2025-05-30T08:32:55","subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, May 30, 2025 at 09:05:41AM +0200, Mattijs Korpershoek wrote:\n> On jeu., mai 29, 2025 at 15:08, Kieran Bingham wrote:\n> > Quoting Milan Zamazal (2025-05-29 09:23:26)\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).\n> >> \n> >> Let's avoid selecting devices without connectors, CRTCs or encoders.\n> >> The added check makes the original check for DRM_CAP_DUMB_BUFFER API\n> >> most likely unnecessary, let's remove it.\n> >> \n> >> Changes in v3:\n> >> - Added checks for the presence of CRTCs and encoders.\n> >> - Removed the check for DRM_CAP_DUMB_BUFFER.\n> >> \n> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >> ---\n> >>  src/apps/cam/drm.cpp | 22 ++++++++++------------\n> >>  1 file changed, 10 insertions(+), 12 deletions(-)\n> >> \n> >> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n> >> index 47bbb6b05..c40c31410 100644\n> >> --- a/src/apps/cam/drm.cpp\n> >> +++ b/src/apps/cam/drm.cpp\n> >> @@ -450,8 +450,6 @@ int Device::openCard()\n> >>         }\n> >>  \n> >>         for (struct dirent *res; (res = readdir(folder));) {\n> >> -               uint64_t cap;\n> >> -\n> >>                 if (strncmp(res->d_name, \"card\", 4))\n> >>                         continue;\n> >>  \n> >> @@ -464,16 +462,16 @@ int Device::openCard()\n> >>                         continue;\n> >>                 }\n> >>  \n> >> -               /*\n> >> -                * Skip devices that don't support the modeset API, to avoid\n> >> -                * selecting a DRM device corresponding to a GPU. There is no\n> >> -                * modeset capability, but the kernel returns an error for most\n> >> -                * caps if mode setting isn't support by the driver. The\n> >> -                * DRM_CAP_DUMB_BUFFER capability is one of those, other would\n> >> -                * do as well. The capability value itself isn't relevant.\n> >> -                */\n> >> -               ret = drmGetCap(fd_, DRM_CAP_DUMB_BUFFER, &cap);\n> >> -               if (ret < 0) {\n> >> +               /* Skip devices without connectors. */\n> >\n> > This all sounds reasonable to me, though this comment now skips devices\n> > without connectors/crts/encoders.\n> >\n> > Perhaps we should update it while applying?\n> >\n> > \t\t/* Skip non-display devices */\n> \n> I agree with the fixup.\n\nI would expand it a bit\n\n \t\t/*\n\t\t * Skip non-display devices. While this could in theory be done\n\t\t * by checking for support of the mode setting API, some\n\t\t * out-of-tree render-only GPU drivers (namely powervr)\n\t\t * incorrectly set the DRIVER_MODESET driver feature. Check for\n\t\t * the presence of at least one CRTC, encoder and connector\n\t\t * instead.\n\t\t */\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> If it's applied, then:\n> \n> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>\n> \n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> >> +               std::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n> >> +                       drmModeGetResources(fd_),\n> >> +                       &drmModeFreeResources\n> >> +               };\n> >> +               if (!resources ||\n> >> +                   resources->count_connectors <= 0 ||\n> >> +                   resources->count_crtcs <= 0 ||\n> >> +                   resources->count_encoders <= 0) {\n> >> +                       resources.reset();\n> >>                         drmClose(fd_);\n> >>                         fd_ = -1;\n> >>                         continue;","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 5DE91C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 May 2025 08:33:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E171568D9E;\n\tFri, 30 May 2025 10:33:04 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B8768614D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 May 2025 10:33:02 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F10B89A;\n\tFri, 30 May 2025 10:32:34 +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=\"juszyLIN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1748593954;\n\tbh=nR391Utw3K6+2JrhLh8qT1vt3aaX/Nme1fG29q7xavo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=juszyLIN+gVU9AKEBDcSdSkqpkZTlvJ2UppV6P47RKnhb3CyKi8pjGsdVqBRM8qTy\n\tK/6uS3dEnkK7mUEpTT8cncbmg+n/PiaT8qsZm33OF3TEffApdDbdXFmBTHcPWWoUsx\n\tTp8ngkfl8YJKUKjrWO1KQH5KSundgAwZ/roLQzUo=","Date":"Fri, 30 May 2025 11:32:55 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Mattijs Korpershoek <mkorpershoek@kernel.org>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","Message-ID":"<20250530083255.GS12492@pendragon.ideasonboard.com>","References":"<20250529082326.25156-1-mzamazal@redhat.com>\n\t<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>\n\t<87sekmpohm.fsf@kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<87sekmpohm.fsf@kernel.org>","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":34389,"web_url":"https://patchwork.libcamera.org/comment/34389/","msgid":"<85msauqxae.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-05-30T09:10:17","subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> On Fri, May 30, 2025 at 09:05:41AM +0200, Mattijs Korpershoek wrote:\n>> On jeu., mai 29, 2025 at 15:08, Kieran Bingham wrote:\n>> > Quoting Milan Zamazal (2025-05-29 09:23:26)\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).\n>> >> \n>> >> Let's avoid selecting devices without connectors, CRTCs or encoders.\n>> >> The added check makes the original check for DRM_CAP_DUMB_BUFFER API\n>> >> most likely unnecessary, let's remove it.\n>> >> \n>> >> Changes in v3:\n>> >> - Added checks for the presence of CRTCs and encoders.\n>> >> - Removed the check for DRM_CAP_DUMB_BUFFER.\n>> >> \n>> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> >> ---\n>> >>  src/apps/cam/drm.cpp | 22 ++++++++++------------\n>> >>  1 file changed, 10 insertions(+), 12 deletions(-)\n>> >> \n>> >> diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp\n>> >> index 47bbb6b05..c40c31410 100644\n>> >> --- a/src/apps/cam/drm.cpp\n>> >> +++ b/src/apps/cam/drm.cpp\n>> >> @@ -450,8 +450,6 @@ int Device::openCard()\n>> >>         }\n>> >>  \n>> >>         for (struct dirent *res; (res = readdir(folder));) {\n>> >> -               uint64_t cap;\n>> >> -\n>> >>                 if (strncmp(res->d_name, \"card\", 4))\n>> >>                         continue;\n>> >>  \n>> >> @@ -464,16 +462,16 @@ int Device::openCard()\n>> >>                         continue;\n>> >>                 }\n>> >>  \n>> >> -               /*\n>> >> -                * Skip devices that don't support the modeset API, to avoid\n>> >> -                * selecting a DRM device corresponding to a GPU. There is no\n>> >> -                * modeset capability, but the kernel returns an error for most\n>> >> -                * caps if mode setting isn't support by the driver. The\n>> >> -                * DRM_CAP_DUMB_BUFFER capability is one of those, other would\n>> >> -                * do as well. The capability value itself isn't relevant.\n>> >> -                */\n>> >> -               ret = drmGetCap(fd_, DRM_CAP_DUMB_BUFFER, &cap);\n>> >> -               if (ret < 0) {\n>> >> +               /* Skip devices without connectors. */\n>> >\n>> > This all sounds reasonable to me, though this comment now skips devices\n>> > without connectors/crts/encoders.\n>> >\n>> > Perhaps we should update it while applying?\n>> >\n>> > \t\t/* Skip non-display devices */\n>> \n>> I agree with the fixup.\n>\n> I would expand it a bit\n>\n>  \t\t/*\n> \t\t * Skip non-display devices. While this could in theory be done\n> \t\t * by checking for support of the mode setting API, some\n> \t\t * out-of-tree render-only GPU drivers (namely powervr)\n> \t\t * incorrectly set the DRIVER_MODESET driver feature. Check for\n> \t\t * the presence of at least one CRTC, encoder and connector\n> \t\t * instead.\n> \t\t */\n\nYes, thank you, done in v4 (the only change there).\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n>> If it's applied, then:\n>> \n>> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>\n>> \n>> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> >\n>> >> +               std::unique_ptr<drmModeRes, decltype(&drmModeFreeResources)> resources{\n>> >> +                       drmModeGetResources(fd_),\n>> >> +                       &drmModeFreeResources\n>> >> +               };\n>> >> +               if (!resources ||\n>> >> +                   resources->count_connectors <= 0 ||\n>> >> +                   resources->count_crtcs <= 0 ||\n>> >> +                   resources->count_encoders <= 0) {\n>> >> +                       resources.reset();\n>> >>                         drmClose(fd_);\n>> >>                         fd_ = -1;\n>> >>                         continue;","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 8D13FC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 May 2025 09:10:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 963DA68DA8;\n\tFri, 30 May 2025 11:10:24 +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 884A3614D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 May 2025 11:10:23 +0200 (CEST)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-623-MGhOgxBoOwOlLlLDRIakTg-1; Fri, 30 May 2025 05:10:21 -0400","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-450d64026baso4263635e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 May 2025 02:10:21 -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\tffacd0b85a97d-3a4efe5b7bbsm4222419f8f.4.2025.05.30.02.10.18\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 30 May 2025 02:10:18 -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=\"R8E/z5yq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1748596222;\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=ZisE8bXDkPH141zirauWPVa6sspjL3rQmGibXu2qTw4=;\n\tb=R8E/z5yq1exRG8SJFNEu6oj9mhCQSpPv43c0J/UpsfDDLVAwQyJQWhqCOmU+WE/Fyvefgb\n\tmw/rpAERM7VXjJxn9d9yKYpU0be/glCKTNYfs3kwA6h8rfy+2RzQXe/3E78T7FiYIj3o/G\n\t6eZOQxIk5zFFndde5YGO3vERGgDf1Io=","X-MC-Unique":"MGhOgxBoOwOlLlLDRIakTg-1","X-Mimecast-MFC-AGG-ID":"MGhOgxBoOwOlLlLDRIakTg_1748596220","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1748596220; x=1749201020;\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=ZisE8bXDkPH141zirauWPVa6sspjL3rQmGibXu2qTw4=;\n\tb=uYrwZDpnvPNkfZZzOosnotujy+3mVafqcYcDpHfEjTMoCQcPyBPrsM4Hqkmhxid+/W\n\tp//rzxLJd6UxmHvxod0N0Hyeumaquw8Ivb59L2ouVYFrvT0EYH9Mer/Vio9Pv8XUkMXF\n\ttcU0pBH0Th8mlbyhKqe5wJMaYnR27ak1rG4T2XE78dhBiIU1djGvIW5oshB5+0mCaDxq\n\tmL3I6QECLxUW2Fs3zo/XSz/9QjQKl69/92M8sRpX/HfkB67tXqPbd+qCpvz3FgRXyccr\n\tKOl/XdCnjNszQ+0YwCzTyPH4pTeyrapdZdCZgQeHsE6ILToYr9XReTKts3AYFOasrz7F\n\tLXeQ==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCWcBdnP3sS3f2ohS3NVDC0k9+Iy/v2PClchNSHU//7DHAaXVbHrid2u1XErvB8SNFmr/Uxk7kVWo0QcQDOs3nk=@lists.libcamera.org","X-Gm-Message-State":"AOJu0Yzrp1qHQcbjfzcR6s+6Y4mKDQBkXt+xl/Gx5fQ2l6vmcnG2Q9lV\n\t0zi5X7XjGwC/9Xr6skW7kPHnhJoQ1ylXEIvAArH9LgQpzwI+NhU+vRCyta0O9kV+cWpYut7S4+1\n\tnqRro+HgzSPgxNGsr6kIDjipIi8TjMTZBBPfH0m3BVTy6N2U5ABmmahQ8hWCEzST55FUTTwavin\n\tLBzuVnS3n0GycPA/K1rcQo4za14VHI50nblt/nceXIV9EierXQ+ZEYcKEy71E=","X-Gm-Gg":"ASbGncsqr/4vh4Uah67c7SiJlc+ADMBcIvG+CGnxFsSLtl8yXVdRzWFhohgCP2SheRf\n\tOl99F7NnWLV9Fv35sfdD8WZNTSaUI5owTGTgd5PJAu7Ci3GAiuc7N8Lax7et7l1uKNqLjZhHspX\n\tIsTpTy8oyy2iX4QEeEvjg0ZNGBS+LmyFaR8utnTfO8x+ck7KGAIR+RT/KAgw6BbqI/DJBDn5xPd\n\t1MOtxwR0ypH+RrDmt/rObyLOqgXagrDUWjqTwPoQkgi8rvk2p/ar5mJw9AH8AaHfgchr3P7Cl0Q\n\t4AiTyVIiw+0bud5Y+s/pNz8nGt73khhrT0kvUWi9i+y1njt/s2z9CukqNTY2L1rQ","X-Received":["by 2002:a05:600c:358c:b0:43d:172:50b1 with SMTP id\n\t5b1f17b1804b1-450d655fa64mr21664615e9.29.1748596219837; \n\tFri, 30 May 2025 02:10:19 -0700 (PDT)","by 2002:a05:600c:358c:b0:43d:172:50b1 with SMTP id\n\t5b1f17b1804b1-450d655fa64mr21664225e9.29.1748596219378; \n\tFri, 30 May 2025 02:10:19 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IFaBW4SEzX0hEK7ZndKwkqbPRPS38q7MpnekAxfA10IcZm/6hHlNIA6OJUPeCrX0K5+38rSNA==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Mattijs Korpershoek <mkorpershoek@kernel.org>,  Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v3] apps: cam: Skip non-display GPUs","In-Reply-To":"<20250530083255.GS12492@pendragon.ideasonboard.com> (Laurent\n\tPinchart's message of \"Fri, 30 May 2025 11:32:55 +0300\")","References":"<20250529082326.25156-1-mzamazal@redhat.com>\n\t<174852771033.896144.16226091823091754721@ping.linuxembedded.co.uk>\n\t<87sekmpohm.fsf@kernel.org>\n\t<20250530083255.GS12492@pendragon.ideasonboard.com>","Date":"Fri, 30 May 2025 11:10:17 +0200","Message-ID":"<85msauqxae.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":"V-OA0HejnZDkKzOPIxunOQFpfeFiyUNPX70eF-5YDYw_1748596220","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>"}}]