#
#asahi-dev · 2026-07-20 16:57
chaos_princessm3max, so spmi tipd
#asahi-dev · 2026-07-20 16:57
NickChan[m]m3?
#asahi-dev · 2026-07-20 16:33
chaos_princessthat's a start i guess
#asahi-dev · 2026-07-20 16:33
chaos_princessBus 001 Device 002: ID 05ac:12a8 Apple, Inc. iPhone 5/5C/5S/6/SE/7/8/X/XR
#asahi-dev · 2026-07-20 14:53
sofusndufesne: thanks! and thanks again for the help!
#asahi-dev · 2026-07-20 14:52
ndufesnesofus btw, very happy to ear the progress you made, and really looking forward seeing your driver on the ML!
#asahi-dev · 2026-07-20 14:48
ndufesnein the end, I think its giving future dev a very valid choice, plus fence based programming, which is not available in v4l2
#asahi-dev · 2026-07-20 14:45
ndufesnecurrent status is that drm tree won't take drivers that don't have a GPU, accel tree is just a jungle, so that's less interesting. Linux Media have had some opening to accept this type of driver (which would be easy for me, as I already maintain the v4l2 side of codecs/m2m), but I'm very open to where this thing will live
#asahi-dev · 2026-07-20 14:44
chaos_princessndufesne: its more of a slight dig at x86 people with gpu-integrated media engines that can throw it in together with their gpu api. and also at drm/accel being kinda the gpu-like-things-except-for-graphics-part
#asahi-dev · 2026-07-20 14:44
ndufesneso yeah, you need kernel and mesa at the same time more or less
#asahi-dev · 2026-07-20 14:43
ndufesnesofusyou can't upstream this type of driver without a ready to use open source counterpart
#asahi-dev · 2026-07-20 14:43
ndufesneAnd with the idea to share some code from there
#asahi-dev · 2026-07-20 14:43
chaos_princesssofus: from what i understand the idea is to design a "correct" kernel api for vv, with you being one of the trailblazers for that. So, a year makes ssense
#asahi-dev · 2026-07-20 14:43
ndufesnechaos_princessyes, its drm/accel like
#asahi-dev · 2026-07-20 14:38
sofusthanks a lot for the help! Based on what you have said, my plan is to continue v4l2, but design it such that porting to VV would be easy
#asahi-dev · 2026-07-20 14:36
sofusor did that include mesa
#asahi-dev · 2026-07-20 14:35
sofusyear or two to get the VV kernel side upstreamed??
#asahi-dev · 2026-07-20 14:35
sofusa very large chunk of our driver is rkvdec copy paste, so im kinda hoping upstreaming is not to hard
#asahi-dev · 2026-07-20 14:35
chaos_princessjust smuggle it via drm/accel
#asahi-dev · 2026-07-20 14:33
ndufesnethe second is probably going to take a year or two
#asahi-dev · 2026-07-20 14:33
ndufesnev4l2 stateless is something you could start upstreaming today, and hit 7.3 or 7.4
#asahi-dev · 2026-07-20 14:32
ndufesnedon't read me wrong though, both works, and both a great performance
#asahi-dev · 2026-07-20 14:31
ndufesneSo it is always a little ackward, since you basically build a "command", the is wrapped by a request, yet the driver does not process the request in their queued order ....
#asahi-dev · 2026-07-20 14:30
ndufesneA v4l2 driver, is mostly a thread that wakes when there conditions are met:... (full message at <https://matrix.org/oftc/media/v1/media/download/ASTaligxgi03m5Rnhqpt5rpQhe6D4jo3a1kForzB5mZT2bIgm8hysA_uvylAp4PxwcaCeT3UQ92cTxEt-2sIB2lCefyAiV-gAG1hdHJpeC5vcmcvV1dPTnFHY1NISm9SeXNLZ2lQQ3NwYndn>)
#asahi-dev · 2026-07-20 14:29
ndufesneIn contrast, in V4L2, you don't really queue commands, but buffers, the request are just object that holds on controls data (the decode parameters), and that kernel driver completely validate the data to prevent any form of overflow, because tradionally in v4l2, the mmus are optional, you can outcompile them
#asahi-dev · 2026-07-20 14:29
sofusthanks a lot, i can kinda imagine how our driver would look with something like that
#asahi-dev · 2026-07-20 14:28
ndufesneThis will of course clarify itself as we make drivers that way, and we'll be building common block, as codecs HW are quite alike
#asahi-dev · 2026-07-20 14:27
ndufesneSo in general, I would expect something like:... (full message at <https://matrix.org/oftc/media/v1/media/download/AeRIfNcsBSjrJ9UNNRQgvZo42baqTeknC47ff3sNNDGpl0xi2naMwR-nFTrCS8rEiI2fCHtGlBdzEzJB6Ue53_tCefyAYFTQAG1hdHJpeC5vcmcvbnJ4RFhhcGJCZlJVSnJaTnpEdUhUZEhS>)
#asahi-dev · 2026-07-20 14:26
ndufesneIts quite likely you driver won't need to know a lot about the specific codec, that knowledge will be in the userspace driver
#asahi-dev · 2026-07-20 14:25
ndufesneSo if you have a command based hw, you can expose a kernel uAPI that match your command interface, if its CPU accessed (aka mmio interface), you can likely expose a submission queue, and have some of the register data just memcpy
#asahi-dev · 2026-07-20 14:24
ndufesneSo, a VV kernel driver is going to look like a GPU driver. Assuming you have an IOMMU, the driver don't need to protect against operation that would cause an decode error, or would try to read passed the allocated memory. You can let the mmu do its job.
#asahi-dev · 2026-07-20 14:22
ndufesne(sorry for the in/out, trying to avoid having two channels IRC/Matrix)
#asahi-dev · 2026-07-20 14:22
sofusthanks, one thing i never understod is what the kernel driver should do / expose when using VV
#asahi-dev · 2026-07-20 14:17
ndufesneRPi have the addition issue that they produce a weird pixel format (column tiling)
#asahi-dev · 2026-07-20 14:16
ndufesneI didn't mean its would just work, but the stateful plumbing should be the same as the stateless one, from user point of view, there is no difference
#asahi-dev · 2026-07-20 14:16
sofusi think i misunderstood something sorry
#asahi-dev · 2026-07-20 14:15
ndufesneThis is because v4l2 request is not yet upstream ffmpeg
#asahi-dev · 2026-07-20 14:14
sofusthis would imply firefox does not use v4l2 request
#asahi-dev · 2026-07-20 14:14
sofushttps://github.com/mozilla-firefox/firefox/blob/7fa9b602777418732e08b26d1ef6c9945c4bbd72/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp#L3278
#asahi-dev · 2026-07-20 14:13
ndufesneThere is also a (vide coded :-S) proto driver of VV on V4L2 Stateless https://gitlab.freedesktop.org/sree/mesa/-/tree/v4l2-vulkan-video
#asahi-dev · 2026-07-20 14:13
ndufesneJust general info, this could be interesting to follow: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14987
#asahi-dev · 2026-07-20 14:10
jannaugentoo might have an use flag but I think firefox vendors ffmpeg
#asahi-dev · 2026-07-20 14:09
sofuswhen building firefox does it not use the system ffmpeg?
#asahi-dev · 2026-07-20 14:08
jannauI don't think firefox has patched ffmpeg. so https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20847 still has to be released and merged in firefox ffmpeg copy
#asahi-dev · 2026-07-20 14:08
cy8aerFF 153 has an official support for Vulkan. Already downloadable and available tomorrow.
#asahi-dev · 2026-07-20 14:07
sofushuh, i was never able to enable it
#asahi-dev · 2026-07-20 14:07
ndufesneThough, firefox is not supper good at using 2 devices
#asahi-dev · 2026-07-20 14:06
ndufesnethis path was used to enable Vulkan Recently, and the request stuff is mimicing that
#asahi-dev · 2026-07-20 14:06
sofusi found this https://bugzilla.mozilla.org/show_bug.cgi?id=1969297
#asahi-dev · 2026-07-20 14:06
ndufesneno, Firefox support ffmpeg HW contexts

plus ›