[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc835469-b908-608b-7a1c-d3b7340d7c20@redhat.com>
Date: Wed, 3 Nov 2021 14:06:11 +0100
From: Javier Martinez Canillas <javierm@...hat.com>
To: Thomas Zimmermann <tzimmermann@...e.de>,
linux-kernel@...r.kernel.org
Cc: Peter Robinson <pbrobinson@...il.com>,
Michel Dänzer <michel@...nzer.net>,
Pekka Paalanen <pekka.paalanen@...labora.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Neal Gompa <ngompa13@...il.com>,
Alex Deucher <alexander.deucher@....com>,
Ben Skeggs <bskeggs@...hat.com>, Chia-I Wu <olvaffe@...il.com>,
Christian König <christian.koenig@....com>,
Daniel Vetter <daniel@...ll.ch>,
Dave Airlie <airlied@...hat.com>,
David Airlie <airlied@...ux.ie>,
Gerd Hoffmann <kraxel@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Gurchetan Singh <gurchetansingh@...omium.org>,
Hans de Goede <hdegoede@...hat.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
VMware Graphics <linux-graphics-maintainer@...are.com>,
Zack Rusin <zackr@...are.com>, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
linux-fbdev@...r.kernel.org, nouveau@...ts.freedesktop.org,
spice-devel@...ts.freedesktop.org,
virtualization@...ts.linux-foundation.org
Subject: Re: [RESEND PATCH 2/5] drm: Move nomodeset kernel parameter handler
to the DRM subsystem
Hello Thomas,
On 11/3/21 13:41, Thomas Zimmermann wrote:
> Hi
>
> Am 03.11.21 um 13:28 schrieb Javier Martinez Canillas:
>> The "nomodeset" kernel cmdline parameter is handled by the vgacon driver
>> but the exported vgacon_text_force() symbol is only used by DRM drivers.
>>
>> It makes much more sense for the parameter logic to be in the subsystem
>> of the drivers that are making use of it. Let's move that to DRM.
>>
>> Suggested-by: Daniel Vetter <daniel.vetter@...ll.ch>
>> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
>> ---
>>
>> drivers/gpu/drm/Makefile | 2 ++
>> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +--
>> drivers/gpu/drm/ast/ast_drv.c | 1 -
>> drivers/gpu/drm/drm_nomodeset.c | 26 +++++++++++++++++++++++++
>> drivers/gpu/drm/i915/i915_module.c | 2 --
>> drivers/gpu/drm/mgag200/mgag200_drv.c | 1 -
>> drivers/gpu/drm/nouveau/nouveau_drm.c | 1 -
>> drivers/gpu/drm/qxl/qxl_drv.c | 1 -
>> drivers/gpu/drm/radeon/radeon_drv.c | 1 -
>> drivers/gpu/drm/tiny/bochs.c | 1 -
>> drivers/gpu/drm/tiny/cirrus.c | 1 -
>> drivers/gpu/drm/vboxvideo/vbox_drv.c | 1 -
>> drivers/gpu/drm/virtio/virtgpu_drv.c | 1 -
>> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 -
>> drivers/video/console/vgacon.c | 21 --------------------
>> include/drm/drm_mode_config.h | 6 ++++++
>> include/linux/console.h | 6 ------
>> 17 files changed, 35 insertions(+), 41 deletions(-)
>> create mode 100644 drivers/gpu/drm/drm_nomodeset.c
>>
>> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
>> index 1c41156deb5f..0e2d60ea93ca 100644
>> --- a/drivers/gpu/drm/Makefile
>> +++ b/drivers/gpu/drm/Makefile
>> @@ -33,6 +33,8 @@ drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86.
>>
>> obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o
>>
>> +obj-y += drm_nomodeset.o
>
> Repeating my other comment, should this rather be protected by a
> separate config symbol that is selected by CONFIG_DRM?
>
I actually thought about that and my opinion is that obj-y reflects
what we really want here or do you envision this getting disabled
in some cases ?
Probably the problem is Kbuild descending into the drivers/gpu dir
even when CONFIG_DRM is not set. Maybe what we want is something
like the following instead?
diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile
index 835c88318cec..ef12ee05ba6e 100644
--- a/drivers/gpu/Makefile
+++ b/drivers/gpu/Makefile
@@ -3,6 +3,7 @@
# taken to initialize them in the correct order. Link order is the only way
# to ensure this currently.
obj-$(CONFIG_TEGRA_HOST1X) += host1x/
-obj-y += drm/ vga/
+obj-$(CONFIG_DRM) += drm/
+obj-y += vga/
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
obj-$(CONFIG_TRACE_GPU_MEM) += trace/
Best regards, --
Javier Martinez Canillas
Linux Engineering
Red Hat
Powered by blists - more mailing lists