Skip to contentSkip to conversation

drm: Move radeon and amdgpu Kconfig options into their directories

PATCH Applied Andrew Davis 2 participants 2 messages Oct 26, 2022 – Oct 27, 2022

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

PATCH v3 1/1 drm: Move radeon and amdgpu Kconfig options into their directories

Most Kconfig options to enable a driver are in the Kconfig file inside the relevant directory, move these two to the same.

---

Changes from v2:
- Rebased on latest

Changes from v1:
- Fix whitespace issue pointed out by Randy

 drivers/gpu/drm/Kconfig            | 57 ------------------------------
 drivers/gpu/drm/amd/amdgpu/Kconfig | 29 +++++++++++++++
 drivers/gpu/drm/radeon/Kconfig     | 30 ++++++++++++++++
 3 files changed, 59 insertions(+), 57 deletions(-)
drivers/gpu/drm/Kconfig +0 -57
index fa986075e8fb..9c2d9495cb3c 100644
@@ -233,65 +233,8 @@ source "drivers/gpu/drm/i2c/Kconfig"
 
 source "drivers/gpu/drm/arm/Kconfig"
 
-config DRM_RADEON
-	tristate "ATI Radeon"
-	depends on DRM && PCI && MMU
-	depends on AGP || !AGP
-	select FW_LOADER
-	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
-        select DRM_KMS_HELPER
-        select DRM_TTM
-	select DRM_TTM_HELPER
-	select SND_HDA_COMPONENT if SND_HDA_CORE
-	select POWER_SUPPLY
-	select HWMON
-	select BACKLIGHT_CLASS_DEVICE
-	select INTERVAL_TREE
-	# radeon depends on ACPI_VIDEO when ACPI is enabled, for select to work
-	# ACPI_VIDEO's dependencies must also be selected.
-	select INPUT if ACPI
-	select ACPI_VIDEO if ACPI
-	# On x86 ACPI_VIDEO also needs ACPI_WMI
-	select X86_PLATFORM_DEVICES if ACPI && X86
-	select ACPI_WMI if ACPI && X86
-	help
-	  Choose this option if you have an ATI Radeon graphics card.  There
-	  are both PCI and AGP versions.  You don't need to choose this to
-	  run the Radeon in plain VGA mode.
-
-	  If M is selected, the module will be called radeon.
-
 source "drivers/gpu/drm/radeon/Kconfig"
 
-config DRM_AMDGPU
-	tristate "AMD GPU"
-	depends on DRM && PCI && MMU
-	select FW_LOADER
-	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HELPER
-	select DRM_KMS_HELPER
-	select DRM_SCHED
-	select DRM_TTM
-	select DRM_TTM_HELPER
-	select POWER_SUPPLY
-	select HWMON
-	select BACKLIGHT_CLASS_DEVICE
-	select INTERVAL_TREE
-	select DRM_BUDDY
-	# amdgpu depends on ACPI_VIDEO when ACPI is enabled, for select to work
-	# ACPI_VIDEO's dependencies must also be selected.
-	select INPUT if ACPI
-	select ACPI_VIDEO if ACPI
-	# On x86 ACPI_VIDEO also needs ACPI_WMI
-	select X86_PLATFORM_DEVICES if ACPI && X86
-	select ACPI_WMI if ACPI && X86
-	help
-	  Choose this option if you have a recent AMD Radeon graphics card.
-
-	  If M is selected, the module will be called amdgpu.
-
 source "drivers/gpu/drm/amd/amdgpu/Kconfig"
 
 source "drivers/gpu/drm/nouveau/Kconfig"
drivers/gpu/drm/amd/amdgpu/Kconfig +29 -0
index 7777d55275de..5fcd510f1abb 100644
@@ -1,4 +1,33 @@
 # SPDX-License-Identifier: MIT
+
+config DRM_AMDGPU
+	tristate "AMD GPU"
+	depends on DRM && PCI && MMU
+	select FW_LOADER
+	select DRM_DISPLAY_DP_HELPER
+	select DRM_DISPLAY_HDMI_HELPER
+	select DRM_DISPLAY_HELPER
+	select DRM_KMS_HELPER
+	select DRM_SCHED
+	select DRM_TTM
+	select DRM_TTM_HELPER
+	select POWER_SUPPLY
+	select HWMON
+	select BACKLIGHT_CLASS_DEVICE
+	select INTERVAL_TREE
+	select DRM_BUDDY
+	# amdgpu depends on ACPI_VIDEO when ACPI is enabled, for select to work
+	# ACPI_VIDEO's dependencies must also be selected.
+	select INPUT if ACPI
+	select ACPI_VIDEO if ACPI
+	# On x86 ACPI_VIDEO also needs ACPI_WMI
+	select X86_PLATFORM_DEVICES if ACPI && X86
+	select ACPI_WMI if ACPI && X86
+	help
+	  Choose this option if you have a recent AMD Radeon graphics card.
+
+	  If M is selected, the module will be called amdgpu.
+
 config DRM_AMDGPU_SI
 	bool "Enable amdgpu support for SI parts"
 	depends on DRM_AMDGPU
drivers/gpu/drm/radeon/Kconfig +30 -0
index 52819e7f1fca..2267c501f724 100644
@@ -1,4 +1,34 @@
 # SPDX-License-Identifier: MIT
+
+config DRM_RADEON
+	tristate "ATI Radeon"
+	depends on DRM && PCI && MMU
+	depends on AGP || !AGP
+	select FW_LOADER
+	select DRM_DISPLAY_DP_HELPER
+	select DRM_DISPLAY_HELPER
+	select DRM_KMS_HELPER
+	select DRM_TTM
+	select DRM_TTM_HELPER
+	select SND_HDA_COMPONENT if SND_HDA_CORE
+	select POWER_SUPPLY
+	select HWMON
+	select BACKLIGHT_CLASS_DEVICE
+	select INTERVAL_TREE
+	# radeon depends on ACPI_VIDEO when ACPI is enabled, for select to work
+	# ACPI_VIDEO's dependencies must also be selected.
+	select INPUT if ACPI
+	select ACPI_VIDEO if ACPI
+	# On x86 ACPI_VIDEO also needs ACPI_WMI
+	select X86_PLATFORM_DEVICES if ACPI && X86
+	select ACPI_WMI if ACPI && X86
+	help
+	  Choose this option if you have an ATI Radeon graphics card.  There
+	  are both PCI and AGP versions.  You don't need to choose this to
+	  run the Radeon in plain VGA mode.
+
+	  If M is selected, the module will be called radeon.
+
 config DRM_RADEON_USERPTR
 	bool "Always enable userptr support"
 	depends on DRM_RADEON
Signature · 1 line
2.37.3
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 169 lines · Andrew Davis

Most Kconfig options to enable a driver are in the Kconfig file inside the relevant directory, move these two to the same.

---

Changes from v2:
- Rebased on latest

Changes from v1:
- Fix whitespace issue pointed out by Randy

 drivers/gpu/drm/Kconfig            | 57 ------------------------------
 drivers/gpu/drm/amd/amdgpu/Kconfig | 29 +++++++++++++++
 drivers/gpu/drm/radeon/Kconfig     | 30 ++++++++++++++++
 3 files changed, 59 insertions(+), 57 deletions(-)
drivers/gpu/drm/Kconfig +0 -57
index fa986075e8fb..9c2d9495cb3c 100644
@@ -233,65 +233,8 @@ source "drivers/gpu/drm/i2c/Kconfig"
 
 source "drivers/gpu/drm/arm/Kconfig"
 
-config DRM_RADEON
-       tristate "ATI Radeon"
-       depends on DRM && PCI && MMU
-       depends on AGP || !AGP
-       select FW_LOADER
-       select DRM_DISPLAY_DP_HELPER
-       select DRM_DISPLAY_HELPER
-        select DRM_KMS_HELPER
-        select DRM_TTM
-       select DRM_TTM_HELPER
-       select SND_HDA_COMPONENT if SND_HDA_CORE
-       select POWER_SUPPLY
-       select HWMON
-       select BACKLIGHT_CLASS_DEVICE
-       select INTERVAL_TREE
-       # radeon depends on ACPI_VIDEO when ACPI is enabled, for select to work
-       # ACPI_VIDEO's dependencies must also be selected.
-       select INPUT if ACPI
-       select ACPI_VIDEO if ACPI
-       # On x86 ACPI_VIDEO also needs ACPI_WMI
-       select X86_PLATFORM_DEVICES if ACPI && X86
-       select ACPI_WMI if ACPI && X86
-       help
-         Choose this option if you have an ATI Radeon graphics card.  There
-         are both PCI and AGP versions.  You don't need to choose this to
-         run the Radeon in plain VGA mode.
-
-         If M is selected, the module will be called radeon.
-
 source "drivers/gpu/drm/radeon/Kconfig"
 
-config DRM_AMDGPU
-       tristate "AMD GPU"
-       depends on DRM && PCI && MMU
-       select FW_LOADER
-       select DRM_DISPLAY_DP_HELPER
-       select DRM_DISPLAY_HDMI_HELPER
-       select DRM_DISPLAY_HELPER
-       select DRM_KMS_HELPER
-       select DRM_SCHED
-       select DRM_TTM
-       select DRM_TTM_HELPER
-       select POWER_SUPPLY
-       select HWMON
-       select BACKLIGHT_CLASS_DEVICE
-       select INTERVAL_TREE
-       select DRM_BUDDY
-       # amdgpu depends on ACPI_VIDEO when ACPI is enabled, for select to work
-       # ACPI_VIDEO's dependencies must also be selected.
-       select INPUT if ACPI
-       select ACPI_VIDEO if ACPI
-       # On x86 ACPI_VIDEO also needs ACPI_WMI
-       select X86_PLATFORM_DEVICES if ACPI && X86
-       select ACPI_WMI if ACPI && X86
-       help
-         Choose this option if you have a recent AMD Radeon graphics card.
-
-         If M is selected, the module will be called amdgpu.
-
 source "drivers/gpu/drm/amd/amdgpu/Kconfig"
 
 source "drivers/gpu/drm/nouveau/Kconfig"
drivers/gpu/drm/amd/amdgpu/Kconfig +29 -0
index 7777d55275de..5fcd510f1abb 100644
@@ -1,4 +1,33 @@
 # SPDX-License-Identifier: MIT
+
+config DRM_AMDGPU
+       tristate "AMD GPU"
+       depends on DRM && PCI && MMU
+       select FW_LOADER
+       select DRM_DISPLAY_DP_HELPER
+       select DRM_DISPLAY_HDMI_HELPER
+       select DRM_DISPLAY_HELPER
+       select DRM_KMS_HELPER
+       select DRM_SCHED
+       select DRM_TTM
+       select DRM_TTM_HELPER
+       select POWER_SUPPLY
+       select HWMON
+       select BACKLIGHT_CLASS_DEVICE
+       select INTERVAL_TREE
+       select DRM_BUDDY
+       # amdgpu depends on ACPI_VIDEO when ACPI is enabled, for select to work
+       # ACPI_VIDEO's dependencies must also be selected.
+       select INPUT if ACPI
+       select ACPI_VIDEO if ACPI
+       # On x86 ACPI_VIDEO also needs ACPI_WMI
+       select X86_PLATFORM_DEVICES if ACPI && X86
+       select ACPI_WMI if ACPI && X86
+       help
+         Choose this option if you have a recent AMD Radeon graphics card.
+
+         If M is selected, the module will be called amdgpu.
+
 config DRM_AMDGPU_SI
        bool "Enable amdgpu support for SI parts"
        depends on DRM_AMDGPU
drivers/gpu/drm/radeon/Kconfig +30 -1
index 52819e7f1fca..2267c501f724 100644
@@ -1,4 +1,34 @@
 # SPDX-License-Identifier: MIT
+
+config DRM_RADEON
+       tristate "ATI Radeon"
+       depends on DRM && PCI && MMU
+       depends on AGP || !AGP
+       select FW_LOADER
+       select DRM_DISPLAY_DP_HELPER
+       select DRM_DISPLAY_HELPER
+       select DRM_KMS_HELPER
+       select DRM_TTM
+       select DRM_TTM_HELPER
+       select SND_HDA_COMPONENT if SND_HDA_CORE
+       select POWER_SUPPLY
+       select HWMON
+       select BACKLIGHT_CLASS_DEVICE
+       select INTERVAL_TREE
+       # radeon depends on ACPI_VIDEO when ACPI is enabled, for select to work
+       # ACPI_VIDEO's dependencies must also be selected.
+       select INPUT if ACPI
+       select ACPI_VIDEO if ACPI
+       # On x86 ACPI_VIDEO also needs ACPI_WMI
+       select X86_PLATFORM_DEVICES if ACPI && X86
+       select ACPI_WMI if ACPI && X86
+       help
+         Choose this option if you have an ATI Radeon graphics card.  There
+         are both PCI and AGP versions.  You don't need to choose this to
+         run the Radeon in plain VGA mode.
+
+         If M is selected, the module will be called radeon.
+
 config DRM_RADEON_USERPTR
        bool "Always enable userptr support"
        depends on DRM_RADEON
--

2.37.3