[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240813105134.17439-17-jose.exposito89@gmail.com>
Date: Tue, 13 Aug 2024 12:44:27 +0200
From: José Expósito <jose.exposito89@...il.com>
To: rodrigosiqueiramelo@...il.com
Cc: melissa.srw@...il.com,
mairacanal@...eup.net,
hamohammed.sa@...il.com,
daniel@...ll.ch,
maarten.lankhorst@...ux.intel.com,
mripard@...nel.org,
tzimmermann@...e.de,
airlied@...il.com,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
louis.chauvet@...tlin.com,
José Expósito <jose.exposito89@...il.com>
Subject: [RFC PATCH 16/17] drm/vkms: Allow to configure the default device creation
Add a new module param to allow to create or not the default VKMS
instance. Useful when combined with configfs to avoid having additional
VKMS instances.
Signed-off-by: José Expósito <jose.exposito89@...il.com>
---
drivers/gpu/drm/vkms/vkms_drv.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
index f524a9550017..248cb7166256 100644
--- a/drivers/gpu/drm/vkms/vkms_drv.c
+++ b/drivers/gpu/drm/vkms/vkms_drv.c
@@ -50,6 +50,10 @@ static bool enable_overlay;
module_param_named(enable_overlay, enable_overlay, bool, 0444);
MODULE_PARM_DESC(enable_overlay, "Enable/Disable overlay support");
+static bool create_default_dev = true;
+module_param_named(create_default_dev, create_default_dev, bool, 0444);
+MODULE_PARM_DESC(create_default_dev, "Create or not the default VKMS device");
+
DEFINE_DRM_GEM_FOPS(vkms_driver_fops);
static void vkms_release(struct drm_device *dev)
@@ -230,9 +234,11 @@ static int __init vkms_init(void)
default_config = config;
- ret = vkms_create(config);
- if (ret)
- goto err_kfree;
+ if (create_default_dev) {
+ ret = vkms_create(config);
+ if (ret)
+ goto err_kfree;
+ }
ret = vkms_configfs_register();
if (ret)
--
2.46.0
Powered by blists - more mailing lists