Skip to content

Commit dda0f45

Browse files
committed
drm/amdgpu/powerplay: properly set PP_GFXOFF_MASK (v2)
So that the setting reflects what the hw supports. This will be used in a subsequent patch so needs to be correct. v2: squash in fix from Colin Ian King Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205497 Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3d0e3ce commit dda0f45

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
727727

728728
switch (adev->asic_type) {
729729
case CHIP_VEGA20:
730+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
730731
vega20_set_ppt_funcs(smu);
731732
break;
732733
case CHIP_NAVI10:
@@ -735,6 +736,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
735736
navi10_set_ppt_funcs(smu);
736737
break;
737738
case CHIP_ARCTURUS:
739+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
738740
arcturus_set_ppt_funcs(smu);
739741
/* OD is not supported on Arcturus */
740742
smu->od_enabled =false;

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ static void hwmgr_init_workload_prority(struct pp_hwmgr *hwmgr)
8181

8282
int hwmgr_early_init(struct pp_hwmgr *hwmgr)
8383
{
84+
struct amdgpu_device *adev;
85+
8486
if (!hwmgr)
8587
return -EINVAL;
8688

@@ -94,8 +96,11 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
9496
hwmgr_init_workload_prority(hwmgr);
9597
hwmgr->gfxoff_state_changed_by_workload = false;
9698

99+
adev = hwmgr->adev;
100+
97101
switch (hwmgr->chip_family) {
98102
case AMDGPU_FAMILY_CI:
103+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
99104
hwmgr->smumgr_funcs = &ci_smu_funcs;
100105
ci_set_asic_special_caps(hwmgr);
101106
hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK |
@@ -106,12 +111,14 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
106111
smu7_init_function_pointers(hwmgr);
107112
break;
108113
case AMDGPU_FAMILY_CZ:
114+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
109115
hwmgr->od_enabled = false;
110116
hwmgr->smumgr_funcs = &smu8_smu_funcs;
111117
hwmgr->feature_mask &= ~PP_GFXOFF_MASK;
112118
smu8_init_function_pointers(hwmgr);
113119
break;
114120
case AMDGPU_FAMILY_VI:
121+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
115122
hwmgr->feature_mask &= ~PP_GFXOFF_MASK;
116123
switch (hwmgr->chip_id) {
117124
case CHIP_TOPAZ:
@@ -153,6 +160,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
153160
case AMDGPU_FAMILY_AI:
154161
switch (hwmgr->chip_id) {
155162
case CHIP_VEGA10:
163+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
156164
hwmgr->feature_mask &= ~PP_GFXOFF_MASK;
157165
hwmgr->smumgr_funcs = &vega10_smu_funcs;
158166
vega10_hwmgr_init(hwmgr);
@@ -162,6 +170,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
162170
vega12_hwmgr_init(hwmgr);
163171
break;
164172
case CHIP_VEGA20:
173+
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
165174
hwmgr->feature_mask &= ~PP_GFXOFF_MASK;
166175
hwmgr->smumgr_funcs = &vega20_smu_funcs;
167176
vega20_hwmgr_init(hwmgr);

0 commit comments

Comments
 (0)