[PATCH] drm/xe: Select INTEL_VSEC to fix build dependency
Su Hui
suhui at nfschina.com
Fri Feb 28 03:33:44 UTC 2025
On 2025/2/28 00:03, Lucas De Marchi wrote:
> On Thu, Feb 27, 2025 at 03:32:06PM +0800, Su Hui wrote:
>> When build randconfig, there is an error:
>> ld: drivers/gpu/drm/xe/xe_vsec.o: in function `xe_vsec_init':
>> xe_vsec.c:(.text+0x182): undefined reference to `intel_vsec_register'
>>
>> When CONFIG_DRM_XE=y and CONFIG_INTEL_VSEC=m is set, ld couldn't find
>> 'intel_vsec_register'. Select INTEL_VSEC to fix this error.
>>
>> Fixes: 0c45e76fcc62 ("drm/xe/vsec: Support BMG devices")
>> Signed-off-by: Su Hui <suhui at nfschina.com>
>> ---
>> drivers/gpu/drm/xe/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
>> index b51a2bde73e2..7a60d96d2dd6 100644
>> --- a/drivers/gpu/drm/xe/Kconfig
>> +++ b/drivers/gpu/drm/xe/Kconfig
>> @@ -44,6 +44,7 @@ config DRM_XE
>> select WANT_DEV_COREDUMP
>> select AUXILIARY_BUS
>> select HMM_MIRROR
>> + select INTEL_VSEC
>
> intel_vsec is an x86 platform driver. I think we probably want to add a
> config that depends on INTEL_VSEC rather than selecting it like this.
> At the very least we need and `if x86` and also make sure the driver
> works without that part.
>
There is a recursive dependency between INTEL_VSEC and DRM_XE:
symbol DRM_XE depends on INTEL_VSEC
symbol INTEL_VSEC depends on X86_PLATFORM_DEVICES
symbol X86_PLATFORM_DEVICES is selected by DRM_XE
So if using 'depends on INTEL_VSEC', we should remove 'select
X86_PLATFORM_DEVICES', like this one:
config DRM_XE
tristate "Intel Xe Graphics"
depends on DRM && PCI && MMU && (m || (y && KUNIT=y))
+ depends on !X86 || INTEL_VSEC || INTEL_VSEC=n
+ depends on !X86 || !ACPI || ACPI_WMI
select INTERVAL_TREE
# we need shmfs for the swappable backing store, and in particular
# the shmem_readpage() which depends upon tmpfs
@@ -27,8 +29,6 @@ config DRM_XE
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
select ACPI_VIDEO if X86 && ACPI
- select X86_PLATFORM_DEVICES if X86 && ACPI
- select ACPI_WMI if X86 && ACPI
The 'select X86_PLATFORM_DEVICES' is introduced by 67a9e86dc130
("drm/xe: select
X86_PLATFORM_DEVICES when ACPI_WMI is selected"), so both ACPI_WMI need
to be changed.
Another choice is using 'select INTEL_VSEC if X86' and no need to change
other things.
Any suggestion for these two choices?
More information about the Intel-xe
mailing list