The nomodeset kernel command line parameter is used to prevent the KMS/DRM drivers to be registered/probed. But only a few drivers implement support for this and most DRM drivers just ignore it. This patch series is a v3 to make DRM drivers to honour nomodeset. It is posted as separate patches to make easier for drivers maintainers to ack or pick them independently at their own pace. The drm_module_{pci,platform}_driver() helper macros are added, which are just wrappers around module_{pci,platform}_driver() but adding a check for drm_firmware_drivers_only() and returning -ENODEV if that is true. PCI and platform DRM drivers are then modified in the following patches to make use of those macros. Only KMS drivers will be ported to use these new macros, and only for PCI and platform DRM drivers. A follow-up series might do the same for drivers that are rendering-only and for USB/SPI/I2C devices, but it will need more discussion to agree whether that's desirable or not. Not all drivers were posted in v3 to avoid flooding the list with too many patches. I'm only including the patches adding the macros and some patches as an example of their usage. I've built tested with 'make allmodconfig && make M=drivers/gpu/drm' but I don't have hardware to test the drivers, so review/testing is appreciated. Best regards, Javier Changes in v3: - Include Thomas Zimmermann's patches in the series and rebase on top. - Add collected Acked-by tags from v2. Changes in v2: - Add drm_module_{pci,platform}_driver() macros and put the check there (Thomas Zimmermann). - Use the drm_module_*_driver() macros if possible (Thomas Zimmermann). - Leave the DRM drivers that don't set the DRIVER_MODESET driver feature (Lucas Stach). - Leave USB/SPI/I2C drivers and only include PCI and platform ones (Noralf Trønnes). - Add collected Reviewed-by tags Javier Martinez Canillas (5): drm: Provide platform module-init macro drm/imx/dcss: Replace module initialization with DRM helpers drm/komeda: Replace module initialization with DRM helpers drm/arm/hdlcd: Replace module initialization with DRM helpers drm/malidp: Replace module initialization with DRM helpers Thomas Zimmermann (5): drm: Provide PCI module-init macros drm/ast: Replace module-init boiler-plate code with DRM helpers drm/bochs: Replace module-init boiler-plate code with DRM helpers drm/cirrus: Replace module-init boiler-plate code with DRM helpers drm/hisilicon/hibmc: Replace module initialization with DRM helpers Documentation/gpu/drm-internals.rst | 6 + .../gpu/drm/arm/display/komeda/komeda_drv.c | 3 +- drivers/gpu/drm/arm/hdlcd_drv.c | 3 +- drivers/gpu/drm/arm/malidp_drv.c | 3 +- drivers/gpu/drm/ast/ast_drv.c | 18 +-- .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 +- drivers/gpu/drm/imx/dcss/dcss-drv.c | 3 +- drivers/gpu/drm/tiny/bochs.c | 20 +-- drivers/gpu/drm/tiny/cirrus.c | 17 +-- include/drm/drm_module.h | 125 ++++++++++++++++++ 10 files changed, 147 insertions(+), 54 deletions(-) create mode 100644 include/drm/drm_module.h -- 2.33.1