The plane name is now directly derived from the configfs folder
name. When a plane directory is created under
/config/vkms/<device>/planes/, the folder name is used as the
plane name via vkms_config_plane_set_name.

Signed-off-by: Louis Chauvet <[email protected]>
---
 Documentation/ABI/testing/configfs-vkms | 3 ++-
 drivers/gpu/drm/vkms/vkms_configfs.c    | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/ABI/testing/configfs-vkms 
b/Documentation/ABI/testing/configfs-vkms
index 26e7f81b5b7d..55e4183046ec 100644
--- a/Documentation/ABI/testing/configfs-vkms
+++ b/Documentation/ABI/testing/configfs-vkms
@@ -98,7 +98,8 @@ Date:         Nov 2025
 Contact:       [email protected]
 Description:
        This group contains attributes corresponding to the
-       plane <plane> of the VKMS device <device>.
+       plane <plane> of the VKMS device <device>. The name of
+       the directory becomes the name of the DRM plane.
 
 What:          /sys/kernel/config/vkms/<device>/planes/<plane>/type
 Date:          Nov 2025
diff --git a/drivers/gpu/drm/vkms/vkms_configfs.c 
b/drivers/gpu/drm/vkms/vkms_configfs.c
index c57791df72cb..bbfc0c8a922c 100644
--- a/drivers/gpu/drm/vkms/vkms_configfs.c
+++ b/drivers/gpu/drm/vkms/vkms_configfs.c
@@ -375,6 +375,13 @@ static struct config_group *make_plane_group(struct 
config_group *group,
                        return ERR_PTR(ret);
                }
 
+               ret = vkms_config_plane_set_name(plane->config, name, 
strlen(name));
+               if (ret) {
+                       vkms_config_destroy_plane(plane->config);
+                       kfree(plane);
+                       return ERR_PTR(ret);
+               }
+
                config_group_init_type_name(&plane->group, name, 
&plane_item_type);
 
                config_group_init_type_name(&plane->possible_crtcs_group,

-- 
2.56.0

Reply via email to