<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/linux.git/drivers/media/usb, branch visionfive</title>
<subtitle>StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/linux.git/atom?h=visionfive</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/linux.git/atom?h=visionfive'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/'/>
<updated>2025-07-31T20:16:09+00:00</updated>
<entry>
<title>Merge tag 'media/v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media</title>
<updated>2025-07-31T20:16:09+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-07-31T20:16:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=0cdee263bc5e7b20f657ea09f9272f50c568f35b'/>
<id>urn:sha1:0cdee263bc5e7b20f657ea09f9272f50c568f35b</id>
<content type='text'>
Pull media updates from Mauro Carvalho Chehab:

 - v4l2 core:
     - sub-device framework routing improvements
     - NV12M tiled variants added to v4l2_format_info
     - some fixes at control handler freeing logic
     - fixed H264 SEPARATE_COLOUR_PLANE check

 - new staging driver: Intel IPU7 PCI

 - Rockchip video decoder driver got promoted from staging

 - iris: added HEVC/VP9 encoder/decoder support

 - vsp1: driver has gained Renesas VSPX support

 - uvc:
     - switched to vb2 ioctl helpers
     - added MSXU 1.5 metadata support

 - atomisp: GC0310 sensor driver cleanups in preparation for moving it
   out of staging

 - Lots of cleanup, fixes and improvements

* tag 'media/v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (310 commits)
  media: rkvdec: Unstage the driver
  media: rkvdec: Remove TODO file
  media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings
  media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings
  media: amphion: Support dmabuf and v4l2 buffer without binding
  media: verisilicon: postproc: 4K support
  media: v4l2: Add support for NV12M tiled variants to v4l2_format_info()
  media: uvcvideo: Use a count variable for meta_formats instead of 0 terminating
  media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META
  media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5
  media: uvcvideo: Introduce dev-&gt;meta_formats
  media: Documentation: Add note about UVCH length field
  media: uvcvideo: Do not mark valid metadata as invalid
  media: uvcvideo: uvc_v4l2_unlocked_ioctl: Invert PM logic
  media: core: export v4l2_translate_cmd
  media: uvcvideo: Turn on the camera if V4L2_EVENT_SUB_FL_SEND_INITIAL
  media: uvcvideo: Remove stream-&gt;is_streaming field
  media: uvcvideo: Split uvc_stop_streaming()
  media: uvcvideo: Handle locks in uvc_queue_return_buffers
  media: uvcvideo: Use vb2 ioctl and fop helpers
  ...
</content>
</entry>
<entry>
<title>media: uvcvideo: Use a count variable for meta_formats instead of 0 terminating</title>
<updated>2025-07-11T17:27:31+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hansg@kernel.org</email>
</author>
<published>2025-07-08T10:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=c56c437b140ed9c9e91d82f4ca705cdb021a9343'/>
<id>urn:sha1:c56c437b140ed9c9e91d82f4ca705cdb021a9343</id>
<content type='text'>
The code dealing with the 0 terminated meta_formats array is a bit klunky
especially for the uvc_meta_v4l2_enum_formats() case.

Instead of 0 terminating add an unsigned int nmeta_formats member to struct
uvc_device and use that. This leads to slightly cleaner code.

Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Reviewed-by: Ricardo Ribalda &lt;ribalda@chrium.org&gt;
Tested-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt; # Camera with MSXU_CONTROL_METADATA
Link: https://lore.kernel.org/r/20250708104622.73237-2-hansg@kernel.org
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META</title>
<updated>2025-07-11T17:27:30+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-07-07T18:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=6cb786f040ad35b23b4a7bff8b9d772f22909d48'/>
<id>urn:sha1:6cb786f040ad35b23b4a7bff8b9d772f22909d48</id>
<content type='text'>
If the camera supports the MSXU_CONTROL_METADATA control, auto set the
MSXU_META quirk.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250707-uvc-meta-v8-5-ed17f8b1218b@chromium.org
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5</title>
<updated>2025-07-11T17:27:30+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-07-07T18:34:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=2ab4019aa34dc2aec4a0824fbf1e49300884fbbf'/>
<id>urn:sha1:2ab4019aa34dc2aec4a0824fbf1e49300884fbbf</id>
<content type='text'>
The UVC driver provides two metadata types V4L2_META_FMT_UVC, and
V4L2_META_FMT_D4XX. The only difference between the two of them is that
V4L2_META_FMT_UVC only copies PTS, SCR, size and flags, and
V4L2_META_FMT_D4XX copies the whole metadata section.

Now we only enable V4L2_META_FMT_D4XX for the Intel D4xx family of
devices, but it is useful to have the whole metadata payload for any
device where vendors include other metadata, such as the one described by
Microsoft:
https://learn.microsoft.com/en-us/windows-hardware/drivers/stream/mf-capture-metadata

This patch introduces a new format V4L2_META_FMT_UVC_MSXU_1_5, that is
identical to V4L2_META_FMT_D4XX.

Let the user enable this format with a quirk for now. This way they can
test if their devices provide useful metadata without rebuilding the
kernel. They can later contribute patches to auto-quirk their devices.
We will also work in methods to auto-detect devices compatible with this
new metadata format.

Suggested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250707-uvc-meta-v8-4-ed17f8b1218b@chromium.org
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Introduce dev-&gt;meta_formats</title>
<updated>2025-07-11T17:27:29+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-07-07T18:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=0bb51c8897395de5bd5f571874130aec214ef534'/>
<id>urn:sha1:0bb51c8897395de5bd5f571874130aec214ef534</id>
<content type='text'>
Right now, there driver supports devices with one or two metadata
formats. Prepare it to support more than two metadata formats.

This is achieved with the introduction of a new field `meta_formats`,
that contains the array of metadata formats supported by the device, in
the order expected by userspace.

Suggested-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Link: https://lore.kernel.org/r/20250707-uvc-meta-v8-3-ed17f8b1218b@chromium.org
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Do not mark valid metadata as invalid</title>
<updated>2025-07-11T17:27:28+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-07-07T18:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=bda2859bff0b9596a19648f3740c697ce4c71496'/>
<id>urn:sha1:bda2859bff0b9596a19648f3740c697ce4c71496</id>
<content type='text'>
Currently, the driver performs a length check of the metadata buffer
before the actual metadata size is known and before the metadata is
decided to be copied. This results in valid metadata buffers being
incorrectly marked as invalid.

Move the length check to occur after the metadata size is determined and
is decided to be copied.

Cc: stable@vger.kernel.org
Fixes: 088ead255245 ("media: uvcvideo: Add a metadata device node")
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250707-uvc-meta-v8-1-ed17f8b1218b@chromium.org
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: uvc_v4l2_unlocked_ioctl: Invert PM logic</title>
<updated>2025-07-11T17:27:28+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-07-01T06:45:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=2acded8aa2c89b858495488f6a14cd1d04fc5784'/>
<id>urn:sha1:2acded8aa2c89b858495488f6a14cd1d04fc5784</id>
<content type='text'>
Instead of listing the IOCTLs that do not need to turn on the camera,
list the IOCTLs that need to turn it on. This makes the code more
maintainable.

This patch changes the behaviour for unsupported IOCTLs. Those IOCTLs
will not turn on the camera.

Suggested-by: Hans Verkuil &lt;hans@jjverkuil.nl&gt;
Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Reviewed-by: Hans Verkuil &lt;hans@hverkuil.nl&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250701-uvc-grannular-invert-v4-7-8003b9b89f68@chromium.org
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Turn on the camera if V4L2_EVENT_SUB_FL_SEND_INITIAL</title>
<updated>2025-07-11T17:27:28+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-07-01T06:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=a03e32e60141058d46ea8cf4631654c43c740fdb'/>
<id>urn:sha1:a03e32e60141058d46ea8cf4631654c43c740fdb</id>
<content type='text'>
If we subscribe to an event with V4L2_EVENT_SUB_FL_SEND_INITIAL, the
driver needs to report back some values that require the camera to be
powered on. But VIDIOC_SUBSCRIBE_EVENT is not part of the ioctls that
turn on the camera.

We could unconditionally turn on the camera during
VIDIOC_SUBSCRIBE_EVENT, but it is more efficient to turn it on only
during V4L2_EVENT_SUB_FL_SEND_INITIAL, which we believe is not a common
usecase.

To avoid a list_del if uvc_pm_get() fails, we move list_add_tail to the
end of the function.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Fixes: d1b618e79548 ("media: uvcvideo: Do not turn on the camera for some ioctls")
Cc: stable@vger.kernel.org
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250701-uvc-grannular-invert-v4-5-8003b9b89f68@chromium.org
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Remove stream-&gt;is_streaming field</title>
<updated>2025-07-11T17:27:28+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-06-16T15:24:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=7dd56c47784a466b03df62ca766207f483353cdc'/>
<id>urn:sha1:7dd56c47784a466b03df62ca766207f483353cdc</id>
<content type='text'>
The is_streaming field is used by modular PM to know if the device is
currently streaming or not.

With the transition to vb2 and fop helpers, we can use vb2 functions for
the same functionality. The great benefit is that vb2 already tracks the
streaming state for us.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250616-uvc-fop-v4-4-250286570ee7@chromium.org
Reviewed-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Split uvc_stop_streaming()</title>
<updated>2025-07-11T17:27:27+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-06-16T15:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=54828c0d4f909bd706e15cfaa29758f2c1d59212'/>
<id>urn:sha1:54828c0d4f909bd706e15cfaa29758f2c1d59212</id>
<content type='text'>
uvc_stop_streaming() is used for meta and video nodes. Split the function
in two to avoid confusion.

Use this opportunity to rename uvc_start_streaming() to
uvc_start_streaming_video(), as it is only called by the video nodes.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250616-uvc-fop-v4-3-250286570ee7@chromium.org
Reviewed-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
</feed>
