From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 00/60] drm: Make all drivers to honour the nomodeset parameter
Date: Wed, 15 Dec 2021 10:12:16 +0100 [thread overview]
Message-ID: <2e76bd93-a65e-094c-15a4-77375906a1b0@suse.de> (raw)
In-Reply-To: <58d00cac-dbf1-9704-3c0b-16fd837a5b6b@suse.de>
[-- Attachment #1.1: Type: text/plain, Size: 12217 bytes --]
Hi
Am 15.12.21 um 09:31 schrieb Thomas Zimmermann:
> Hi Javier,
>
> nothing wrong with your patches, but I'd like to propose slightly
> differnt solution.
>
> For many USB drivers, you put the drm_firmware_drivers_only() call into
> the probe function. For registering, these drivers use
> module_usb_driver(), which expands to generic device-register functions.
>
> I'd like to propose a similar macro for DRM drivers that includes the
> test for drm_firmware_drivers_only().
>
> In drm_drv.h :
>
> #if defined(USB)
> static int drm_usb_register(struct usb_driver *usb)
> {
> if (drm_firmware_drivers_only())
> return -ENODEV;
> return usb_register_driver(usb);
> }
> #define drm_module_usb_driver(__usb)
> module_driver(drm_usb_register, usb_deregister)
> #endif
>
> In each of the USB-based DRM drivers, replace module_usb_driver with
> drm_module_usb_driver.
>
> And then there's PCI [3] and platform drivers, [4] which can be handled
> similarly. Many PCI drivers open-code the module init and device
> registering with the driver-specific enable parameter. Maybe adding a
> driver-specific register function would make sense.
Just want to point out that the next time we add a new driver, it will
call drm_firmware_drivers_only() automatically if it uses such a macro.
Best regards
Thomas
>
> Best regards
> Thomas
>
> [1]
> https://elixir.bootlin.com/linux/v5.15.8/source/include/linux/usb.h#L1306
> [2]
> https://elixir.bootlin.com/linux/v5.15.8/source/include/linux/device/driver.h#L258
>
> [3]
> https://elixir.bootlin.com/linux/v5.15.8/source/include/linux/pci.h#L1453
> [4]
> https://elixir.bootlin.com/linux/v5.15.8/source/include/linux/platform_device.h#L251
>
>
>
> Am 15.12.21 um 01:59 schrieb 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 parameter and most DRM drivers would just ignore it.
>>
>> This (huge) patch series makes all DRM drivers to honour this
>> parameter. It
>> is posted as separate patches to make easier for drivers maintainers
>> to ack
>> or pick them independently at their own pace.
>>
>> Patches are quite trivial and just add an if
>> (drm_firmware_drivers_only())
>> check and return -ENODEV if that's true. The condition is checked as
>> early
>> as possible, that is in the module_init handler for drivers that have one
>> or in the probe function for drivers that are using the module_*_driver()
>> macros and don't have their own module init function.
>>
>> I included all the DRM drivers that think makes sense. I only left the
>> vc4
>> and v3d drivers, that Maxime is already handling in another patch series
>> and the vgem, vkms and simpledrm drivers that should ignore the param
>> IMO.
>>
>> I've built tested with 'make allmodconfig && make M=drivers/gpu/drm/',
>> but
>> only booted in a few devices with and without nomodeset in the
>> cmdline. So
>> testing and reviewing for all the drivers would be highly appreciated.
>>
>> Best regards,
>> Javier
>>
>>
>> Javier Martinez Canillas (60):
>> drm/komeda: Add support for the nomodeset kernel parameter
>> drm/arm/hdlcd: Add support for the nomodeset kernel parameter
>> drm/malidp: Add support for the nomodeset kernel parameter
>> drm/armada: Add support for the nomodeset kernel parameter
>> drm/aspeed: Add support for the nomodeset kernel parameter
>> drm/atmel-hlcdc: Add support for the nomodeset kernel parameter
>> drm/etnaviv: Add support for the nomodeset kernel parameter
>> drm/exynos: Add support for the nomodeset kernel parameter
>> drm/fsl-dcu: Add support for the nomodeset kernel parameter
>> drm/gma500: Add support for the nomodeset kernel parameter
>> drm/gud: Add support for the nomodeset kernel parameter
>> drm/hisilicon/hibmc: Add support for the nomodeset kernel parameter
>> drm/hisilicon/kirin: Add support for the nomodeset kernel parameter
>> drm/hyperv: Add support for the nomodeset kernel parameter
>> drm/i810: Add support for the nomodeset kernel parameter
>> drm/imx/dcss: 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/kmb: Add support for the nomodeset kernel parameter
>> drm/lima: 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/meson: Add support for the nomodeset kernel parameter
>> drm/mga: Add support for the nomodeset kernel parameter
>> drm/msm: Add support for the nomodeset kernel parameter
>> drm: mxsfb: Add support for the nomodeset kernel parameter
>> drm/omap: Add support for the nomodeset kernel parameter
>> drm/panel: ilitek-ili9341: Add support for the nomodeset kernel
>> parameter
>> drm/panfrost: Add support for the nomodeset kernel parameter
>> drm/pl111: Add support for the nomodeset kernel parameter
>> drm/r128: 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/savage: Add support for the nomodeset kernel parameter
>> drm/shmobile: Add support for the nomodeset kernel parameter
>> drm/sis: 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/stm: Add support for the nomodeset kernel parameter
>> drm/sun4i: Add support for the nomodeset kernel parameter
>> drm/tdfx: Add support for the nomodeset kernel parameter
>> drm/tegra: Add support for the nomodeset kernel parameter
>> drm/tidss: Add support for the nomodeset kernel parameter
>> drm/tilcdc: Add support for the nomodeset kernel parameter
>> drm/arc: Add support for the nomodeset kernel parameter
>> drm/gm12u320: Add support for the nomodeset kernel parameter
>> drm/hx8357d: Add support for the nomodeset kernel parameter
>> drm/ili9163: Add support for the nomodeset kernel parameter
>> drm/ili9225: Add support for the nomodeset kernel parameter
>> drm/ili9341: Add support for the nomodeset kernel parameter
>> drm/ili9486: Add support for the nomodeset kernel parameter
>> drm/mi0283qt: Add support for the nomodeset kernel parameter
>> drm/repaper: Add support for the nomodeset kernel parameter
>> drm/st7586: Add support for the nomodeset kernel parameter
>> drm/st7735r: Add support for the nomodeset kernel parameter
>> drm/tve200: Add support for the nomodeset kernel parameter
>> drm/udl: Add support for the nomodeset kernel parameter
>> drm/via: Add support for the nomodeset kernel parameter
>> drm/xen: Add support for the nomodeset kernel parameter
>> drm/xlnx: Add support for the nomodeset kernel parameter
>>
>> drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++++
>> drivers/gpu/drm/arm/hdlcd_drv.c | 3 +++
>> drivers/gpu/drm/arm/malidp_drv.c | 3 +++
>> drivers/gpu/drm/armada/armada_drv.c | 3 +++
>> drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +++
>> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 3 +++
>> drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 +++
>> drivers/gpu/drm/exynos/exynos_drm_drv.c | 3 +++
>> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 3 +++
>> drivers/gpu/drm/gma500/psb_drv.c | 3 +++
>> drivers/gpu/drm/gud/gud_drv.c | 3 +++
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 +++
>> drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +++
>> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 3 +++
>> drivers/gpu/drm/i810/i810_drv.c | 3 +++
>> drivers/gpu/drm/imx/dcss/dcss-drv.c | 3 +++
>> 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 | 3 +++
>> drivers/gpu/drm/lima/lima_drv.c | 3 +++
>> drivers/gpu/drm/mcde/mcde_drv.c | 3 +++
>> drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 +++
>> drivers/gpu/drm/meson/meson_drv.c | 3 +++
>> drivers/gpu/drm/mga/mga_drv.c | 3 +++
>> drivers/gpu/drm/msm/msm_drv.c | 3 +++
>> drivers/gpu/drm/mxsfb/mxsfb_drv.c | 3 +++
>> drivers/gpu/drm/omapdrm/omap_drv.c | 3 +++
>> drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 3 +++
>> drivers/gpu/drm/panfrost/panfrost_drv.c | 3 +++
>> drivers/gpu/drm/pl111/pl111_drv.c | 3 +++
>> drivers/gpu/drm/r128/r128_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/savage/savage_drv.c | 3 +++
>> drivers/gpu/drm/shmobile/shmob_drm_drv.c | 3 +++
>> drivers/gpu/drm/sis/sis_drv.c | 3 +++
>> drivers/gpu/drm/sprd/sprd_drm.c | 3 +++
>> drivers/gpu/drm/sti/sti_drv.c | 3 +++
>> drivers/gpu/drm/stm/drv.c | 3 +++
>> drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +++
>> drivers/gpu/drm/tdfx/tdfx_drv.c | 3 +++
>> drivers/gpu/drm/tegra/drm.c | 3 +++
>> drivers/gpu/drm/tidss/tidss_drv.c | 3 +++
>> drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++
>> drivers/gpu/drm/tiny/arcpgu.c | 3 +++
>> drivers/gpu/drm/tiny/gm12u320.c | 3 +++
>> drivers/gpu/drm/tiny/hx8357d.c | 3 +++
>> drivers/gpu/drm/tiny/ili9163.c | 3 +++
>> drivers/gpu/drm/tiny/ili9225.c | 3 +++
>> drivers/gpu/drm/tiny/ili9341.c | 3 +++
>> drivers/gpu/drm/tiny/ili9486.c | 3 +++
>> drivers/gpu/drm/tiny/mi0283qt.c | 3 +++
>> drivers/gpu/drm/tiny/repaper.c | 3 +++
>> drivers/gpu/drm/tiny/st7586.c | 3 +++
>> drivers/gpu/drm/tiny/st7735r.c | 3 +++
>> drivers/gpu/drm/tve200/tve200_drv.c | 3 +++
>> drivers/gpu/drm/udl/udl_drv.c | 3 +++
>> drivers/gpu/drm/via/via_drv.c | 3 +++
>> drivers/gpu/drm/xen/xen_drm_front.c | 3 +++
>> drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 3 +++
>> 60 files changed, 181 insertions(+)
>>
>
--
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2021-12-15 9:12 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 0:59 [PATCH 00/60] drm: Make all drivers to honour the nomodeset parameter Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 01/60] drm/komeda: Add support for the nomodeset kernel parameter Javier Martinez Canillas
2022-01-24 17:09 ` Carsten Haitzler
2021-12-15 0:59 ` [PATCH 02/60] drm/arm/hdlcd: " Javier Martinez Canillas
2022-01-24 17:09 ` Carsten Haitzler
2021-12-15 0:59 ` [PATCH 03/60] drm/malidp: " Javier Martinez Canillas
2022-01-24 17:09 ` Carsten Haitzler
2021-12-15 0:59 ` [PATCH 04/60] drm/armada: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 05/60] drm/aspeed: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 06/60] drm/atmel-hlcdc: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 07/60] drm/etnaviv: " Javier Martinez Canillas
2021-12-15 9:18 ` Lucas Stach
2021-12-15 9:39 ` Thomas Zimmermann
2021-12-15 9:45 ` Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 08/60] drm/exynos: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 09/60] drm/fsl-dcu: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 10/60] drm/gma500: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 11/60] drm/gud: " Javier Martinez Canillas
2021-12-15 21:37 ` Noralf Trønnes
2021-12-15 21:50 ` Javier Martinez Canillas
2021-12-16 8:20 ` Thomas Zimmermann
2021-12-16 15:47 ` Noralf Trønnes
2021-12-15 0:59 ` [PATCH 12/60] drm/hisilicon/hibmc: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 13/60] drm/hisilicon/kirin: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 14/60] drm/hyperv: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 15/60] drm/i810: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 16/60] drm/imx/dcss: " Javier Martinez Canillas
2021-12-15 9:20 ` Lucas Stach
2021-12-15 0:59 ` [PATCH 17/60] drm/imx: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 18/60] drm/ingenic: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 19/60] drm/kmb: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 20/60] drm/lima: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 21/60] drm/mcde: " Javier Martinez Canillas
2021-12-15 1:02 ` Linus Walleij
2021-12-15 0:59 ` [PATCH 22/60] drm/mediatek: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 23/60] drm/meson: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 24/60] drm/mga: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 25/60] drm/msm: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 26/60] drm: mxsfb: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 27/60] drm/omap: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 28/60] drm/panel: ilitek-ili9341: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 29/60] drm/panfrost: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 30/60] drm/pl111: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 31/60] drm/r128: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 32/60] drm: rcar-du: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 33/60] drm/rockchip: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 34/60] drm/savage: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 35/60] drm/shmobile: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 36/60] drm/sis: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 37/60] drm/sprd: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 38/60] drm/sti: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 39/60] drm/stm: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 40/60] drm/sun4i: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 41/60] drm/tdfx: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 42/60] drm/tegra: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 43/60] drm/tidss: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 44/60] drm/tilcdc: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 45/60] drm/arc: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 46/60] drm/gm12u320: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 47/60] drm/hx8357d: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 48/60] drm/ili9163: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 49/60] drm/ili9225: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 50/60] drm/ili9341: " Javier Martinez Canillas
2021-12-15 0:59 ` [PATCH 51/60] drm/ili9486: " Javier Martinez Canillas
2021-12-15 1:00 ` [PATCH 52/60] drm/mi0283qt: " Javier Martinez Canillas
2021-12-16 15:48 ` Noralf Trønnes
2021-12-15 1:00 ` [PATCH 53/60] drm/repaper: " Javier Martinez Canillas
2021-12-16 15:48 ` Noralf Trønnes
2021-12-15 1:00 ` [PATCH 54/60] drm/st7586: " Javier Martinez Canillas
2021-12-15 1:00 ` [PATCH 55/60] drm/st7735r: " Javier Martinez Canillas
2021-12-15 1:00 ` [PATCH 56/60] drm/tve200: " Javier Martinez Canillas
2021-12-15 1:03 ` Linus Walleij
2021-12-15 1:00 ` [PATCH 57/60] drm/udl: " Javier Martinez Canillas
2021-12-15 1:00 ` [PATCH 58/60] drm/via: " Javier Martinez Canillas
2021-12-15 1:00 ` [PATCH 59/60] drm/xen: " Javier Martinez Canillas
2021-12-15 5:58 ` Oleksandr Andrushchenko
2021-12-15 8:14 ` Javier Martinez Canillas
2021-12-15 1:00 ` [PATCH 60/60] drm/xlnx: " Javier Martinez Canillas
2021-12-15 8:31 ` [PATCH 00/60] drm: Make all drivers to honour the nomodeset parameter Thomas Zimmermann
2021-12-15 8:50 ` Javier Martinez Canillas
2021-12-15 9:10 ` Thomas Zimmermann
2021-12-15 23:26 ` Javier Martinez Canillas
2021-12-15 9:12 ` Thomas Zimmermann [this message]
2021-12-15 9:25 ` Javier Martinez Canillas
2021-12-15 23:35 ` Laurent Pinchart
2021-12-16 0:13 ` Javier Martinez Canillas
2021-12-16 0:24 ` Laurent Pinchart
2021-12-16 0:38 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e76bd93-a65e-094c-15a4-77375906a1b0@suse.de \
--to=tzimmermann@suse.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).