Skip to contentSkip to conversation

accel/amdxdna: Fix Kconfig invalid configuration

PATCH Applied Liam R. Howlett 2 participants 3 messages Oct 9 – Oct 12

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/amdxdna: Fix Kconfig invalid configuration

The amdxdna has a soft dependency on the amd_pmf module. It will use an exported function if it is available and fall back to another function if it is not enabled.

amdxdna and amd_pmf are tridstate modules supporting both built [y] and modularized [m] in the .config file. Since the amdxdna decides to use the amd_pmf if it is either a module or built in (see drivers/accel/amdxdna/aie2_pci.h), then there is an issue if they are not compiled either both as modules or both as built-in.

Adding the optional dependency to Kconfig does not allow the configuration from being selected.

Fixes f66d6cc6891e4 ("accel/amdxdna: Support sensors for column utilization")
---
 drivers/accel/amdxdna/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/accel/amdxdna/Kconfig +1 -0
index f39d7a87296cd..eddff490b4f75 100644
@@ -6,6 +6,7 @@ config DRM_ACCEL_AMDXDNA
 	depends on DRM_ACCEL
 	depends on PCI && HAS_IOMEM
 	depends on X86_64
+	depends on AMD_PMF || !AMD_PMF
 	select DRM_SCHED
 	select DRM_GEM_SHMEM_HELPER
 	select FW_LOADER
Signature · 1 line
2.47.3
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Liam R. Howlett

The amdxdna has a soft dependency on the amd_pmf module. It will use an exported function if it is available and fall back to another function if it is not enabled.

amdxdna and amd_pmf are tridstate modules supporting both built [y] and modularized [m] in the .config file. Since the amdxdna decides to use the amd_pmf if it is either a module or built in (see drivers/accel/amdxdna/aie2_pci.h), then there is an issue if they are not compiled either both as modules or both as built-in.

Adding the optional dependency to Kconfig does not allow the configuration from being selected.

Fixes f66d6cc6891e4 ("accel/amdxdna: Support sensors for column utilization")
---
  drivers/accel/amdxdna/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/accel/amdxdna/Kconfig +0 -0
index f39d7a87296cd..eddff490b4f75 100644

drivers/accel/amdxdna/Kconfig config DRM_ACCEL_AMDXDNA · line 9

Quoted 4 lines
drivers/accel/amdxdna/Kconfig +1 -0
@@ -6,6 +6,7 @@ config DRM_ACCEL_AMDXDNA
  	depends on DRM_ACCEL
  	depends on PCI && HAS_IOMEM
  	depends on X86_64
+	depends on AMD_PMF || !AMD_PMF
Quoted 3 lines
drivers/accel/amdxdna/Kconfig +0 -0
  	select DRM_SCHED
  	select DRM_GEM_SHMEM_HELPER
  	select FW_LOADER
maintainer Applied
#2 lore raw

Applied to drm-misc-fixes.

Quoted 34 lines · Lizhi Hou
Quoted 24 lines · Liam R. Howlett

The amdxdna has a soft dependency on the amd_pmf module.  It will use an exported function if it is available and fall back to another function if it is not enabled.

amdxdna and amd_pmf are tridstate modules supporting both built [y] and modularized [m] in the .config file.  Since the amdxdna decides to use the amd_pmf if it is either a module or built in (see drivers/accel/amdxdna/aie2_pci.h), then there is an issue if they are not compiled either both as modules or both as built-in.

Adding the optional dependency to Kconfig does not allow the configuration from being selected.

Fixes f66d6cc6891e4 ("accel/amdxdna: Support sensors for column utilization")

---
  drivers/accel/amdxdna/Kconfig | 1 +

  1 file changed, 1 insertion(+)
drivers/accel/amdxdna/Kconfig +0 -0
index f39d7a87296cd..eddff490b4f75 100644
@@ -6,6 +6,7 @@ config DRM_ACCEL_AMDXDNA
Quoted 4 lines

      depends on DRM_ACCEL
      depends on PCI && HAS_IOMEM
      depends on X86_64
+    depends on AMD_PMF || !AMD_PMF

Quoted 3 lines

      select DRM_SCHED
      select DRM_GEM_SHMEM_HELPER
      select FW_LOADER