[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <j7yodlrk7wh3ylvb2z622ndlzm4guhahmakdb6l5d6qtv5sabo@w4bfiehtmaab>
Date: Tue, 27 May 2025 15:55:46 -0500
From: Lucas De Marchi <lucas.demarchi@...el.com>
To: Arnd Bergmann <arnd@...nel.org>
CC: Thomas Hellström <thomas.hellstrom@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>, Arnd Bergmann <arnd@...db.de>, "David
Airlie" <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Matthew Brost
<matthew.brost@...el.com>, Himal Prasad Ghimiray
<himal.prasad.ghimiray@...el.com>, Imre Deak <imre.deak@...el.com>, Ilpo
Järvinen <ilpo.jarvinen@...ux.intel.com>, "Michael J. Ruhl"
<michael.j.ruhl@...el.com>, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com>, <intel-xe@...ts.freedesktop.org>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/xe/vsec: fix CONFIG_INTEL_VSEC dependency
On Fri, May 23, 2025 at 02:10:46PM +0200, Arnd Bergmann wrote:
>From: Arnd Bergmann <arnd@...db.de>
>
>The XE driver can be built with or without VSEC support, but fails to link as
>built-in if vsec is in a loadable module:
>
>x86_64-linux-ld: vmlinux.o: in function `xe_vsec_init':
>(.text+0x1e83e16): undefined reference to `intel_vsec_register'
>
>The normal fix for this is to add a 'depends on INTEL_VSEC || !INTEL_VSEC',
>forcing XE to be a loadable module as well, but that causes a circular
>dependency:
>
> symbol DRM_XE depends on INTEL_VSEC
> symbol INTEL_VSEC depends on X86_PLATFORM_DEVICES
> symbol X86_PLATFORM_DEVICES is selected by DRM_XE
>
>The problem here is selecting a symbol from another subsystem, so change
>that as well and rephrase the 'select' into the corresponding dependency.
>Since X86_PLATFORM_DEVICES is 'default y', there is no change to
>defconfig builds here.
>
>Fixes: 0c45e76fcc62 ("drm/xe/vsec: Support BMG devices")
>Signed-off-by: Arnd Bergmann <arnd@...db.de>
>---
> drivers/gpu/drm/xe/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
>index beddd153c28c..c870b680431c 100644
>--- a/drivers/gpu/drm/xe/Kconfig
>+++ b/drivers/gpu/drm/xe/Kconfig
>@@ -2,6 +2,8 @@
> config DRM_XE
> tristate "Intel Xe Graphics"
> depends on DRM && PCI && (m || (y && KUNIT=y))
>+ depends on INTEL_VSEC || !INTEL_VSEC
>+ depends on INTEL_PLATFORM_DEVICES || !(X86 && ACPI)
^
Did you mean X86_PLATFORM_DEVICES here?
With that, Reviewed-by: Lucas De Marchi <lucas.demarchi@...el.com>
I see several drivers selecting
X86_PLATFORM_DEVICES though. Maybe they should also be translated to
dependencies instead?
$ git grep "select X86_PLATFORM_DEVICES"
drivers/gpu/drm/amd/amdgpu/Kconfig: select X86_PLATFORM_DEVICES if ACPI && X86
drivers/gpu/drm/gma500/Kconfig: select X86_PLATFORM_DEVICES if ACPI
drivers/gpu/drm/i915/Kconfig: select X86_PLATFORM_DEVICES if ACPI
drivers/gpu/drm/nouveau/Kconfig: select X86_PLATFORM_DEVICES if ACPI && X86
drivers/gpu/drm/radeon/Kconfig: select X86_PLATFORM_DEVICES if ACPI && X86
thanks
Lucas De Marchi
Powered by blists - more mailing lists