File tree Expand file tree Collapse file tree 4 files changed +22
-13
lines changed Expand file tree Collapse file tree 4 files changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,7 @@ static int amdgpu_ctx_set_stable_pstate(struct amdgpu_ctx *ctx,
296
296
{
297
297
struct amdgpu_device * adev = ctx -> adev ;
298
298
enum amd_dpm_forced_level level ;
299
+ u32 current_stable_pstate ;
299
300
int r ;
300
301
301
302
mutex_lock (& adev -> pm .stable_pstate_ctx_lock );
@@ -304,6 +305,10 @@ static int amdgpu_ctx_set_stable_pstate(struct amdgpu_ctx *ctx,
304
305
goto done ;
305
306
}
306
307
308
+ r = amdgpu_ctx_get_stable_pstate (ctx , & current_stable_pstate );
309
+ if (r || (stable_pstate == current_stable_pstate ))
310
+ goto done ;
311
+
307
312
switch (stable_pstate ) {
308
313
case AMDGPU_CTX_STABLE_PSTATE_NONE :
309
314
level = AMD_DPM_FORCED_LEVEL_AUTO ;
Original file line number Diff line number Diff line change 81
81
#include "mxgpu_vi.h"
82
82
#include "amdgpu_dm.h"
83
83
84
+ #if IS_ENABLED (CONFIG_X86 )
85
+ #include <asm/intel-family.h>
86
+ #endif
87
+
84
88
#define ixPCIE_LC_L1_PM_SUBSTATE 0x100100C6
85
89
#define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 0x00000001L
86
90
#define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 0x00000002L
@@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct amdgpu_device *adev)
1134
1138
WREG32_PCIE (ixPCIE_LC_CNTL , data );
1135
1139
}
1136
1140
1141
+ static bool aspm_support_quirk_check (void )
1142
+ {
1143
+ #if IS_ENABLED (CONFIG_X86 )
1144
+ struct cpuinfo_x86 * c = & cpu_data (0 );
1145
+
1146
+ return !(c -> x86 == 6 && c -> x86_model == INTEL_FAM6_ALDERLAKE );
1147
+ #else
1148
+ return true;
1149
+ #endif
1150
+ }
1151
+
1137
1152
static void vi_program_aspm (struct amdgpu_device * adev )
1138
1153
{
1139
1154
u32 data , data1 , orig ;
1140
1155
bool bL1SS = false;
1141
1156
bool bClkReqSupport = true;
1142
1157
1143
- if (!amdgpu_device_should_use_aspm (adev ))
1158
+ if (!amdgpu_device_should_use_aspm (adev ) || ! aspm_support_quirk_check () )
1144
1159
return ;
1145
1160
1146
1161
if (adev -> flags & AMD_IS_APU ||
Original file line number Diff line number Diff line change @@ -153,9 +153,4 @@ void dcn31_hw_sequencer_construct(struct dc *dc)
153
153
dc -> hwss .init_hw = dcn20_fpga_init_hw ;
154
154
dc -> hwseq -> funcs .init_pipes = NULL ;
155
155
}
156
- if (dc -> debug .disable_z10 ) {
157
- /*hw not support z10 or sw disable it*/
158
- dc -> hwss .z10_restore = NULL ;
159
- dc -> hwss .z10_save_init = NULL ;
160
- }
161
156
}
Original file line number Diff line number Diff line change @@ -1351,14 +1351,8 @@ static int smu_disable_dpms(struct smu_context *smu)
1351
1351
{
1352
1352
struct amdgpu_device * adev = smu -> adev ;
1353
1353
int ret = 0 ;
1354
- /*
1355
- * TODO: (adev->in_suspend && !adev->in_s0ix) is added to pair
1356
- * the workaround which always reset the asic in suspend.
1357
- * It's likely that workaround will be dropped in the future.
1358
- * Then the change here should be dropped together.
1359
- */
1360
1354
bool use_baco = !smu -> is_apu &&
1361
- ((( amdgpu_in_reset (adev ) || ( adev -> in_suspend && ! adev -> in_s0ix ) ) &&
1355
+ ((amdgpu_in_reset (adev ) &&
1362
1356
(amdgpu_asic_reset_method (adev ) == AMD_RESET_METHOD_BACO )) ||
1363
1357
((adev -> in_runpm || adev -> in_s4 ) && amdgpu_asic_supports_baco (adev )));
1364
1358
You can’t perform that action at this time.
0 commit comments