Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: share struct amdgpu_pm_state_type with powerplay module

rename amdgpu_pm_state_type to amd_pm_state_type

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rex Zhu and committed by
Alex Deucher
3a2c788d 0eb1c3d4

+27 -30
+2 -26
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 1299 1299 int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb); 1300 1300 void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb); 1301 1301 1302 - /** 1303 - * struct amdgpu_pm - power management datas 1304 - * It keeps track of various data needed to take powermanagement decision. 1305 - */ 1306 1302 1307 - enum amdgpu_pm_state_type { 1308 - /* not used for dpm */ 1309 - POWER_STATE_TYPE_DEFAULT, 1310 - POWER_STATE_TYPE_POWERSAVE, 1311 - /* user selectable states */ 1312 - POWER_STATE_TYPE_BATTERY, 1313 - POWER_STATE_TYPE_BALANCED, 1314 - POWER_STATE_TYPE_PERFORMANCE, 1315 - /* internal states */ 1316 - POWER_STATE_TYPE_INTERNAL_UVD, 1317 - POWER_STATE_TYPE_INTERNAL_UVD_SD, 1318 - POWER_STATE_TYPE_INTERNAL_UVD_HD, 1319 - POWER_STATE_TYPE_INTERNAL_UVD_HD2, 1320 - POWER_STATE_TYPE_INTERNAL_UVD_MVC, 1321 - POWER_STATE_TYPE_INTERNAL_BOOT, 1322 - POWER_STATE_TYPE_INTERNAL_THERMAL, 1323 - POWER_STATE_TYPE_INTERNAL_ACPI, 1324 - POWER_STATE_TYPE_INTERNAL_ULV, 1325 - POWER_STATE_TYPE_INTERNAL_3DPERF, 1326 - }; 1327 1303 1328 1304 enum amdgpu_int_thermal_type { 1329 1305 THERMAL_TYPE_NONE, ··· 1581 1605 /* vce requirements */ 1582 1606 struct amdgpu_vce_state vce_states[AMDGPU_MAX_VCE_LEVELS]; 1583 1607 enum amdgpu_vce_level vce_level; 1584 - enum amdgpu_pm_state_type state; 1585 - enum amdgpu_pm_state_type user_state; 1608 + enum amd_pm_state_type state; 1609 + enum amd_pm_state_type user_state; 1586 1610 u32 platform_caps; 1587 1611 u32 voltage_response_time; 1588 1612 u32 backbias_response_time;
+4 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
··· 52 52 { 53 53 struct drm_device *ddev = dev_get_drvdata(dev); 54 54 struct amdgpu_device *adev = ddev->dev_private; 55 - enum amdgpu_pm_state_type pm = adev->pm.dpm.user_state; 55 + enum amd_pm_state_type pm = adev->pm.dpm.user_state; 56 56 57 57 return snprintf(buf, PAGE_SIZE, "%s\n", 58 58 (pm == POWER_STATE_TYPE_BATTERY) ? "battery" : ··· 351 351 container_of(work, struct amdgpu_device, 352 352 pm.dpm.thermal.work); 353 353 /* switch to the thermal state */ 354 - enum amdgpu_pm_state_type dpm_state = POWER_STATE_TYPE_INTERNAL_THERMAL; 354 + enum amd_pm_state_type dpm_state = POWER_STATE_TYPE_INTERNAL_THERMAL; 355 355 356 356 if (!adev->pm.dpm_enabled) 357 357 return; ··· 379 379 } 380 380 381 381 static struct amdgpu_ps *amdgpu_dpm_pick_power_state(struct amdgpu_device *adev, 382 - enum amdgpu_pm_state_type dpm_state) 382 + enum amd_pm_state_type dpm_state) 383 383 { 384 384 int i; 385 385 struct amdgpu_ps *ps; ··· 516 516 { 517 517 int i; 518 518 struct amdgpu_ps *ps; 519 - enum amdgpu_pm_state_type dpm_state; 519 + enum amd_pm_state_type dpm_state; 520 520 int ret; 521 521 522 522 /* if dpm init failed */
+21
drivers/gpu/drm/amd/include/amd_shared.h
··· 85 85 AMD_PG_STATE_UNGATE, 86 86 }; 87 87 88 + enum amd_pm_state_type { 89 + /* not used for dpm */ 90 + POWER_STATE_TYPE_DEFAULT, 91 + POWER_STATE_TYPE_POWERSAVE, 92 + /* user selectable states */ 93 + POWER_STATE_TYPE_BATTERY, 94 + POWER_STATE_TYPE_BALANCED, 95 + POWER_STATE_TYPE_PERFORMANCE, 96 + /* internal states */ 97 + POWER_STATE_TYPE_INTERNAL_UVD, 98 + POWER_STATE_TYPE_INTERNAL_UVD_SD, 99 + POWER_STATE_TYPE_INTERNAL_UVD_HD, 100 + POWER_STATE_TYPE_INTERNAL_UVD_HD2, 101 + POWER_STATE_TYPE_INTERNAL_UVD_MVC, 102 + POWER_STATE_TYPE_INTERNAL_BOOT, 103 + POWER_STATE_TYPE_INTERNAL_THERMAL, 104 + POWER_STATE_TYPE_INTERNAL_ACPI, 105 + POWER_STATE_TYPE_INTERNAL_ULV, 106 + POWER_STATE_TYPE_INTERNAL_3DPERF, 107 + }; 108 + 88 109 struct amd_ip_funcs { 89 110 /* sets up early driver state (pre sw_init), does not configure hw - Optional */ 90 111 int (*early_init)(void *handle);