{"id":20538,"url":"https://patchwork.libcamera.org/api/1.1/patches/20538/?format=json","web_url":"https://patchwork.libcamera.org/patch/20538/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240703150923.25994-1-hdegoede@redhat.com>","date":"2024-07-03T15:09:22","name":"[resend,1/2] libcamera: v4l2_videodevice: Fix devices which set both V4L2_CAP_VIDEO and V4L2_CAP_META","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"b16ee55f3be9b4a5130e0f7e4dd553780be33e31","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/1.1/people/102/?format=json","name":"Hans de Goede","email":"hdegoede@redhat.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20538/mbox/","series":[{"id":4438,"url":"https://patchwork.libcamera.org/api/1.1/series/4438/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4438","date":"2024-07-03T15:09:22","name":"[resend,1/2] libcamera: v4l2_videodevice: Fix devices which set both V4L2_CAP_VIDEO and V4L2_CAP_META","version":1,"mbox":"https://patchwork.libcamera.org/series/4438/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20538/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20538/checks/","tags":{},"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 2B22EBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Jul 2024 15:09:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7EF4862E22;\n\tWed,  3 Jul 2024 17:09:36 +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 2EC9A62C95\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Jul 2024 17:09:34 +0200 (CEST)","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-41-AxhyP-mDNT68L34H9PRrYg-1;\n\tWed, 03 Jul 2024 11:09:31 -0400","from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.17])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS\n\tid F12531954207 for <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Jul 2024 15:09:30 +0000 (UTC)","from localhost.localdomain (unknown [10.39.192.67])\n\tby mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 911281955F21; Wed,  3 Jul 2024 15:09:29 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"Ml51xu/m\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1720019373;\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\tcontent-transfer-encoding:content-transfer-encoding;\n\tbh=6IIJ6+YRXSxMtGTY4tSyPRyWXgNyuHopPUjEwCA/CQE=;\n\tb=Ml51xu/mXiH5ODG8sy6HCqUbAgdCINHFhVJfbvK33TY6joqlXPeg2SL4m8ca2epxEtacAX\n\tsy42rmQ7TSbkHrt8a3lu6zu+8/bFIEzbiJLpQypH+KCJw2StBaXpwA0W6l0xueZW0KCZz9\n\tE6bvk9S4bWjDu72ZjhqRlJN1ic8ORGc=","X-MC-Unique":"AxhyP-mDNT68L34H9PRrYg-1","From":"Hans de Goede <hdegoede@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>, Maxime Ripard <mripard@redhat.com>, \n\tHans de Goede <hdegoede@redhat.com>","Subject":"[PATCH resend 1/2] libcamera: v4l2_videodevice: Fix devices which\n\tset both V4L2_CAP_VIDEO and V4L2_CAP_META","Date":"Wed,  3 Jul 2024 17:09:22 +0200","Message-ID":"<20240703150923.25994-1-hdegoede@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.17","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain; charset=\"US-ASCII\"; x-default=true","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>"},"content":"The /dev/video# nodes of the IPU6 driver set both V4L2_CAP_VIDEO_CAPTURE\nand V4L2_CAP_META_CAPTURE.\n\nThis was resulting in V4L2VideoDevice::getFormat() / tryFormat() /\nsetFormat() calling the metadata related ioctls instead of the videocap\nioctls causing things to not work.\n\nFix this by making V4L2Capability::isMeta() return false when the device\nalso has one of the video capabilities.\n\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\n---\n include/libcamera/internal/v4l2_videodevice.h | 4 ++++\n 1 file changed, 4 insertions(+)","diff":"diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex 9057be08..fdd877c8 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -92,6 +92,10 @@ struct V4L2Capability final : v4l2_capability {\n \t}\n \tbool isMeta() const\n \t{\n+\t\t/* Treat devs which combine video and meta as video not meta */\n+\t\tif (isVideo())\n+\t\t\treturn false;\n+\n \t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n \t\t\t\t\tV4L2_CAP_META_OUTPUT);\n \t}\n","prefixes":["resend","1/2"]}