On Fri, Jul 29, 2022 at 3:30 AM Jim Shargo <jsha...@chromium.org> wrote: > > Hi Wayland folks! > > TL;DR: I'm working on extending VKMS and wanted feedback from other > compositor/wayland devs. >> // Background > > I work on the ChromeOS compositor, and recently I've been doing a > bunch of stuff to improve our testing setup. At the moment, my main > focus is improving our ability to write integration tests against > DRM/KMS. > > It's pretty tricky to get right. Working with mocks of DRM loses all > the useful helpers that live within the kernel, which would need to be > rewritten (and kept up-to-date) in userspace. Stuff like writeback > support would be even harder. > > Earlier this year, VKMS came up as a potential solution. I was happy > to see that Weston is already using it. I've started thinking about > what features from the wild we'd need, and started digging into the > code. > > // Current Status > > I recently sent out my first patchset, which will let userspace build > their own DRM drivers with ConfigFS. This implicitly adds support for > multi-display setups which were impossible to test before. This also > allows for multiple virtual DRM drivers to be created and used at the > same time, which may increase test parallelism? Haven't tried it yet. > > v1 patchset: > https://patchwork.kernel.org/project/dri-devel/list/?series=662676 > cover letter: > https://lists.freedesktop.org/archives/dri-devel/2022-July/365647.html > > // Rough Plans > > The big features I want to target with this work are: > - Multi-display and movable planes. This is mostly covered by the > ConfigFS changes. > - Hot plugging. > - Color, color management and HDR. Loads of new formats, support for > color properties not currently implemented. Making sure writeback > buffers are useful for this. > - Improve IGT testing for VKMS (for new features and existing skipped tests) > > // Questions > > - What VKMS features could help your testing the most? > - How much do you care about writeback buffer support vs CRC checks > in tests atm? > - What kinds of bugs do you get around DRM/KMS? > - Any thoughts in general?
Hey, nice work! So, not really related to wayland, but it would be cool if we could add a generic vkms helper library for drivers to use for virtual display functionality. E.g., for headless GPUs in data centers or for virtualization. We ended up pulling a version of dkms into amdgpu to replace our old non-atomic virtual display support. We tried at the time to make a generic helper, but ended up running into a lot of problems around memory access because on real GPUs the vkms is backed by vram rather than system memory. I know we could use vkms as a standalone driver, but that runs into the same issue in that the vkms is backed by system memory rather than vram. The latter is desirable because we want to be able to use vram directly so we can use the framebuffer as a source for hardware video encoding for example. Alex > > Thanks! > -- Jim