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 v2 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. For drivers that have custom module init/exit, the check is added to these functions instead. Since the drm_*_module_driver() macros are only for the default case when the init/exit just register/unregister the driver type. In v1 all KMS/DRM drivers were included but v2 only includes KMS drivers, and only the the PCI and platform DRM drivers. A follow-up series might do the same for rendering-only and USB/SPI/I2C drivers, but it will need more discussion to agree if that's desirable. 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 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 (37): drm: Add drm_module_{pci,platform}_driver() helper macros drm/hisilicon/hibmc: Use drm_module_pci_driver() to register the driver drm/komeda: Use drm_module_platform_driver() to register the driver drm/arm/hdlcd: Use drm_module_platform_driver() to register the driver drm/malidp: Use drm_module_platform_driver() to register the driver drm/aspeed: Use drm_module_platform_driver() to register the driver drm/atmel-hlcdc: Use drm_module_platform_driver() to register the driver drm/fsl-dcu: Use drm_module_platform_driver() to register the driver drm/hisilicon/kirin: Use drm_module_platform_driver() to register the driver drm/imx/dcss: Use drm_module_platform_driver() to register the driver drm/kmb: Use drm_module_platform_driver() to register the driver drm/meson: Use drm_module_platform_driver() to register the driver drm: mxsfb: Use drm_module_platform_driver() to register the driver drm/shmobile: Use drm_module_platform_driver() to register the driver drm/stm: Use drm_module_platform_driver() to register the driver drm/sun4i: Use drm_module_platform_driver() to register the driver drm/tidss: Use drm_module_platform_driver() to register the driver drm/arc: Use drm_module_platform_driver() to register the driver drm/tve200: Use drm_module_platform_driver() to register the driver drm/xlnx: Use drm_module_platform_driver() to register the driver drm/armada: Add support for the nomodeset kernel parameter drm/exynos: Add support for the nomodeset kernel parameter drm/gma500: Add support for the nomodeset kernel parameter drm/hyperv: Add support for the nomodeset kernel parameter drm/imx: Add support for the nomodeset kernel parameter drm/ingenic: Add support for the nomodeset kernel parameter drm/mcde: Add support for the nomodeset kernel parameter drm/mediatek: Add support for the nomodeset kernel parameter drm/msm: Add support for the nomodeset kernel parameter drm/omap: Add support for the nomodeset kernel parameter drm: rcar-du: Add support for the nomodeset kernel parameter drm/rockchip: Add support for the nomodeset kernel parameter drm/sprd: Add support for the nomodeset kernel parameter drm/sti: Add support for the nomodeset kernel parameter drm/tegra: Add support for the nomodeset kernel parameter drm/tilcdc: Add support for the nomodeset kernel parameter drm/xen: Add support for the nomodeset kernel parameter .../gpu/drm/arm/display/komeda/komeda_drv.c | 3 +- drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- drivers/gpu/drm/arm/malidp_drv.c | 2 +- drivers/gpu/drm/armada/armada_drv.c | 3 ++ drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 3 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- drivers/gpu/drm/gma500/psb_drv.c | 3 ++ .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 3 ++ drivers/gpu/drm/imx/dcss/dcss-drv.c | 2 +- drivers/gpu/drm/imx/imx-drm-core.c | 3 ++ drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 ++ drivers/gpu/drm/kmb/kmb_drv.c | 2 +- drivers/gpu/drm/mcde/mcde_drv.c | 3 ++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++ drivers/gpu/drm/meson/meson_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 3 ++ drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 3 ++ drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 ++ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 ++ drivers/gpu/drm/shmobile/shmob_drm_drv.c | 2 +- drivers/gpu/drm/sprd/sprd_drm.c | 3 ++ drivers/gpu/drm/sti/sti_drv.c | 3 ++ drivers/gpu/drm/stm/drv.c | 2 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- drivers/gpu/drm/tegra/drm.c | 3 ++ drivers/gpu/drm/tidss/tidss_drv.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 ++ drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/tve200/tve200_drv.c | 2 +- drivers/gpu/drm/xen/xen_drm_front.c | 3 ++ drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 2 +- include/drm/drm_drv.h | 50 +++++++++++++++++++ 37 files changed, 121 insertions(+), 19 deletions(-) -- 2.33.1