#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
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
ndufesnechaos_princessyes, its drm/accel like#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: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: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:15
ndufesneThis is because v4l2 request is not yet upstream ffmpeg#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: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
ndufesneno, Firefox support ffmpeg HW contexts#asahi-dev · 2026-07-20 14:03
ndufesneI suppose you are already familiar with https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20847 (needed for Firefox support), that you can enable support for Chromium directly and that gstreamer supports that too#asahi-dev · 2026-07-20 14:03
ndufesneOk, that's good to know#asahi-dev · 2026-07-20 14:02
ndufesneOk, so to me you should continue that direction#asahi-dev · 2026-07-20 14:00
ndufesne(using request)#asahi-dev · 2026-07-20 14:00
ndufesneyou mean V4L2 stateless ?#asahi-dev · 2026-07-20 13:59
ndufesneThe general long term idea, is that with HW specific driver + user space driver (aka in mesa), through VV standard API, you can move the hard work into userspace#asahi-dev · 2026-07-20 13:59
ndufesneWith V4L2, the kernel API you need here is that stateless codec one, and its more of less the final API implemented by the kernel, so you can already guess that the kernel side is bigger#asahi-dev · 2026-07-20 13:58
ndufesne(of course you can do VV on top of V4L2, its not ideal/optimal)#asahi-dev · 2026-07-20 13:57
ndufesneSo, in both VV and V4L2 case, on Linux, you will need a kernel side#asahi-dev · 2026-07-20 13:57
ndufesne(sorry, back)