From nobody Sat Sep 26 07:16:10 2026 Received: from outbound.pv.icloud.com (pv-2006j-snip4-11.eps.apple.com [57.103.67.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DA0A4A6CF8 for ; Thu, 3 Sep 2026 12:50:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=57.103.67.103 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788439826; cv=none; b=Dr9Ep81BRrq7lzIzw9bQBE8LsgDnEyE5Ac4yImEcbe2ePhUiSCy5+ZRFxfRIw6/BDIM1V1zm5Aps3mxNiXJsiF6Z9FVhsJfKRNupIC7Q3aKKSNxixB6qatolGVQeGqxF8wkYnse54t8q7Rk72aMlZuniZ+EzQFX8XsYIVVhEeLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788439826; c=relaxed/simple; bh=cg9kWbceYx8PSNDrmZnXuLdqOPAnaRwef8Env6m0WLo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JPg6/4K60Nc+nbiuIYVvZEeJ3RV07rhVX8dgNHEitiFxf50K7+Ii7fXCzKz+NKrZmJJvhb2+lx6++EtRNugT4GMTQBs3hMBi1q4xk7VifCaALz/mugk/ZzvUeesddsCm9gZYCPezw56CHitK1Ocj4UOQX+478rKfFA7QdZHFjkg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pinon1.fr; spf=pass smtp.mailfrom=pinon1.fr; dkim=pass (2048-bit key) header.d=pinon1.fr header.i=@pinon1.fr header.b=QaoRREhy; arc=none smtp.client-ip=57.103.67.103 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pinon1.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pinon1.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pinon1.fr header.i=@pinon1.fr header.b="QaoRREhy" Received: from outbound.pv.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-1a-100-percent-9 (Postfix) with ESMTPS id 86D4F1800C8D; Thu, 03 Sep 2026 12:50:21 +0000 (UTC) X-ICL-RepId: 01a06751-fc9d-71a4-ba5c-a5906bfe3d3b X-ICL-Out-Info: HUtFAUMHWwJACUgATUQeDx5WFlZNRAJCTQBKHVwPXxxBDUkdXA5eEhVdRUMEUhlAFXkIWgNYBQNeXwoTC1NWQhlXF11cGQ1AUEsbDlUXA1ccVkVcGEMJXQVXHB0dQUVbE1UXRgkZCF0dGQhHHwowA0IOVgNDB0UALRkcV1BHAlwfV0kdC0VLXxldRQ9fB1kEQABIAFwFXgJBDVYFXAVbB0MUSR4dXg5AAlw4QwRZBFxBFx5BUxcfSwBcRVAYRB9dHWYcXABWAlw= Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pinon1.fr; s=sig1; t=1788439823; x=1791031823; bh=LUfe1pdcps0sFnIL1Tvqw6S2TvQ7uC51WrK64XPEpbE=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=QaoRREhyqEfbb2rlIFjEZ3ebd0ZcDeZzrhqOCtPDHxykSESGcI0FWRIuy31XtbyanYxiFi22yBvE6G5+4RC9VXVM/8BIwXSoSe1IZHo0hWAFYaEGbGCKj2CyGIGzbVEx554Qt3hqKiY8rXZau6Ufra2V3BsTjXYjPn8lLFo9kOFDTMS7Jt6bZEBL40JGfB1u+VGMT/nfhHf3KKpVJhjQOx8YhukHqT9DeDENktYq/7QYcUlgpfTOd9bRbTcY1QgE860W8FhiwLPR5OLUYHTxdJa0MhKU0i9355T22oC3fiC/9GyHBR3du5x1XofM4zQmlyngFeNqorFCw7xYsD+S+Q== mail-alias-created-date: 1575045973000 Received: from 2a01cb06d02d74794b6d6271b4dfc9d3.ipv6.abo.wanadoo.fr (unknown [17.156.192.29]) by p00-icloudmta-asmtp-us-west-1a-100-percent-9 (Postfix) with ESMTPSA id 32F181800320; Thu, 03 Sep 2026 12:50:19 +0000 (UTC) From: Pierre Pinon To: Miguel Vadillo , linux-media@vger.kernel.org Cc: Pierre Pinon , Sakari Ailus , Bingbu Cao , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] media: i2c: cvs: register subdev nodes when the remote sensor binds Date: Thu, 3 Sep 2026 14:50:13 +0200 Message-ID: <20260903125014.612053-1-pierre@pinon1.fr> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTAzMDExMSBTYWx0ZWRfXyV4zW7x64LCF MTTfdTJg9VXSYXHInBCLf/i6KIhx5CoSxjO26/2ZumqkO1fXLk7q6G0S973bmuokfGpmCRizr3R ARVFgFdRzYO0lZLRfm3vD+aCuov+FwoRagxtP0gOC4bOUVcbhcKgJkEyyyxudf8voaXy7Vo6ucj gn7PCWloTc+X/CtWlyIIe8zIvQJl2s7wCkt1cGv2qO9wSJn/xYxuNRzMqQqnBtbZTb3gNswr2jQ Tyv9Sbsot86IjzT43ogqnX76KbPGXJJe5kXttFqbjs4303beaMd4tawsFuBIKBwmD/h4mVPWBK1 iLfJxoSoR+rY+tnjtylhGslnE9eaasEafDMm5BNUtpoadlI3OCOGhS0hN586Js= X-Proofpoint-ORIG-GUID: yZFUPbM2yqc4hToncFDC8zf2S6oKNDOa X-Proofpoint-GUID: yZFUPbM2yqc4hToncFDC8zf2S6oKNDOa X-Authority-Info-Out: v=2.4 cv=SvydKfO0 c=1 sm=1 tr=0 ts=6a996d0e cx=c_apl:c_pps:t_out a=aW9mcIavGNWWFvFFKOxBSA==:117 a=aW9mcIavGNWWFvFFKOxBSA==:17 a=V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JVnpXmbdM1m6NXXNFwxxlqKTulJilEzMdwAJ6ea04F4CRhosbzJoh1lTPwnCS2/aozYZunmEmiDRC8iyWVGcPMucbdauVKOqG0RtXxtcPR9oEfyEzsZnbQg0Dv9XT6Hg90Y/ouQ4qyLzXTCl0uKzp1TgEF+g0NZn+tjOaDELdD8ZHMR65xW3MBgyWo6ifPnvvMapfcvN7tYSiMIz1CoIZPAbleybGAsioOebaQzn/Nn9U18axGmhcydwBsd8hh1+5iKiR9F65FzHnG8uQ0cBHu41T6trZTTy0VD0+wgZ8gDeFHUXPfJ6q9MLp5de/UEUs4UBqhBiTdUQi5VzitrFjEC33y+3 Content-Type: text/plain; charset="utf-8" The CVS bridge picks up the remote sensor through a v4l2 subdev notifier of its own, but nothing in that path creates the sensor's device node. The IPU7 ISYS driver calls v4l2_device_register_subdev_nodes() from its own .bound -- which runs for the CVS subdev itself, before the sensor behind it is bound -- and from .complete. The sensor's node therefore depends entirely on .complete being reached. That does not happen when another sensor on the same notifier has no driver. On a Panther Lake laptop ipu-bridge instantiates two camera endpoints, OVTI08F4 (ov08x40) and HIMX1092; there is no driver for the latter, so it stays in the notifier's waiting list forever: # cat /sys/kernel/debug/v4l2-async/pending_async_subdevices ipu7: [fwnode] dev=3Di2c-HIMX1092:00, node=3DHIMX1092-2/port@0/endpoint@0 ov08x40 17-0036: Intel CVS: The ov08x40 subdev is registered with the v4l2_device and shows up in the media graph, but never gets a /dev/v4l-subdevN, so userspace cannot open it. libcamera fails with: Failed to open V4L2 device '': No such file or directory No valid pipeline for sensor 'ov08x40 17-0036', skipping Register the subdev nodes from the CVS notifier's .bound instead. By the time it runs, v4l2_async_match_notify() has already called __v4l2_device_register_subdev() for the sensor, so sd->v4l2_dev is valid. When .complete is reached as well, the extra call is a no-op: __v4l2_device_register_subdev_nodes() skips subdevs that already have a devnode. With this the sensor gets its node even though HIMX1092 is still pending, and the camera streams. Fixes: 8e2b43d2c10b ("media: i2c: cvs: Add driver of Intel Computer Vision = Sensing Controller(CVS)") Cc: stable@vger.kernel.org Signed-off-by: Pierre Pinon --- Notes: I am not certain this is the right layer. The same gap would affect any sensor sitting behind a sub-notifier, so the fix could equally live in ipu7-isys.c or in the v4l2-async core; I put it in the CVS driver becau= se that is where the sub-notifier is created. Happy to redo it either way. =20 Tested on a Panther Lake laptop (Intel Graphics [8086:b090], IPU7 + Int= el CVS + ov08x40) on top of 7.3.0-rc1: with the patch the sensor gets its /dev/v4l-subdev node and libcamera streams at 3848x2176, while HIMX1092 is still sitting in the notifier's waiting list. drivers/media/i2c/cvs/v4l2.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/cvs/v4l2.c b/drivers/media/i2c/cvs/v4l2.c index 9fadca7a3..0a42f91c0 100644 --- a/drivers/media/i2c/cvs/v4l2.c +++ b/drivers/media/i2c/cvs/v4l2.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -400,7 +401,7 @@ static int cvs_csi_notify_bound(struct v4l2_async_notif= ier *notifier, struct v4l2_async_connection *asc) { struct icvs *ctx =3D notifier_to_csi(notifier); - int pad; + int pad, ret; =20 pad =3D media_entity_get_fwnode_pad(&sd->entity, asc->match.fwnode, MEDIA_PAD_FL_SOURCE); @@ -409,9 +410,21 @@ static int cvs_csi_notify_bound(struct v4l2_async_noti= fier *notifier, =20 ctx->remote =3D &sd->entity.pads[pad]; =20 - return media_create_pad_link(&sd->entity, pad, &ctx->subdev.entity, - ICVS_CSI_PAD_SINK, MEDIA_LNK_FL_ENABLED | - MEDIA_LNK_FL_IMMUTABLE); + ret =3D media_create_pad_link(&sd->entity, pad, &ctx->subdev.entity, + ICVS_CSI_PAD_SINK, MEDIA_LNK_FL_ENABLED | + MEDIA_LNK_FL_IMMUTABLE); + if (ret) + return ret; + + /* + * v4l2_async_match_notify() has already registered the sensor with + * the v4l2_device, but only the bridge driver creates subdev nodes, + * and it does so from its own .bound and .complete callbacks. The + * former ran for this subdev, before the sensor was bound; the latter + * is never reached if another sensor on the same notifier has no + * driver. Create the nodes here so the sensor is reachable either way. + */ + return v4l2_device_register_subdev_nodes(sd->v4l2_dev); } =20 /** base-commit: 940de590b839f71d6dc846160534bf202401b8b7 --=20 2.55.0