File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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,
296296{
297297 struct amdgpu_device * adev = ctx -> adev ;
298298 enum amd_dpm_forced_level level ;
299+ u32 current_stable_pstate ;
299300 int r ;
300301
301302 mutex_lock (& adev -> pm .stable_pstate_ctx_lock );
@@ -304,6 +305,10 @@ static int amdgpu_ctx_set_stable_pstate(struct amdgpu_ctx *ctx,
304305 goto done ;
305306 }
306307
308+ r = amdgpu_ctx_get_stable_pstate (ctx , & current_stable_pstate );
309+ if (r || (stable_pstate == current_stable_pstate ))
310+ goto done ;
311+
307312 switch (stable_pstate ) {
308313 case AMDGPU_CTX_STABLE_PSTATE_NONE :
309314 level = AMD_DPM_FORCED_LEVEL_AUTO ;
Original file line number Diff line number Diff line change 8181#include "mxgpu_vi.h"
8282#include "amdgpu_dm.h"
8383
84+ #if IS_ENABLED (CONFIG_X86 )
85+ #include <asm/intel-family.h>
86+ #endif
87+
8488#define ixPCIE_LC_L1_PM_SUBSTATE 0x100100C6
8589#define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 0x00000001L
8690#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)
11341138 WREG32_PCIE (ixPCIE_LC_CNTL , data );
11351139}
11361140
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+
11371152static void vi_program_aspm (struct amdgpu_device * adev )
11381153{
11391154 u32 data , data1 , orig ;
11401155 bool bL1SS = false;
11411156 bool bClkReqSupport = true;
11421157
1143- if (!amdgpu_device_should_use_aspm (adev ))
1158+ if (!amdgpu_device_should_use_aspm (adev ) || ! aspm_support_quirk_check () )
11441159 return ;
11451160
11461161 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)
153153 dc -> hwss .init_hw = dcn20_fpga_init_hw ;
154154 dc -> hwseq -> funcs .init_pipes = NULL ;
155155 }
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- }
161156}
Original file line number Diff line number Diff line change @@ -1351,14 +1351,8 @@ static int smu_disable_dpms(struct smu_context *smu)
13511351{
13521352 struct amdgpu_device * adev = smu -> adev ;
13531353 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- */
13601354 bool use_baco = !smu -> is_apu &&
1361- ((( amdgpu_in_reset (adev ) || ( adev -> in_suspend && ! adev -> in_s0ix ) ) &&
1355+ ((amdgpu_in_reset (adev ) &&
13621356 (amdgpu_asic_reset_method (adev ) == AMD_RESET_METHOD_BACO )) ||
13631357 ((adev -> in_runpm || adev -> in_s4 ) && amdgpu_asic_supports_baco (adev )));
13641358
You can’t perform that action at this time.
0 commit comments