<div dir="ltr"><div>Merged into Android tree: <a href="https://android-review.git.corp.google.com/c/kernel/common-modules/virtual-device/+/3661920">https://android-review.git.corp.google.com/c/kernel/common-modules/virtual-device/+/3661920</a></div><div>I'm able to use configfs as expected.</div><div><br></div><div>Tested-by: Mark Yacoub <<a href="mailto:markyacoub@google.com">markyacoub@google.com</a>></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Jul 17, 2025 at 12:37 PM Louis Chauvet <<a href="mailto:louis.chauvet@bootlin.com">louis.chauvet@bootlin.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">+CC: Mark (Google), Sebastian (Mutter), Xaver (KWin), Victoria (Cosmic)<br>
<br>
Hi everyone,<br>
<br>
Last week, I presented this work at the Display Next Hackfest, and the <br>
feedback from compositors was very positive. At least KWin, Mutter, and <br>
Cosmic are interested in integrating it into their tests, so it would be <br>
great if someone could review it.<br>
<br>
Sebastian quickly tested this work (using [2] for full features) with <br>
their existing VKMS tests [1], and it worked. From what I understand, <br>
the tests are quite basic —just sanity checks— but we were able to <br>
reproduce the default vkms device using ConfigFS.<br>
<br>
If another compositor wants to test the ConfigFS interface (I will try <br>
to keep [2] updated), that would be amazing. Feel free to send feedback!<br>
<br>
A small note: This series has a minor conflict since the conversion to <br>
the faux device, but it can be applied using `b4 am -3 ... && git am -3 <br>
...`.<br>
@josé, if you send a new iteration, can you add <a href="mailto:markyacoub@google.com" target="_blank">markyacoub@google.com</a> in <br>
copy, and maybe Sebastian, Xaver, Victoria if they want to follow the <br>
upstreaming?<br>
<br>
Thank you,<br>
Louis Chauvet<br>
<br>
[1]:<a href="https://gitlab.gnome.org/swick/mutter/-/commit/88a7354942d9728dae06fb83cc4f2d2c7b08b694" rel="noreferrer" target="_blank">https://gitlab.gnome.org/swick/mutter/-/commit/88a7354942d9728dae06fb83cc4f2d2c7b08b694</a><br>
[2]:<a href="https://github.com/Fomys/linux/tree/configfs-everything" rel="noreferrer" target="_blank">https://github.com/Fomys/linux/tree/configfs-everything</a><br>
<br>
<br>
<br>
Le 07/05/2025 à 15:54, José Expósito a écrit :<br>
> Hi everyone,<br>
> <br>
> This series allow to configure one or more VKMS instances without having<br>
> to reload the driver using configfs.<br>
> <br>
> The series is structured in 3 blocks:<br>
> <br>
> - Patches 1..11: Basic device configuration. For simplicity, I kept the<br>
> available options as minimal as possible.<br>
> <br>
> - Patches 12 and 13: New option to skip the default device creation and to-do<br>
> cleanup.<br>
> <br>
> - Patches 14, 15 and 16: Allow to hot-plug and unplug connectors. This is not<br>
> part of the minimal set of options, but I included in this series so it can<br>
> be used as a template/example of how new configurations can be added.<br>
> <br>
> The process of configuring a VKMS device is documented in "vkms.rst".<br>
> <br>
> Finally, the code is thoroughly tested by a collection of IGT tests [1].<br>
> <br>
> Best wishes,<br>
> José Expósito<br>
> <br>
> [1] <a href="https://lists.freedesktop.org/archives/igt-dev/2025-February/086071.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/igt-dev/2025-February/086071.html</a><br>
> <br>
> Changes in v5:<br>
> <br>
> - Added Reviewed-by tags, thanks Louis!<br>
> - Rebased on top of drm-misc-next<br>
> - Link to v4: <a href="https://lore.kernel.org/dri-devel/20250407081425.6420-1-jose.exposito89@gmail.com/" rel="noreferrer" target="_blank">https://lore.kernel.org/dri-devel/20250407081425.6420-1-jose.exposito89@gmail.com/</a><br>
> <br>
> Changes in v4:<br>
> <br>
> - Since Louis and I worked on this together, set him as the author of some of<br>
> the patches and me as co-developed-by to reflect this joint effort.<br>
> - Rebased on top of drm-misc-next<br>
> - Link to v3: <a href="https://lore.kernel.org/all/20250307163353.5896-1-jose.exposito89@gmail.com/" rel="noreferrer" target="_blank">https://lore.kernel.org/all/20250307163353.5896-1-jose.exposito89@gmail.com/</a><br>
> <br>
> Changes in v3:<br>
> <br>
> - Applied review comments by Louis Chauvet: (thanks!!)<br>
> - Use scoped_guard() instead of guard(mutex)(...)<br>
> - Fix a use-after-free error in the connector hot-plug code<br>
> - Rebased on top of drm-misc-next<br>
> - Link to v2: <a href="https://lore.kernel.org/all/20250225175936.7223-1-jose.exposito89@gmail.com/" rel="noreferrer" target="_blank">https://lore.kernel.org/all/20250225175936.7223-1-jose.exposito89@gmail.com/</a><br>
> <br>
> Changes in v2:<br>
> <br>
> - Applied review comments by Louis Chauvet:<br>
> - Use guard(mutex)(...) instead of lock/unlock<br>
> - Return -EBUSY when trying to modify a enabled device<br>
> - Move the connector hot-plug related patches to the end<br>
> - Rebased on top of drm-misc-next<br>
> - Link to v1: <a href="https://lore.kernel.org/dri-devel/20250218170808.9507-1-jose.exposito89@gmail.com/T/" rel="noreferrer" target="_blank">https://lore.kernel.org/dri-devel/20250218170808.9507-1-jose.exposito89@gmail.com/T/</a><br>
> <br>
> José Expósito (6):<br>
> drm/vkms: Expose device creation and destruction<br>
> drm/vkms: Allow to configure the default device creation<br>
> drm/vkms: Remove completed task from the TODO list<br>
> drm/vkms: Allow to configure connector status<br>
> drm/vkms: Allow to update the connector status<br>
> drm/vkms: Allow to configure connector status via configfs<br>
> <br>
> Louis Chauvet (10):<br>
> drm/vkms: Add and remove VKMS instances via configfs<br>
> drm/vkms: Allow to configure multiple planes via configfs<br>
> drm/vkms: Allow to configure the plane type via configfs<br>
> drm/vkms: Allow to configure multiple CRTCs via configfs<br>
> drm/vkms: Allow to configure CRTC writeback support via configfs<br>
> drm/vkms: Allow to attach planes and CRTCs via configfs<br>
> drm/vkms: Allow to configure multiple encoders via configfs<br>
> drm/vkms: Allow to attach encoders and CRTCs via configfs<br>
> drm/vkms: Allow to configure multiple connectors via configfs<br>
> drm/vkms: Allow to attach connectors and encoders via configfs<br>
> <br>
> Documentation/gpu/vkms.rst | 100 ++-<br>
> drivers/gpu/drm/vkms/Kconfig | 1 +<br>
> drivers/gpu/drm/vkms/Makefile | 3 +-<br>
> drivers/gpu/drm/vkms/tests/vkms_config_test.c | 24 +<br>
> drivers/gpu/drm/vkms/vkms_config.c | 8 +-<br>
> drivers/gpu/drm/vkms/vkms_config.h | 26 +<br>
> drivers/gpu/drm/vkms/vkms_configfs.c | 833 ++++++++++++++++++<br>
> drivers/gpu/drm/vkms/vkms_configfs.h | 8 +<br>
> drivers/gpu/drm/vkms/vkms_connector.c | 35 +<br>
> drivers/gpu/drm/vkms/vkms_connector.h | 9 +<br>
> drivers/gpu/drm/vkms/vkms_drv.c | 18 +-<br>
> drivers/gpu/drm/vkms/vkms_drv.h | 20 +<br>
> 12 files changed, 1072 insertions(+), 13 deletions(-)<br>
> create mode 100644 drivers/gpu/drm/vkms/vkms_configfs.c<br>
> create mode 100644 drivers/gpu/drm/vkms/vkms_configfs.h<br>
> <br>
> <br>
> base-commit: a6c0a91ccb257eaec2aee080df06863ce7601315<br>
<br>
-- <br>
Louis Chauvet, Bootlin<br>
Embedded Linux and Kernel engineering<br>
<a href="https://bootlin.com" rel="noreferrer" target="_blank">https://bootlin.com</a><br>
<br>
</blockquote></div></div>