This is a note to let you know that I've just added the patch titled media: subdev: Don't report V4L2_SUBDEV_CAP_STREAMS when the streams API is disabled to the 6.5-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-subdev-don-t-report-v4l2_subdev_cap_streams-when-the-streams-api-is-disabled.patch and it can be found in the queue-6.5 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 4800021c630210ea0b19434a1fb56ab16385f2b3 Mon Sep 17 00:00:00 2001 From: Hans de Goede <hdegoede@xxxxxxxxxx> Date: Tue, 10 Oct 2023 12:24:58 +0200 Subject: media: subdev: Don't report V4L2_SUBDEV_CAP_STREAMS when the streams API is disabled From: Hans de Goede <hdegoede@xxxxxxxxxx> commit 4800021c630210ea0b19434a1fb56ab16385f2b3 upstream. Since the stream API is still experimental it is currently locked away behind the internal, default disabled, v4l2_subdev_enable_streams_api flag. Advertising V4L2_SUBDEV_CAP_STREAMS when the streams API is disabled confuses userspace. E.g. it causes the following libcamera error: ERROR SimplePipeline simple.cpp:1497 Failed to reset routes for /dev/v4l-subdev1: Inappropriate ioctl for device Don't report V4L2_SUBDEV_CAP_STREAMS when the streams API is disabled to avoid problems like this. Reported-by: Dennis Bonke <admin@xxxxxxxxxxxxxxx> Fixes: 9a6b5bf4c1bb ("media: add V4L2_SUBDEV_CAP_STREAMS") Cc: stable@xxxxxxxxxxxxxxx # for >= 6.3 Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/media/v4l2-core/v4l2-subdev.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -517,6 +517,13 @@ static long subdev_do_ioctl(struct file V4L2_SUBDEV_CLIENT_CAP_STREAMS; int rval; + /* + * If the streams API is not enabled, remove V4L2_SUBDEV_CAP_STREAMS. + * Remove this when the API is no longer experimental. + */ + if (!v4l2_subdev_enable_streams_api) + streams_subdev = false; + switch (cmd) { case VIDIOC_SUBDEV_QUERYCAP: { struct v4l2_subdev_capability *cap = arg; Patches currently in stable-queue which might be from hdegoede@xxxxxxxxxx are queue-6.5/acpi-resource-skip-irq-override-on-asus-expertbook-b1402cba.patch queue-6.5/media-subdev-don-t-report-v4l2_subdev_cap_streams-when-the-streams-api-is-disabled.patch queue-6.5/acpi-ec-add-quirk-for-the-hp-pavilion-gaming-15-dk1xxx.patch queue-6.5/platform-x86-think-lmi-fix-reference-leak.patch queue-6.5/input-goodix-ensure-int-gpio-is-in-input-for-gpio_count-1-gpio_int_idx-0-case.patch queue-6.5/platform-x86-hp-wmi-mark-driver-struct-with-__refdat.patch queue-6.5/hid-logitech-hidpp-fix-kernel-crash-on-receiver-usb-disconnect.patch queue-6.5/acpi-resource-add-tongfang-gm6bgeq-gm6bg5q-and-gm6bg0q-to-irq1_edge_low_force_override.patch