diff options
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/Makefile | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 13 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/powerplay/Kconfig | 6 |
5 files changed, 1 insertions, 25 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index 53cf3971dfc3..61360e27715f 100644 --- a/drivers/gpu/drm/amd/amdgpu/Kconfig +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig | |||
| @@ -32,5 +32,4 @@ config DRM_AMDGPU_GART_DEBUGFS | |||
| 32 | Selecting this option creates a debugfs file to inspect the mapped | 32 | Selecting this option creates a debugfs file to inspect the mapped |
| 33 | pages. Uses more memory for housekeeping, enable only for debugging. | 33 | pages. Uses more memory for housekeeping, enable only for debugging. |
| 34 | 34 | ||
| 35 | source "drivers/gpu/drm/amd/powerplay/Kconfig" | ||
| 36 | source "drivers/gpu/drm/amd/acp/Kconfig" | 35 | source "drivers/gpu/drm/amd/acp/Kconfig" |
diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 9ec262d4b8a2..248a05d02917 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile | |||
| @@ -111,14 +111,10 @@ amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o | |||
| 111 | amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o | 111 | amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o |
| 112 | amdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o | 112 | amdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o |
| 113 | 113 | ||
| 114 | ifneq ($(CONFIG_DRM_AMD_POWERPLAY),) | ||
| 115 | |||
| 116 | include $(FULL_AMD_PATH)/powerplay/Makefile | 114 | include $(FULL_AMD_PATH)/powerplay/Makefile |
| 117 | 115 | ||
| 118 | amdgpu-y += $(AMD_POWERPLAY_FILES) | 116 | amdgpu-y += $(AMD_POWERPLAY_FILES) |
| 119 | 117 | ||
| 120 | endif | ||
| 121 | |||
| 122 | obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o | 118 | obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o |
| 123 | 119 | ||
| 124 | CFLAGS_amdgpu_trace_points.o := -I$(src) | 120 | CFLAGS_amdgpu_trace_points.o := -I$(src) |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index dbe89fb25694..71ed27eb3dde 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |||
| @@ -174,7 +174,6 @@ module_param_named(sched_jobs, amdgpu_sched_jobs, int, 0444); | |||
| 174 | MODULE_PARM_DESC(sched_hw_submission, "the max number of HW submissions (default 2)"); | 174 | MODULE_PARM_DESC(sched_hw_submission, "the max number of HW submissions (default 2)"); |
| 175 | module_param_named(sched_hw_submission, amdgpu_sched_hw_submission, int, 0444); | 175 | module_param_named(sched_hw_submission, amdgpu_sched_hw_submission, int, 0444); |
| 176 | 176 | ||
| 177 | #ifdef CONFIG_DRM_AMD_POWERPLAY | ||
| 178 | MODULE_PARM_DESC(powerplay, "Powerplay component (1 = enable, 0 = disable, -1 = auto (default))"); | 177 | MODULE_PARM_DESC(powerplay, "Powerplay component (1 = enable, 0 = disable, -1 = auto (default))"); |
| 179 | module_param_named(powerplay, amdgpu_powerplay, int, 0444); | 178 | module_param_named(powerplay, amdgpu_powerplay, int, 0444); |
| 180 | 179 | ||
| @@ -183,7 +182,6 @@ module_param_named(powercontainment, amdgpu_powercontainment, int, 0444); | |||
| 183 | 182 | ||
| 184 | MODULE_PARM_DESC(ppfeaturemask, "all power features enabled (default))"); | 183 | MODULE_PARM_DESC(ppfeaturemask, "all power features enabled (default))"); |
| 185 | module_param_named(ppfeaturemask, amdgpu_pp_feature_mask, int, 0444); | 184 | module_param_named(ppfeaturemask, amdgpu_pp_feature_mask, int, 0444); |
| 186 | #endif | ||
| 187 | 185 | ||
| 188 | MODULE_PARM_DESC(sclkdeepsleep, "SCLK Deep Sleep (1 = enable (default), 0 = disable)"); | 186 | MODULE_PARM_DESC(sclkdeepsleep, "SCLK Deep Sleep (1 = enable (default), 0 = disable)"); |
| 189 | module_param_named(sclkdeepsleep, amdgpu_sclk_deep_sleep_en, int, 0444); | 187 | module_param_named(sclkdeepsleep, amdgpu_sclk_deep_sleep_en, int, 0444); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 68ad24101a36..7532ff822aa7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
| @@ -42,7 +42,6 @@ static int amdgpu_powerplay_init(struct amdgpu_device *adev) | |||
| 42 | amd_pp = &(adev->powerplay); | 42 | amd_pp = &(adev->powerplay); |
| 43 | 43 | ||
| 44 | if (adev->pp_enabled) { | 44 | if (adev->pp_enabled) { |
| 45 | #ifdef CONFIG_DRM_AMD_POWERPLAY | ||
| 46 | struct amd_pp_init *pp_init; | 45 | struct amd_pp_init *pp_init; |
| 47 | 46 | ||
| 48 | pp_init = kzalloc(sizeof(struct amd_pp_init), GFP_KERNEL); | 47 | pp_init = kzalloc(sizeof(struct amd_pp_init), GFP_KERNEL); |
| @@ -55,7 +54,6 @@ static int amdgpu_powerplay_init(struct amdgpu_device *adev) | |||
| 55 | pp_init->device = amdgpu_cgs_create_device(adev); | 54 | pp_init->device = amdgpu_cgs_create_device(adev); |
| 56 | ret = amd_powerplay_init(pp_init, amd_pp); | 55 | ret = amd_powerplay_init(pp_init, amd_pp); |
| 57 | kfree(pp_init); | 56 | kfree(pp_init); |
| 58 | #endif | ||
| 59 | } else { | 57 | } else { |
| 60 | amd_pp->pp_handle = (void *)adev; | 58 | amd_pp->pp_handle = (void *)adev; |
| 61 | 59 | ||
| @@ -97,7 +95,6 @@ static int amdgpu_pp_early_init(void *handle) | |||
| 97 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 95 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
| 98 | int ret = 0; | 96 | int ret = 0; |
| 99 | 97 | ||
| 100 | #ifdef CONFIG_DRM_AMD_POWERPLAY | ||
| 101 | switch (adev->asic_type) { | 98 | switch (adev->asic_type) { |
| 102 | case CHIP_POLARIS11: | 99 | case CHIP_POLARIS11: |
| 103 | case CHIP_POLARIS10: | 100 | case CHIP_POLARIS10: |
| @@ -120,9 +117,6 @@ static int amdgpu_pp_early_init(void *handle) | |||
| 120 | adev->pp_enabled = false; | 117 | adev->pp_enabled = false; |
| 121 | break; | 118 | break; |
| 122 | } | 119 | } |
| 123 | #else | ||
| 124 | adev->pp_enabled = false; | ||
| 125 | #endif | ||
| 126 | 120 | ||
| 127 | ret = amdgpu_powerplay_init(adev); | 121 | ret = amdgpu_powerplay_init(adev); |
| 128 | if (ret) | 122 | if (ret) |
| @@ -144,12 +138,11 @@ static int amdgpu_pp_late_init(void *handle) | |||
| 144 | ret = adev->powerplay.ip_funcs->late_init( | 138 | ret = adev->powerplay.ip_funcs->late_init( |
| 145 | adev->powerplay.pp_handle); | 139 | adev->powerplay.pp_handle); |
| 146 | 140 | ||
| 147 | #ifdef CONFIG_DRM_AMD_POWERPLAY | ||
| 148 | if (adev->pp_enabled && adev->pm.dpm_enabled) { | 141 | if (adev->pp_enabled && adev->pm.dpm_enabled) { |
| 149 | amdgpu_pm_sysfs_init(adev); | 142 | amdgpu_pm_sysfs_init(adev); |
| 150 | amdgpu_dpm_dispatch_task(adev, AMD_PP_EVENT_COMPLETE_INIT, NULL, NULL); | 143 | amdgpu_dpm_dispatch_task(adev, AMD_PP_EVENT_COMPLETE_INIT, NULL, NULL); |
| 151 | } | 144 | } |
| 152 | #endif | 145 | |
| 153 | return ret; | 146 | return ret; |
| 154 | } | 147 | } |
| 155 | 148 | ||
| @@ -162,10 +155,8 @@ static int amdgpu_pp_sw_init(void *handle) | |||
| 162 | ret = adev->powerplay.ip_funcs->sw_init( | 155 | ret = adev->powerplay.ip_funcs->sw_init( |
| 163 | adev->powerplay.pp_handle); | 156 | adev->powerplay.pp_handle); |
| 164 | 157 | ||
| 165 | #ifdef CONFIG_DRM_AMD_POWERPLAY | ||
| 166 | if (adev->pp_enabled) | 158 | if (adev->pp_enabled) |
| 167 | adev->pm.dpm_enabled = true; | 159 | adev->pm.dpm_enabled = true; |
| 168 | #endif | ||
| 169 | 160 | ||
| 170 | return ret; | 161 | return ret; |
| 171 | } | 162 | } |
| @@ -216,7 +207,6 @@ static int amdgpu_pp_hw_fini(void *handle) | |||
| 216 | 207 | ||
| 217 | static void amdgpu_pp_late_fini(void *handle) | 208 | static void amdgpu_pp_late_fini(void *handle) |
| 218 | { | 209 | { |
| 219 | #ifdef CONFIG_DRM_AMD_POWERPLAY | ||
| 220 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 210 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
| 221 | 211 | ||
| 222 | if (adev->pp_enabled) { | 212 | if (adev->pp_enabled) { |
| @@ -227,7 +217,6 @@ static void amdgpu_pp_late_fini(void *handle) | |||
| 227 | if (adev->powerplay.ip_funcs->late_fini) | 217 | if (adev->powerplay.ip_funcs->late_fini) |
| 228 | adev->powerplay.ip_funcs->late_fini( | 218 | adev->powerplay.ip_funcs->late_fini( |
| 229 | adev->powerplay.pp_handle); | 219 | adev->powerplay.pp_handle); |
| 230 | #endif | ||
| 231 | } | 220 | } |
| 232 | 221 | ||
| 233 | static int amdgpu_pp_suspend(void *handle) | 222 | static int amdgpu_pp_suspend(void *handle) |
diff --git a/drivers/gpu/drm/amd/powerplay/Kconfig b/drivers/gpu/drm/amd/powerplay/Kconfig deleted file mode 100644 index af380335b425..000000000000 --- a/drivers/gpu/drm/amd/powerplay/Kconfig +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | config DRM_AMD_POWERPLAY | ||
| 2 | bool "Enable AMD powerplay component" | ||
| 3 | depends on DRM_AMDGPU | ||
| 4 | default n | ||
| 5 | help | ||
| 6 | select this option will enable AMD powerplay component. | ||
