drm: Make drivers to honour the nomodeset parameter
Subsystems (47)
v2 cover drm: Make drivers to honour the nomodeset parameter
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(-)
Signature · 1 line
2.33.1
PATCH v2 1/37 drm: Add drm_module_{pci,platform}_driver() helper macros
According to disable Documentation/admin-guide/kernel-parameters.txt, the nomodeset 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, so let's add two helper macros that can be used by DRM drivers for PCI and platform devices to have module init functions that checks if the drivers could be loaded.
---
(no changes since v1)
include/drm/drm_drv.h | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
include/drm/drm_drv.h +50 -0
@@ -29,6 +29,8 @@#include <linux/list.h> #include <linux/irqreturn.h> +#include <linux/pci.h> +#include <linux/platform_device.h> #include <drm/drm_device.h>
@@ -604,4 +606,52 @@ int drm_dev_set_unique(struct drm_device *dev, const char *name);extern bool drm_firmware_drivers_only (void ); +/** +* drm_pci_register_driver() - register a DRM driver for PCI devices +* @drv: PCI driver structure +* +* Returns zero on success or a negative errno code on failure. +*/ +static inline int drm_pci_register_driver (struct pci_driver *drv) +{ +if (drm_firmware_drivers_only ()) +return -ENODEV ; + +return pci_register_driver (drv); +} + +/** +* drm_module_pci_driver() - helper macro for registering a DRM PCI driver +* +* Helper macro for DRM PCI drivers which do not do anything special in their +* module init/exit and just need the DRM specific module init. +*/ +#define drm_module_pci_driver (__pci_driver) \ + module_driver(__pci_driver, drm_pci_register_driver, \ + pci_unregister_driver) + +/** +* drm_platform_driver_register - register a DRM driver for platform devices +* @drv: platform driver structure +* +* Returns zero on success or a negative errno code on failure. +*/ +static inline int drm_platform_driver_register (struct platform_driver *drv) +{ +if (drm_firmware_drivers_only ()) +return -ENODEV ; + +return platform_driver_register (drv); +} + +/** +* drm_module_platform_driver() - helper macro for registering a DRM platform driver +* +* Helper macro for DRM platform drivers which do not do anything special in their +* module init/exit and just need the DRM specific module init. +*/ +#define drm_module_platform_driver (__platform_driver) \ + module_driver(__platform_driver, drm_platform_driver_register, \ + platform_driver_unregister) +#endif
Signature · 1 line
2.33.1
Thomas Zimmermann
maintainerRe: [PATCH v2 01/37] drm: Add drm_module_{pci,platform}_driver() helper macros
Hi Javier,
looks good already. Some comments are below.
Am 17.12.21 um 01:37 schrieb Javier Martinez Canillas:
include/drm/drm_drv.h
Quoted 20 lines
According to disable
Documentation/admin-guide/kernel-parameters.txt, the nomodeset 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, so let's add two helper macros that can be used by DRM drivers for PCI and platform devices to have module init functions that checks if the drivers could be loaded.
Suggested-by Thomas Zimmermann <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>---
(no changes since v1)
include/drm/drm_drv.h | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)include/drm/drm_drv.h +0
-0
I worked on a similar patch today and found that drm_drv.h is actually not a good place. Half of DRM includes this file and now it all depends on linux/pci.h and linux/platform.h (and probably other later).
I propose to put the module helpers into <drm/drm_module.h> and include it where necessary.
Quoted 13 lines
index
f6159acb8856..4001d73428c5100644include/drm/drm_drv.h +2
-0@@ -29,6 +29,8 @@#include <linux/list.h> #include <linux/irqreturn.h> +#include <linux/pci.h> +#include <linux/platform_device.h> #include <drm/drm_device.h>
include/drm/drm_drv.h int drm_dev_set_unique(struct drm_device *dev, const char *name); · line 615
Quoted 10 lines
include/drm/drm_drv.h +7
-0@@ -604,4 +606,52 @@ int drm_dev_set_unique(struct drm_device *dev, const char *name);extern bool drm_firmware_drivers_only (void ); +/** +* drm_pci_register_driver() - register a DRM driver for PCI devices +* @drv: PCI driver structure +* +* Returns zero on success or a negative errno code on failure. +*/ +static inline int drm_pci_register_driver (struct pci_driver *drv)
This should be declared as __init, so it goes into a separate section of the module. IIRC the page in the init section are released after the module has been loaded.
I'd either not document the register functions, or explicitly say that the module macros are the preferred way of using them.
include/drm/drm_drv.h int drm_dev_set_unique(struct drm_device *dev, const char *name); · line 624
Quoted 9 lines
include/drm/drm_drv.h +9
-0+{ +if (drm_firmware_drivers_only ()) +return -ENODEV ; + +return pci_register_driver (drv); +} + +/** +* drm_module_pci_driver() - helper macro for registering a DRM PCI driver
Docs for the __pci_driver argument
Quoted 16 lines
include/drm/drm_drv.h +15
-0+* +* Helper macro for DRM PCI drivers which do not do anything special in their +* module init/exit and just need the DRM specific module init. +*/ +#define drm_module_pci_driver (__pci_driver) \ + module_driver(__pci_driver, drm_pci_register_driver, \ + pci_unregister_driver) + +/** +* drm_platform_driver_register - register a DRM driver for platform devices +* @drv: platform driver structure +* +* Returns zero on success or a negative errno code on failure. +*/ +static inline int drm_platform_driver_register (struct platform_driver *drv)
include/drm/drm_drv.h int drm_dev_set_unique(struct drm_device *dev, const char *name); · line 648
Quoted 10 lines
include/drm/drm_drv.h +9
-0+{ +if (drm_firmware_drivers_only ()) +return -ENODEV ; + +return platform_driver_register (drv); +} + +/** +* drm_module_platform_driver() - helper macro for registering a DRM platform driver
Docs for the __platform_driver argument
Best regards
Thomas
Quoted 10 lines
+ *
+ * Helper macro for DRM platform drivers which do not do anything special in their
+ * module init/exit and just need the DRM specific module init.
+ */include/drm/drm_drv.h +4
-0+#define drm_module_platform_driver (__platform_driver) \ + module_driver(__platform_driver, drm_platform_driver_register, \ + platform_driver_unregister) +#endif
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
PATCH v2 2/37 drm/hisilicon/hibmc: Use drm_module_pci_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific PCI driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +1 -1
@@ -379,7 +379,7 @@ static struct pci_driver hibmc_pci_driver = { .driver.pm = &hibmc_pm_ops, }; -module_pci_driver (hibmc_pci_driver); +drm_module_pci_driver (hibmc_pci_driver);MODULE_DEVICE_TABLE (pci, hibmc_pci_table);MODULE_AUTHOR ("RongrongZou <[email protected]>" );
Signature · 1 line
2.33.1
PATCH v2 3/37 drm/komeda: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +2 -1
@@ -9,6 +9,7 @@#include <linux/platform_device.h> #include <linux/component.h> #include <linux/pm_runtime.h> +#include <drm/drm_drv.h> #include <drm/drm_of.h> #include "komeda_dev.h" #include "komeda_kms.h"
@@ -198,7 +199,7 @@ static struct platform_driver komeda_platform_driver = { }, }; -module_platform_driver (komeda_platform_driver); +drm_module_platform_driver (komeda_platform_driver);MODULE_AUTHOR ("James.Qian.Wang <[email protected]>" );MODULE_DESCRIPTION ("Komeda KMS driver" );
Signature · 1 line
2.33.1
PATCH v2 4/37 drm/arm/hdlcd: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/hdlcd_drv.c +1 -1
@@ -434,7 +434,7 @@ static struct platform_driver hdlcd_platform_driver = { }, }; -module_platform_driver (hdlcd_platform_driver); +drm_module_platform_driver (hdlcd_platform_driver);MODULE_AUTHOR ("Liviu Dudau" );MODULE_DESCRIPTION ("ARM HDLCD DRM driver" );
Signature · 1 line
2.33.1
PATCH v2 5/37 drm/malidp: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/arm/malidp_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_drv.c +1 -1
@@ -1008,7 +1008,7 @@ static struct platform_driver malidp_platform_driver = { }, }; -module_platform_driver (malidp_platform_driver); +drm_module_platform_driver (malidp_platform_driver);MODULE_AUTHOR ("Liviu Dudau <[email protected]>" );MODULE_DESCRIPTION ("ARM Mali DP DRM driver" );
Signature · 1 line
2.33.1
PATCH v2 6/37 drm/aspeed: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +1 -1
@@ -359,7 +359,7 @@ static struct platform_driver aspeed_gfx_platform_driver = { }, }; -module_platform_driver (aspeed_gfx_platform_driver); +drm_module_platform_driver (aspeed_gfx_platform_driver);MODULE_AUTHOR ("Joel Stanley <[email protected]>" );MODULE_DESCRIPTION ("ASPEED BMC DRM/KMS driver" );
Signature · 1 line
2.33.1
PATCH v2 7/37 drm/atmel-hlcdc: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +1 -1
@@ -833,7 +833,7 @@ static struct platform_driver atmel_hlcdc_dc_platform_driver = { .of_match_table = atmel_hlcdc_dc_of_match, }, }; -module_platform_driver (atmel_hlcdc_dc_platform_driver); +drm_module_platform_driver (atmel_hlcdc_dc_platform_driver);MODULE_AUTHOR ("Jean-Jacques Hiblot <[email protected]>" );MODULE_AUTHOR ("Boris Brezillon <[email protected]>" );
Signature · 1 line
2.33.1
PATCH v2 8/37 drm/fsl-dcu: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +1 -1
@@ -368,7 +368,7 @@ static struct platform_driver fsl_dcu_drm_platform_driver = { }, }; -module_platform_driver (fsl_dcu_drm_platform_driver); +drm_module_platform_driver (fsl_dcu_drm_platform_driver);MODULE_DESCRIPTION ("Freescale DCU DRM Driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.33.1
PATCH v2 9/37 drm/hisilicon/kirin: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +1 -1
@@ -307,7 +307,7 @@ static struct platform_driver kirin_drm_platform_driver = { }, }; -module_platform_driver (kirin_drm_platform_driver); +drm_module_platform_driver (kirin_drm_platform_driver);MODULE_AUTHOR ("Xinliang Liu <[email protected]>" );MODULE_AUTHOR ("Xinliang Liu <[email protected]>" );
Signature · 1 line
2.33.1
PATCH v2 10/37 drm/imx/dcss: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/imx/dcss/dcss-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/imx/dcss/dcss-drv.c +1 -1
@@ -131,7 +131,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 <[email protected]>" );MODULE_DESCRIPTION ("DCSS driver for i.MX8MQ" );
Signature · 1 line
2.33.1
kernel test robot
build botRe: [PATCH v2 10/37] drm/imx/dcss: Use drm_module_platform_driver() to register the driver
I love your patch! Yet something to improve:
Hi Javier,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20211215]
[also build test ERROR on v5.16-rc5]
[cannot apply to drm/drm-next shawnguo/for-next pinchartl-media/drm/du/next drm-exynos/exynos-drm-next v5.16-rc5 v5.16-rc4 v5.16-rc3] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Javier-Martinez-Canillas/drm-Make-drivers-to-honour-the-nomodeset-parameter/20211217-084031 base: 93bf6eee76c0e716f6b32de690b1c52991547bb4 config: arm64-randconfig-r034-20211216 (https://download.01.org/0day-ci/archive/20211217/202112172338.SdP9K7tX-lkp(a)intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c7b8e02dcec35660bbc9101ae0c1db11e5f7d1ab
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Javier-Martinez-Canillas/drm-Make-drivers-to-honour-the-nomodeset-parameter/20211217-084031 git checkout c7b8e02dcec35660bbc9101ae0c1db11e5f7d1ab
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/imx/dcss/
If you fix the issue, kindly add following tag as appropriate
All error/warnings (new ones prefixed by >>):
>> drivers/gpu/drm/imx/dcss/dcss-drv.c:134:1: warning: data definition has no type or storage class
134 | drm_module_platform_driver(dcss_platform_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/imx/dcss/dcss-drv.c:134:1: error: type defaults to 'int' in declaration of 'drm_module_platform_driver' [-Werror=implicit-int]
>> drivers/gpu/drm/imx/dcss/dcss-drv.c:134:1: warning: parameter names (without types) in function declaration
drivers/gpu/drm/imx/dcss/dcss-drv.c:124:31: warning: 'dcss_platform_driver' defined but not used [-Wunused-variable]
124 | static struct platform_driver dcss_platform_driver = {
| ^~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
vim +134 drivers/gpu/drm/imx/dcss/dcss-drv.c
133
> 134 drm_module_platform_driver(dcss_platform_driver);
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
PATCH v2 11/37 drm/kmb: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/kmb/kmb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/kmb/kmb_drv.c +1 -1
@@ -628,7 +628,7 @@ static struct platform_driver kmb_platform_driver = { }, }; -module_platform_driver (kmb_platform_driver); +drm_module_platform_driver (kmb_platform_driver);MODULE_AUTHOR ("Intel Corporation" );MODULE_DESCRIPTION ("Keembay Display driver" );
Signature · 1 line
2.33.1
PATCH v2 12/37 drm/meson: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/meson/meson_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/meson/meson_drv.c +1 -1
@@ -541,7 +541,7 @@ static struct platform_driver meson_drm_platform_driver = { }, }; -module_platform_driver (meson_drm_platform_driver); +drm_module_platform_driver (meson_drm_platform_driver);MODULE_AUTHOR ("Jasper St. Pierre <[email protected]>" );MODULE_AUTHOR ("Neil Armstrong <[email protected]>" );
Signature · 1 line
2.33.1
PATCH v2 13/37 drm: mxsfb: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +1 -1
@@ -410,7 +410,7 @@ static struct platform_driver mxsfb_platform_driver = { }, }; -module_platform_driver (mxsfb_platform_driver); +drm_module_platform_driver (mxsfb_platform_driver);MODULE_AUTHOR ("Marek Vasut <[email protected]>" );MODULE_DESCRIPTION ("Freescale MXS DRM/KMS driver" );
Signature · 1 line
2.33.1
PATCH v2 14/37 drm/shmobile: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/shmobile/shmob_drm_drv.c +1 -1
@@ -295,7 +295,7 @@ static struct platform_driver shmob_drm_platform_driver = { }, }; -module_platform_driver (shmob_drm_platform_driver); +drm_module_platform_driver (shmob_drm_platform_driver);MODULE_AUTHOR ("Laurent Pinchart <[email protected]>" );MODULE_DESCRIPTION ("Renesas SH Mobile DRM Driver" );
Signature · 1 line
2.33.1
PATCH v2 15/37 drm/stm: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/stm/drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/stm/drv.c +1 -1
@@ -236,7 +236,7 @@ static struct platform_driver stm_drm_platform_driver = { }, }; -module_platform_driver (stm_drm_platform_driver); +drm_module_platform_driver (stm_drm_platform_driver);MODULE_AUTHOR ("Philippe Cornu <[email protected]>" );MODULE_AUTHOR ("Yannick Fertre <[email protected]>" );
Signature · 1 line
2.33.1
PATCH v2 16/37 drm/sun4i: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_drv.c +1 -1
@@ -441,7 +441,7 @@ static struct platform_driver sun4i_drv_platform_driver = { .pm = &sun4i_drv_drm_pm_ops, }, }; -module_platform_driver (sun4i_drv_platform_driver); +drm_module_platform_driver (sun4i_drv_platform_driver);MODULE_AUTHOR ("Boris Brezillon <[email protected]>" );MODULE_AUTHOR ("Maxime Ripard <[email protected]>" );
Signature · 1 line
2.33.1
PATCH v2 17/37 drm/tidss: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/tidss/tidss_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tidss/tidss_drv.c +1 -1
@@ -251,7 +251,7 @@ static struct platform_driver tidss_platform_driver = { }, }; -module_platform_driver (tidss_platform_driver); +drm_module_platform_driver (tidss_platform_driver);MODULE_AUTHOR ("Tomi Valkeinen <[email protected]>" );MODULE_DESCRIPTION ("TI Keystone DSS Driver" );
Signature · 1 line
2.33.1
PATCH v2 18/37 drm/arc: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/tiny/arcpgu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tiny/arcpgu.c +1 -1
@@ -427,7 +427,7 @@ static struct platform_driver arcpgu_platform_driver = { }, }; -module_platform_driver (arcpgu_platform_driver); +drm_module_platform_driver (arcpgu_platform_driver);MODULE_AUTHOR ("Carlos Palminha <[email protected]>" );MODULE_DESCRIPTION ("ARC PGU DRM driver" );
Signature · 1 line
2.33.1
PATCH v2 19/37 drm/tve200: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/tve200/tve200_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tve200/tve200_drv.c +1 -1
@@ -266,7 +266,7 @@ static struct platform_driver tve200_driver = { .probe = tve200_probe, .remove = tve200_remove, }; -module_platform_driver (tve200_driver); +drm_module_platform_driver (tve200_driver);MODULE_DESCRIPTION (DRIVER_DESC );MODULE_AUTHOR ("Linus Walleij <[email protected]>" );
Signature · 1 line
2.33.1
PATCH v2 20/37 drm/xlnx: Use drm_module_platform_driver() to register the driver
In reply to Javier Martinez CanillasThe macro calls to a DRM specific platform driver init handler that checks whether the driver is allowed to be registered or not.
---
(no changes since v1)
drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/xlnx/zynqmp_dpsub.c +1 -1
@@ -286,7 +286,7 @@ static struct platform_driver zynqmp_dpsub_driver = { }, }; -module_platform_driver (zynqmp_dpsub_driver); +drm_module_platform_driver (zynqmp_dpsub_driver);MODULE_AUTHOR ("Xilinx, Inc." );MODULE_DESCRIPTION ("ZynqMP DP Subsystem Driver" );
Signature · 1 line
2.33.1
PATCH v2 21/37 drm/armada: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/armada/armada_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/armada/armada_drv.c +3 -0
@@ -273,6 +273,9 @@ static int __init armada_drm_init(void) {int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + ret =platform_driver_register (&armada_lcd_platform_driver);if (ret)return ret;
Signature · 1 line
2.33.1
PATCH v2 22/37 drm/exynos: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/exynos/exynos_drm_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/exynos/exynos_drm_drv.c +3 -0
@@ -464,6 +464,9 @@ static int exynos_drm_init(void) {int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + ret =exynos_drm_register_devices ();if (ret)return ret;
Signature · 1 line
2.33.1
PATCH v2 23/37 drm/gma500: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/gma500/psb_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/gma500/psb_drv.c +3 -0
@@ -538,6 +538,9 @@ static struct pci_driver psb_pci_driver = {static int __init psb_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +return pci_register_driver (&psb_pci_driver); }
Signature · 1 line
2.33.1
PATCH v2 24/37 drm/hyperv: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/hyperv/hyperv_drm_drv.c +3 -0
@@ -305,6 +305,9 @@ static int __init hyperv_init(void) {int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + ret =pci_register_driver (&hyperv_pci_driver);if (ret !=0 )return ret;
Signature · 1 line
2.33.1
Re: [PATCH v2 24/37] drm/hyperv: Add support for the nomodeset kernel parameter
Quoted 4 lines · Javier Martinez Canillas
According to disable
Documentation/admin-guide/kernel-parameters.txt, this parameter can be used to disable kernel modesetting.
Quoted 8 lines
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 <[email protected]>---
Quoted 23 lines
(no changes since v1)
drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/hyperv/hyperv_drm_drv.c +3
-1@@ -305,6 +305,9 @@ static int __init hyperv_init(void) {int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + ret =pci_register_driver (&hyperv_pci_driver);if (ret !=0 )return ret; --2.33.1
PATCH v2 25/37 drm/imx: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/imx/imx-drm-core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/imx/imx-drm-core.c +3 -0
@@ -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);
Signature · 1 line
2.33.1
PATCH v2 26/37 drm/ingenic: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/ingenic/ingenic-drm-drv.c +3 -0
@@ -1543,6 +1543,9 @@ static int ingenic_drm_init(void) {int err; +if (drm_firmware_drivers_only ()) +return -ENODEV ; +if (IS_ENABLED (CONFIG_DRM_INGENIC_IPU )) { err =platform_driver_register (ingenic_ipu_driver_ptr);if (err)
Signature · 1 line
2.33.1
PATCH v2 27/37 drm/mcde: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/mcde/mcde_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/mcde/mcde_drv.c +3 -0
@@ -491,6 +491,9 @@ static int __init mcde_drm_register(void) {int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + ret =platform_register_drivers (component_drivers,ARRAY_SIZE (component_drivers));if (ret)
Signature · 1 line
2.33.1
PATCH v2 28/37 drm/mediatek: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/mediatek/mtk_drm_drv.c +3 -0
@@ -210,6 +210,9 @@ static int mtk_drm_kms_init(struct drm_device *drm)struct device *dma_dev;int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; +if (!iommu_present (&platform_bus_type))return -EPROBE_DEFER ;
Signature · 1 line
2.33.1
PATCH v2 29/37 drm/msm: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/msm/msm_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/msm_drv.c +3 -0
@@ -518,6 +518,9 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)struct msm_mdss *mdss;int ret, i; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + ddev =drm_dev_alloc (drv, dev);if (IS_ERR (ddev)) {DRM_DEV_ERROR (dev,"failed to allocate drm_device\n" );
Signature · 1 line
2.33.1
PATCH v2 30/37 drm/omap: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/omapdrm/omap_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/omapdrm/omap_drv.c +3 -0
@@ -727,6 +727,9 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev)DBG ("%s" ,dev_name (dev)); +if (drm_firmware_drivers_only ()) +return -ENODEV ; +/* Allocate and initialize the DRM device. */ ddev =drm_dev_alloc (&omap_drm_driver, dev);if (IS_ERR (ddev))
Signature · 1 line
2.33.1
PATCH v2 31/37 drm: rcar-du: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3 -0
@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);
Signature · 1 line
2.33.1
Re: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi Javier,
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 5 lines
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.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.
Quoted 16 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0
drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +
This will completely disable all control of the display device when nomodeset is enabled.
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);Signature · 1 line
2.33.1
Thomas Zimmermann
maintainerRe: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi
Am 28.01.22 um 10:13 schrieb Kieran Bingham:
Quoted 6 lines
Hi Javier,
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 3 lines
According to disable
Documentation/admin-guide/kernel-parameters.txt, this parameter can be used to disable kernel modesetting.
Quoted 6 lines
Quoted 2 lines
DRM drivers will not perform display-mode changes or accelerated rendering and only the system framebuffer will be available if it was set-up.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.
Exactly this.
Quoted 27 lines
Quoted 17 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +This will completely disable all control of the display device when nomodeset is enabled.
Quoted 3 lines
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
There's no requirement for your driver. We just want a parameter where we can conveniently disable most of DRM's drivers and reduce it to a minimum. Helps distributions to provide a simple fallback mode. Most PCI-based drivers already support that. Now we're added it to the other drivers as well.
Quoted 5 lines
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
Best regards
Thomas
Quoted 13 lines
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Reviewed-by Kieran Bingham <[email protected]>Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);Signature · 1 line
2.33.1
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Laurent Pinchart
maintainerRe: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi Thomas,
Quoted 51 lines · Thomas Zimmermann
Am 28.01.22 um 10:13 schrieb Kieran Bingham:
Quoted 10 lines
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 5 lines
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.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.Exactly this.
Quoted 26 lines
Quoted 16 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +This will completely disable all control of the display device when nomodeset is enabled.
Quoted 3 lines
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
There's no requirement for your driver. We just want a parameter where we can conveniently disable most of DRM's drivers and reduce it to a minimum. Helps distributions to provide a simple fallback mode. Most PCI-based drivers already support that. Now we're added it to the other drivers as well.
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
I doubt that's going to work as you expect, clocks and regulators will get disabled at boot if not used by any driver.
Quoted 9 lines
Quoted 9 lines
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Reviewed-by Kieran Bingham <[email protected]>Quoted 3 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);
Signature · 3 lines
Regards, Laurent Pinchart
Thomas Zimmermann
maintainerRe: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi
Am 28.01.22 um 11:34 schrieb Laurent Pinchart:
Quoted 59 lines
Hi Thomas,
Quoted 56 lines · Thomas Zimmermann
Am 28.01.22 um 10:13 schrieb Kieran Bingham:
Quoted 10 lines
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 5 lines
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.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.Exactly this.
Quoted 26 lines
Quoted 16 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +This will completely disable all control of the display device when nomodeset is enabled.
Quoted 3 lines
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
There's no requirement for your driver. We just want a parameter where we can conveniently disable most of DRM's drivers and reduce it to a minimum. Helps distributions to provide a simple fallback mode. Most PCI-based drivers already support that. Now we're added it to the other drivers as well.
Quoted 5 lines
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
Quoted 5 lines
Quoted 2 lines
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
I doubt that's going to work as you expect, clocks and regulators will get disabled at boot if not used by any driver.
Simpledrm and simplefb attach to these firmware framebuffers. Both drivers look at the device tree nodes to acquire the relevant clocks and regulators.
Best regards
Thomas
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Reviewed-by Kieran Bingham <[email protected]>Quoted 3 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Laurent Pinchart
maintainerRe: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi Thomas,
Quoted 61 lines · Thomas Zimmermann
Am 28.01.22 um 11:34 schrieb Laurent Pinchart:
Quoted 60 lines · Thomas Zimmermann
Quoted 58 lines
Am 28.01.22 um 10:13 schrieb Kieran Bingham:
Quoted 10 lines
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 5 lines
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.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.Exactly this.
Quoted 26 lines
Quoted 16 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +This will completely disable all control of the display device when nomodeset is enabled.
Quoted 3 lines
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
There's no requirement for your driver. We just want a parameter where we can conveniently disable most of DRM's drivers and reduce it to a minimum. Helps distributions to provide a simple fallback mode. Most PCI-based drivers already support that. Now we're added it to the other drivers as well.
Quoted 5 lines
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
Quoted 6 lines
Quoted 2 lines
I doubt that's going to work as you expect, clocks and regulators will get disabled at boot if not used by any driver.
Simpledrm and simplefb attach to these firmware framebuffers. Both drivers look at the device tree nodes to acquire the relevant clocks and regulators.
How about clocks and regulators for the ancillary devices, such as encoders, or in the R-Car case, the external composer handled by the vsp1 driver (in drivers/media/platform/vsp1) ?
This approach may work fine on x86 desktop systems, but for ARM-based devices, the situation is usually more complex.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Reviewed-by Kieran Bingham <[email protected]>Quoted 3 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);
Signature · 3 lines
Regards, Laurent Pinchart
Thomas Zimmermann
maintainerRe: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi
Am 28.01.22 um 12:04 schrieb Laurent Pinchart:
Quoted 71 lines
Hi Thomas,
Quoted 61 lines · Thomas Zimmermann
Am 28.01.22 um 11:34 schrieb Laurent Pinchart:
Quoted 60 lines · Thomas Zimmermann
Quoted 58 lines
Am 28.01.22 um 10:13 schrieb Kieran Bingham:
Quoted 10 lines
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 5 lines
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.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.Exactly this.
Quoted 26 lines
Quoted 16 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +This will completely disable all control of the display device when nomodeset is enabled.
Quoted 3 lines
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
There's no requirement for your driver. We just want a parameter where we can conveniently disable most of DRM's drivers and reduce it to a minimum. Helps distributions to provide a simple fallback mode. Most PCI-based drivers already support that. Now we're added it to the other drivers as well.
Quoted 5 lines
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
Quoted 6 lines
Quoted 2 lines
I doubt that's going to work as you expect, clocks and regulators will get disabled at boot if not used by any driver.
Simpledrm and simplefb attach to these firmware framebuffers. Both drivers look at the device tree nodes to acquire the relevant clocks and regulators.
Quoted 6 lines
How about clocks and regulators for the ancillary devices, such as encoders, or in the R-Car case, the external composer handled by the vsp1 driver (in
drivers/media/platform/vsp1) ?This approach may work fine on x86 desktop systems, but for ARM-based devices, the situation is usually more complex.
Well, in that case the problem has always been there. We don't make it worse.
Best regards
Thomas
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Reviewed-by Kieran Bingham <[email protected]>Quoted 3 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Laurent Pinchart
maintainerRe: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi Thomas,
Quoted 74 lines · Thomas Zimmermann
Am 28.01.22 um 12:04 schrieb Laurent Pinchart:
Quoted 73 lines · Thomas Zimmermann
Quoted 61 lines
Am 28.01.22 um 11:34 schrieb Laurent Pinchart:
Quoted 60 lines · Thomas Zimmermann
Quoted 58 lines
Am 28.01.22 um 10:13 schrieb Kieran Bingham:
Quoted 10 lines
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 5 lines
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.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.Exactly this.
Quoted 26 lines
Quoted 16 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +This will completely disable all control of the display device when nomodeset is enabled.
Quoted 3 lines
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
There's no requirement for your driver. We just want a parameter where we can conveniently disable most of DRM's drivers and reduce it to a minimum. Helps distributions to provide a simple fallback mode. Most PCI-based drivers already support that. Now we're added it to the other drivers as well.
Quoted 5 lines
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
Quoted 6 lines
Quoted 2 lines
I doubt that's going to work as you expect, clocks and regulators will get disabled at boot if not used by any driver.
Simpledrm and simplefb attach to these firmware framebuffers. Both drivers look at the device tree nodes to acquire the relevant clocks and regulators.
How about clocks and regulators for the ancillary devices, such as encoders, or in the R-Car case, the external composer handled by the vsp1 driver (in
drivers/media/platform/vsp1) ?
Quoted 5 lines
Quoted 2 lines
This approach may work fine on x86 desktop systems, but for ARM-based devices, the situation is usually more complex.
Well, in that case the problem has always been there. We don't make it worse.
What's the point of adding nomodeset support in those drivers then, if it's known not to work ?
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Reviewed-by Kieran Bingham <[email protected]>Quoted 3 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);
Signature · 3 lines
Regards, Laurent Pinchart
Thomas Zimmermann
maintainerRe: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
Hi
Am 28.01.22 um 12:36 schrieb Laurent Pinchart:
Quoted 77 lines
Hi Thomas,
Quoted 74 lines · Thomas Zimmermann
Am 28.01.22 um 12:04 schrieb Laurent Pinchart:
Quoted 73 lines · Thomas Zimmermann
Quoted 61 lines
Am 28.01.22 um 11:34 schrieb Laurent Pinchart:
Quoted 60 lines · Thomas Zimmermann
Quoted 58 lines
Am 28.01.22 um 10:13 schrieb Kieran Bingham:
Quoted 10 lines
Quoting Javier Martinez Canillas (2021-12-17 00:37:46)
Quoted 5 lines
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.
What is the 'system framebuffer' in this instance? Reading
https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
it sounds like that means anything already set up by the bootloader.Exactly this.
Quoted 26 lines
Quoted 16 lines
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 <[email protected]>---
(no changes since v1)
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0drivers/gpu/drm/rcar-du/rcar_du_drv.c static struct platform_driver rcar_du_platform_driver = { · line 706
Quoted 6 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3
-0@@ -701,6 +701,9 @@ static struct platform_driver rcar_du_platform_driver = {static int __init rcar_du_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +This will completely disable all control of the display device when nomodeset is enabled.
Quoted 3 lines
Is there any requirement for us to support outputting to the display if it was previously set up? presumably without setting or changing any modes, but simply allowing the existing frame to be updated?
There's no requirement for your driver. We just want a parameter where we can conveniently disable most of DRM's drivers and reduce it to a minimum. Helps distributions to provide a simple fallback mode. Most PCI-based drivers already support that. Now we're added it to the other drivers as well.
Quoted 5 lines
I think the implication is that 'firmware drivers' would mean a display could be updated through some firmware interface, which we won't have ... so it seems reasonable to accept that this whole driver can be disabled in that instance.
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
Quoted 6 lines
Quoted 2 lines
I doubt that's going to work as you expect, clocks and regulators will get disabled at boot if not used by any driver.
Simpledrm and simplefb attach to these firmware framebuffers. Both drivers look at the device tree nodes to acquire the relevant clocks and regulators.
How about clocks and regulators for the ancillary devices, such as encoders, or in the R-Car case, the external composer handled by the vsp1 driver (in
drivers/media/platform/vsp1) ?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
This approach may work fine on x86 desktop systems, but for ARM-based devices, the situation is usually more complex.
Well, in that case the problem has always been there. We don't make it worse.
What's the point of adding nomodeset support in those drivers then, if it's known not to work ?
But nomodeset is know to work: it disables the driver. The behavior is consistent among all hardware-specific drivers.
Javier mentioned that there are kernel parameters to keep unused clocks/regulators working.
From the distribution POV, if we have users with broken graphics drivers we want to give them an easy workaround until we find a solution. Passing 'nomodeset ...' on the command line gives us that.
Best regards
Thomas
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Reading your mail that brought this thread up in my inbox, I think you've already hit merge on this, so don't worry about adding a tag in that instance, but I think this is ok.
Reviewed-by Kieran Bingham <[email protected]>Quoted 3 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +0
-0rcar_du_of_init (rcar_du_of_table);return platform_driver_register (&rcar_du_platform_driver);
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Re: [PATCH v2 31/37] drm: rcar-du: Add support for the nomodeset kernel parameter
In reply to Thomas ZimmermannQuoted 1 line · Thomas Zimmermann
Am 28.01.22 um 11:34 schrieb Laurent Pinchart:
[snip]
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines
It cannot be 'mode-setted'. We get a pre-configured framebuffer from the firmware or bootloader. Whatever we draw there shows up on the screen.
I doubt that's going to work as you expect, clocks and regulators will get disabled at boot if not used by any driver.
Simpledrm and simplefb attach to these firmware framebuffers. Both drivers look at the device tree nodes to acquire the relevant clocks and regulators.
Laurent is correct that in some cases it might be an issue. For example, if a SystemReady ES image is booted using the U-boot EFI stub instead of bootz.
In this case the system will be presented as EFI and the firmware framebuffer just taken from the EFI GOP. There won't be any Device Tree node describing the clocks, regulators, etc that are required for the framebuffer to work.
The user then will have to pass clk_ignore_unused, pd_ignore_unused and maybe other cmdline params (or even hack a DT to set regulator-always-on for needed regulators).
But that is also true if the user wants to disable the real DRM driver with modprobe.blacklist=rcar-du-drm.
What this patch does is just to make all DRM drivers consistent and honour the nomodeset param (whose name is really misleading but we can't change that).
Best regards,
Signature · 3 lines
Javier Martinez Canillas Linux Engineering Red Hat
PATCH v2 32/37 drm/rockchip: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/rockchip/rockchip_drm_drv.c +3 -0
@@ -457,6 +457,9 @@ static int __init rockchip_drm_init(void) {int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + num_rockchip_sub_drivers =0 ;ADD_ROCKCHIP_SUB_DRIVER (vop_platform_driver,CONFIG_DRM_ROCKCHIP ); ADD_ROCKCHIP_SUB_DRIVER(rockchip_lvds_driver,
Signature · 1 line
2.33.1
PATCH v2 33/37 drm/sprd: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/sprd/sprd_drm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/sprd/sprd_drm.c +3 -0
@@ -186,6 +186,9 @@ static struct platform_driver *sprd_drm_drivers[] = {static int __init sprd_drm_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +return platform_register_drivers (sprd_drm_drivers,ARRAY_SIZE (sprd_drm_drivers)); }
Signature · 1 line
2.33.1
PATCH v2 34/37 drm/sti: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/sti/sti_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/sti/sti_drv.c +3 -0
@@ -287,6 +287,9 @@ static struct platform_driver * const drivers[] = {static int sti_drm_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +return platform_register_drivers (drivers,ARRAY_SIZE (drivers)); }module_init (sti_drm_init);
Signature · 1 line
2.33.1
PATCH v2 35/37 drm/tegra: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/tegra/drm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/tegra/drm.c +3 -0
@@ -1382,6 +1382,9 @@ static int __init host1x_drm_init(void) {int err; +if (drm_firmware_drivers_only ()) +return -ENODEV ; + err =host1x_driver_register (&host1x_drm_driver);if (err <0 )return err;
Signature · 1 line
2.33.1
PATCH v2 36/37 drm/tilcdc: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +3 -0
@@ -604,6 +604,9 @@ static struct platform_driver tilcdc_platform_driver = {static int __init tilcdc_drm_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +DBG ("init" );tilcdc_panel_init ();return platform_driver_register (&tilcdc_platform_driver);
Signature · 1 line
2.33.1
Re: [PATCH v2 36/37] drm/tilcdc: Add support for the nomodeset kernel parameter
Quoted 10 lines · Javier Martinez Canillas
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 <[email protected]>
Quoted 23 lines
---
(no changes since v1)
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/tilcdc/tilcdc_drv.c +3
-0@@ -604,6 +604,9 @@ static struct platform_driver tilcdc_platform_driver = {static int __init tilcdc_drm_init (void ) { +if (drm_firmware_drivers_only ()) +return -ENODEV ; +DBG ("init" );tilcdc_panel_init ();return
platform_driver_register(&tilcdc_platform_driver);
PATCH v2 37/37 drm/xen: Add support for the nomodeset kernel parameter
In reply to Javier Martinez CanillasAccording 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.
---
(no changes since v1)
drivers/gpu/drm/xen/xen_drm_front.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/xen/xen_drm_front.c +3 -0
@@ -495,6 +495,9 @@ static int xen_drm_drv_init(struct xen_drm_front_info *front_info)struct drm_device *drm_dev;int ret; +if (drm_firmware_drivers_only ()) +return -ENODEV ; +DRM_INFO ("Creating %s\n" , xen_drm_driver.desc); drm_info =kzalloc (sizeof (*drm_info),GFP_KERNEL );
Signature · 1 line
2.33.1
Quoted 8 lines · Javier Martinez Canillas
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.
Pushed the remaining of the drivers patches from this set to drm-misc-next.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Linux Engineering Red Hat