[Spice-devel] [PATCH 07/10] drm/qxl: Move ioctl array next to its only user

2021-12-17 Thread Thomas Zimmermann
Move the array qxl_ioctl to qxl_drv.c and initialize the num_ioctls field of struct drm_driver at runtime. Replaces the current fragile ioctl setup and allows for generating the module init/exit code. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.c | 12 +-

[Spice-devel] [PATCH 08/10] drm/qxl: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom qxl_init() and qxl_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c

[Spice-devel] [PATCH 09/10] drm/vboxvideo: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom vbox_init() and vbox_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vboxvideo/vbox_drv.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git

[Spice-devel] [PATCH 03/10] drm/bochs: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom bochs_init() and bochs_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/bochs.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/tiny/bochs.c

[Spice-devel] [PATCH 02/10] drm/ast: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom ast_init() and ast_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_drv.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_drv.c

[Spice-devel] [PATCH 10/10] drm/vmwgfx: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom vmwgfx_init() and vmwgfx_exit() functions and initialize the module with DRM_module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git

[Spice-devel] [PATCH 06/10] drm/mgag200: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom mgag200_init() and mgag200_exit() functions and initialize the module with DRM_module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git

[Spice-devel] [PATCH 05/10] drm/hisilicon/hibmc: Replace module initialization with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Replace module_pci_driver() with drm_module_pci_driver(). The DRM macro respects drm_firmware_drivers_only() and fails if the flag has been set. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Spice-devel] [PATCH 04/10] drm/cirrus: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom cirrus_init() and cirrus_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/cirrus.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/tiny/cirrus.c

[Spice-devel] [RFC][PATCH 00/10] drm: Add DRM module helpers for existing PCI drivers

2021-12-17 Thread Thomas Zimmermann
This is an RFC patchset to complement the helper macros provided in [1]. The module helpers create module init and exit helpers that respect the kernel parameters that enable/disable DRM drivers. There's one more patch that prepares qxl by moving some code around. It's required to make use of the

[Spice-devel] [PATCH 01/10] drm: Provide PCI module-init macros

2021-12-17 Thread Thomas Zimmermann
Provide helper macros to register PCI-based DRM drivers. The new macros behave like module_pci_driver() with an additional test if DRM modesetting has been enabled. Signed-off-by: Thomas Zimmermann --- Documentation/gpu/drm-internals.rst | 6 ++ include/drm/drm_module.h| 95