public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "José Expósito" <jose.exposito89@gmail.com>
To: rodrigosiqueiramelo@gmail.com
Cc: melissa.srw@gmail.com, mairacanal@riseup.net,
	hamohammed.sa@gmail.com, daniel@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	louis.chauvet@bootlin.com,
	"José Expósito" <jose.exposito89@gmail.com>
Subject: [RFC PATCH 16/17] drm/vkms: Allow to configure the default device creation
Date: Tue, 13 Aug 2024 12:44:27 +0200	[thread overview]
Message-ID: <20240813105134.17439-17-jose.exposito89@gmail.com> (raw)
In-Reply-To: <20240813105134.17439-1-jose.exposito89@gmail.com>

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@gmail.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


  parent reply	other threads:[~2024-08-13 10:51 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 10:44 [RFC PATCH 00/17] VKMS: Add configfs support José Expósito
2024-08-13 10:44 ` [RFC PATCH 01/17] drm/vkms: Extract vkms_config header José Expósito
2024-08-13 10:44 ` [RFC PATCH 02/17] drm/vkms: Move default_config creation to its own function José Expósito
2024-08-13 10:44 ` [RFC PATCH 03/17] drm/vkms: Set device name from vkms_config José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 04/17] drm/vkms: Allow to configure multiple CRTCs José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 05/17] drm/vkms: Use managed memory to create encoders José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 06/17] drm/vkms: Allow to configure multiple encoders José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 07/17] drm/vkms: Use managed memory to create connectors José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 08/17] drm/vkms: Allow to configure multiple connectors José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 09/17] drm/vkms: Allow to configure multiple overlay planes José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 10/17] drm/vkms: Allow to change connector status José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 11/17] drm/vkms: Add and remove VKMS instances via configfs José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 12/17] drm/vkms: Allow to configure multiple CRTCs " José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 13/17] drm/vkms: Allow to configure multiple encoders " José Expósito
2024-08-13 17:58   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 14/17] drm/vkms: Allow to configure multiple encoders José Expósito
2024-08-13 17:59   ` Louis Chauvet
2024-08-13 10:44 ` [RFC PATCH 15/17] drm/vkms: Allow to configure multiple planes via configfs José Expósito
2024-08-13 17:59   ` Louis Chauvet
2024-08-13 10:44 ` José Expósito [this message]
2024-08-13 10:44 ` [RFC PATCH 17/17] drm/vkms: Remove completed task from the TODO list José Expósito
2024-08-13 17:58 ` [RFC PATCH 00/17] VKMS: Add configfs support Louis Chauvet
2024-08-20 15:52   ` José Expósito
2024-08-14  9:10 ` Daniel Stone
2024-08-20 16:03   ` José Expósito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240813105134.17439-17-jose.exposito89@gmail.com \
    --to=jose.exposito89@gmail.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mairacanal@riseup.net \
    --cc=melissa.srw@gmail.com \
    --cc=mripard@kernel.org \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox