drm/xe: fix XE_DISPLAY dependency on ACPI
Trying to run KUnit without passing arch currently fails with:
$ ./tools/testing/kunit/kunit.py run --kunitconfig drivers/gpu/drm/xe/.kunitconfig
[10:42:07] Configuring KUnit Kernel ...
[10:42:07] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=8
ERROR:root:../drivers/gpu/drm/xe/display/intel_acpi.c: In function ‘intel_dsm_platform_mux_info’:
../drivers/gpu/drm/xe/display/intel_acpi.c:86:15: error: implicit declaration of function ‘acpi_evaluate_dsm_typed’; did you mean ‘acpi_evaluate_dsm’? [-Werror=implicit-function-declaration]
86 | pkg = acpi_evaluate_dsm_typed(dhandle, &intel_dsm_guid,
| ^~~~~~~~~~~~~~~~~~~~~~~
| acpi_evaluate_dsm
../drivers/gpu/drm/xe/display/intel_acpi.c:86:13: warning: assignment to ‘union acpi_object *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
86 | pkg = acpi_evaluate_dsm_typed(dhandle, &intel_dsm_guid,
| ^
../drivers/gpu/drm/xe/display/intel_acpi.c: In function ‘intel_dsm_pci_probe’:
../drivers/gpu/drm/xe/display/intel_acpi.c:142:14: error: implicit declaration of function ‘acpi_check_dsm’; did you mean ‘acpi_check_region’? [-Werror=implicit-function-declaration]
142 | if (!acpi_check_dsm(dhandle, &intel_dsm_guid, INTEL_DSM_REVISION_ID,
| ^~~~~~~~~~~~~~
| acpi_check_region
../drivers/gpu/drm/xe/display/intel_acpi.c: At top level:
../drivers/gpu/drm/xe/display/intel_acpi.c:176:6: error: redefinition of ‘intel_register_dsm_handler’
176 | void intel_register_dsm_handler(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/gpu/drm/xe/display/intel_acpi.c:13:
../drivers/gpu/drm/xe/display/intel_acpi.h:19:20: note: previous definition of ‘intel_register_dsm_handler’ with type ‘void(void)’
19 | static inline void intel_register_dsm_handler(void) { return; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.c:182:6: error: redefinition of ‘intel_unregister_dsm_handler’
182 | void intel_unregister_dsm_handler(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.h:20:20: note: previous definition of ‘intel_unregister_dsm_handler’ with type ‘void(void)’
20 | static inline void intel_unregister_dsm_handler(void) { return; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.c:186:6: error: redefinition of ‘intel_dsm_get_bios_data_funcs_supported’
186 | void intel_dsm_get_bios_data_funcs_supported(struct drm_i915_private *i915)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.h:22:6: note: previous definition of ‘intel_dsm_get_bios_data_funcs_supported’ with type ‘void(struct xe_device *)’
22 | void intel_dsm_get_bios_data_funcs_supported(struct drm_i915_private *i915) { return; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.c: In function ‘intel_dsm_get_bios_data_funcs_supported’:
../drivers/gpu/drm/xe/display/intel_acpi.c:199:31: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
199 | ACPI_FREE(obj);
| ^
../drivers/gpu/drm/xe/display/intel_acpi.c:188:25: warning: unused variable ‘pdev’ [-Wunused-variable]
188 | struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
| ^~~~
../drivers/gpu/drm/xe/display/intel_acpi.c: At top level:
../drivers/gpu/drm/xe/display/intel_acpi.c:266:6: error: redefinition of ‘intel_acpi_device_id_update’
266 | void intel_acpi_device_id_update(struct drm_i915_private *dev_priv)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.h:24:6: note: previous definition of ‘intel_acpi_device_id_update’ with type ‘void(struct xe_device *)’
24 | void intel_acpi_device_id_update(struct drm_i915_private *i915) { return; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.c:291:6: error: redefinition of ‘intel_acpi_assign_connector_fwnodes’
291 | void intel_acpi_assign_connector_fwnodes(struct drm_i915_private *i915)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.h:26:6: note: previous definition of ‘intel_acpi_assign_connector_fwnodes’ with type ‘void(struct xe_device *)’
26 | void intel_acpi_assign_connector_fwnodes(struct drm_i915_private *i915) { return; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.c: In function ‘intel_acpi_assign_connector_fwnodes’:
../drivers/gpu/drm/xe/display/intel_acpi.c:314:32: error: implicit declaration of function ‘acpi_find_child_device’; did you mean ‘acpi_match_device’? [-Werror=implicit-function-declaration]
314 | adev = acpi_find_child_device(ACPI_COMPANION(drm_dev->dev),
| ^~~~~~~~~~~~~~~~~~~~~~
| acpi_match_device
../drivers/gpu/drm/xe/display/intel_acpi.c:314:30: warning: assignment to ‘struct acpi_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
314 | adev = acpi_find_child_device(ACPI_COMPANION(drm_dev->dev),
| ^
../drivers/gpu/drm/xe/display/intel_acpi.c: At top level:
../drivers/gpu/drm/xe/display/intel_acpi.c:336:6: error: redefinition of ‘intel_acpi_video_register’
336 | void intel_acpi_video_register(struct drm_i915_private *i915)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/xe/display/intel_acpi.h:28:6: note: previous definition of ‘intel_acpi_video_register’ with type ‘void(struct xe_device *)’
28 | void intel_acpi_video_register(struct drm_i915_private *i915) { return; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~
The reason is that XE_DISPLAY depends on ACPI. This issue may
also manifest on other randconfig, so fix the dependencies.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Edited by Mauro Carvalho Chehab