drm/vkms: Extract vkms_config header

Creating a new vkms_config structure will be more complex once we
start adding more options.

Extract the vkms_config structure to its own header and source files
and add functions to create and delete a vkms_config and to initialize
debugfs.

Refactor, no functional changes.

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Co-developed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-5-jose.exposito89@gmail.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
José Expósito
2025-02-18 11:12:04 +01:00
committed by Maxime Ripard
parent 5b5a56d9a2
commit d3ae1e394b
7 changed files with 121 additions and 42 deletions

View File

@@ -2,9 +2,22 @@
#include <kunit/test.h>
#include "../vkms_config.h"
MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
static void vkms_config_test_empty_config(struct kunit *test)
{
struct vkms_config *config;
config = vkms_config_create();
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, config);
vkms_config_destroy(config);
}
static struct kunit_case vkms_config_test_cases[] = {
KUNIT_CASE(vkms_config_test_empty_config),
{}
};