drm/amd/powerplay: update OD support flag for SKU with no OD capabilities
Subsystems (2)
PATCH 1/2 drm/amd/powerplay: update OD support flag for SKU with no OD capabilities
For those ASICs with no overdrive capabilities, the OD support flag will be reset.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +3 -0
@@ -980,6 +980,9 @@ static int vega20_od8_set_feature_capabilities( pp_table->FanZeroRpmEnable) od_settings->overdrive8_capabilities |=OD8_FAN_ZERO_RPM_CONTROL ; +if (!od_settings->overdrive8_capabilities) + hwmgr->od_enabled = false; +return 0 ; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 drm/amd/powerplay: create pp_od_clk_voltage device file under OD support
Since pp_od_clk_voltage device file is for OD related sysfs operations.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +14 -8
@@ -2061,6 +2061,7 @@ void amdgpu_pm_print_power_states(struct amdgpu_device *adev)int amdgpu_pm_sysfs_init (struct amdgpu_device *adev) { +struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;int ret;if (adev->pm.sysfs_initialized)
@@ -2144,12 +2145,14 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) "pp_power_profile_mode\n");return ret; } - ret =device_create_file (adev->dev, - &dev_attr_pp_od_clk_voltage); -if (ret) { -DRM_ERROR ("failed to create device file " -"pp_od_clk_voltage\n" ); -return ret; +if (hwmgr->od_enabled) { + ret =device_create_file (adev->dev, + &dev_attr_pp_od_clk_voltage); +if (ret) { +DRM_ERROR ("failed to create device file " +"pp_od_clk_voltage\n" ); +return ret; + } } ret =device_create_file (adev->dev, &dev_attr_gpu_busy_percent);
@@ -2171,6 +2174,8 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)void amdgpu_pm_sysfs_fini (struct amdgpu_device *adev) { +struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle; +if (adev->pm.dpm_enabled ==0 )return ;
@@ -2191,8 +2196,9 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev)device_remove_file (adev->dev, &dev_attr_pp_mclk_od);device_remove_file (adev->dev, &dev_attr_pp_power_profile_mode); -device_remove_file (adev->dev, - &dev_attr_pp_od_clk_voltage); +if (hwmgr->od_enabled) +device_remove_file (adev->dev, + &dev_attr_pp_od_clk_voltage);device_remove_file (adev->dev, &dev_attr_gpu_busy_percent); }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Deucher, Alexander
Reviewed-byRe: [PATCH 2/2] drm/amd/powerplay: create pp_od_clk_voltage device file under OD support
Series is:
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Evan Quan <[email protected]>
Sent: Monday, January 7, 2019 7:05:56 AM
To: [email protected]
Cc: Deucher, Alexander; Quan, Evan; Freehill, Chris
Subject: [PATCH 2/2] drm/amd/powerplay: create pp_od_clk_voltage device file under OD support
Since pp_od_clk_voltage device file is for OD related sysfs operations.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +14 -8
@@ -2061,6 +2061,7 @@ void amdgpu_pm_print_power_states(struct amdgpu_device *adev)int amdgpu_pm_sysfs_init (struct amdgpu_device *adev) { +struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;int ret;if (adev->pm.sysfs_initialized)
@@ -2144,12 +2145,14 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) "pp_power_profile_mode\n");return ret; } - ret =device_create_file (adev->dev, - &dev_attr_pp_od_clk_voltage); -if (ret) { -DRM_ERROR ("failed to create device file " -"pp_od_clk_voltage\n" ); -return ret; +if (hwmgr->od_enabled) { + ret =device_create_file (adev->dev, + &dev_attr_pp_od_clk_voltage); +if (ret) { +DRM_ERROR ("failed to create device file " +"pp_od_clk_voltage\n" ); +return ret; + } } ret =device_create_file (adev->dev, &dev_attr_gpu_busy_percent);
@@ -2171,6 +2174,8 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)void amdgpu_pm_sysfs_fini (struct amdgpu_device *adev) { +struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle; +if (adev->pm.dpm_enabled ==0 )return ;
@@ -2191,8 +2196,9 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev)device_remove_file (adev->dev, &dev_attr_pp_mclk_od);device_remove_file (adev->dev, &dev_attr_pp_power_profile_mode); -device_remove_file (adev->dev, - &dev_attr_pp_od_clk_voltage); +if (hwmgr->od_enabled) +device_remove_file (adev->dev, + &dev_attr_pp_od_clk_voltage);device_remove_file (adev->dev, &dev_attr_gpu_busy_percent); }
--
2.20.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
To see the collection of prior postings to the list, visit the amd-gfx Archives.. Using amd-gfx: To post a message to all the list members, send email to [email protected] You can subscribe to the list, or change your existing subscription, in the sections below.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx