From 7a90a846ad3fc58edde357d2723c457510ba58c2 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Wed, 22 Dec 2021 09:28:28 +0100 Subject: drm/imx/dcss: Replace module initialization with DRM helpers Replace module_platform_driver() with drm_module_platform_driver(). The DRM macro respects drm_firmware_drivers_only() and fails if the flag has been set. Signed-off-by: Javier Martinez Canillas Reviewed-by: Lucas Stach Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20211222082831.196562-8-javierm@redhat.com --- drivers/gpu/drm/imx/dcss/dcss-drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/imx') diff --git a/drivers/gpu/drm/imx/dcss/dcss-drv.c b/drivers/gpu/drm/imx/dcss/dcss-drv.c index 8dc2f85c514b..24147ee7080e 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-drv.c +++ b/drivers/gpu/drm/imx/dcss/dcss-drv.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "dcss-dev.h" @@ -131,7 +132,7 @@ static struct platform_driver dcss_platform_driver = { }, }; -module_platform_driver(dcss_platform_driver); +drm_module_platform_driver(dcss_platform_driver); MODULE_AUTHOR("Laurentiu Palcu "); MODULE_DESCRIPTION("DCSS driver for i.MX8MQ"); -- cgit v1.2.3 From 56dcbfd934ad57a46f2039c8c466a3c56293480a Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Fri, 17 Dec 2021 01:37:40 +0100 Subject: drm/imx: Add support for the nomodeset kernel parameter According to disable Documentation/admin-guide/kernel-parameters.txt, this parameter can be used to disable kernel modesetting. DRM drivers will not perform display-mode changes or accelerated rendering and only the system framebuffer will be available if it was set-up. But only a few DRM drivers currently check for nomodeset, make this driver to also support the command line parameter. Signed-off-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20211217003752.3946210-26-javierm@redhat.com --- drivers/gpu/drm/imx/imx-drm-core.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/drm/imx') diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index cb685fe2039b..a57812ec36b1 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -341,6 +341,9 @@ static struct platform_driver * const drivers[] = { static int __init imx_drm_init(void) { + if (drm_firmware_drivers_only()) + return -ENODEV; + return platform_register_drivers(drivers, ARRAY_SIZE(drivers)); } module_init(imx_drm_init); -- cgit v1.2.3