AMD Carrizo shutdown hang since amdgpu commit ff69bba05f08
Hi,
I have a machine with this APU:
AMD PRO A10-8770 R7, 10 COMPUTE CORES 4C+6G
6.13 was OK, with 6.14-rc2 it hangs on shutdown after the display turns off.
git-bisect says:
# first bad commit: [ff69bba05f085cd6d4277c27ac7600160167b384] drm/amd/pm: add inst to dpm_set_powergating_by_smu
The preceding commit does indeed shutdown normally. AMDGPU is built into the kernel image, not sure if it matters.
Final lines of dynamic debug over serial pasted below. Any ideas?
Thanks,
Michal
[ 79.232113] [SURFACE]:Pipe 0: width, height, x, y [ 79.232113] viewport:1600, 1200, 0, 0 [ 79.232113] recout: 1600, 1200, 0, 0 [ 79.251418] amdgpu: [IPS]: dc_allow_idle_optimizations_internal: allow_idle old=0 new=1 (caller=amdgpu_dm_crtc_vblank_control_worker) [ 79.253727] [SCALER]:resource_build_scaling_params pipe 0: [ 79.253727] Viewport: height:1200 width:1600 x:0 y:0 Recout: height:1200 width:1600 x:0 y:0 HACTIVE:1600 VACTIVE:1200 [ 79.253727] src_rect: height:1200 width:1600 x:0 y:0 dst_rect: height:1200 width:1600 x:0 y:0 clip_rect: height:1200 width:1600 x:0 y:0 [ 79.303043] [SCALER]:resource_build_scaling_params pipe 0: [ 79.303043] Viewport: height:1200 width:1600 x:0 y:0 Recout: height:1200 width:1600 x:0 y:0 HACTIVE:1600 VACTIVE:1200 [ 79.303043] src_rect: height:1200 width:1600 x:0 y:0 dst_rect: height:1200 width:1600 x:0 y:0 clip_rect: height:1200 width:1600 x:0 y:0 [ 79.339233] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.339691] [SCALER]:resource_build_scaling_params pipe 0: [ 79.339691] Viewport: height:1200 width:1600 x:0 y:0 Recout: height:1200 width:1600 x:0 y:0 HACTIVE:1600 VACTIVE:1200 [ 79.339691] src_rect: height:1200 width:1600 x:0 y:0 dst_rect: height:1200 width:1600 x:0 y:0 clip_rect: height:1200 width:1600 x:0 y:0 [ 79.384264] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.384601] [SURFACE]:Pipe:0 ffff888104900000: addr hi:0xff, addr low:0xed3000, src: 0, 0, 1600, 1200; dst: 0, 0, 1600, 1200;clip: 0, 0, 1600, 1200 [ 79.408652] [SURFACE]:Pipe 0: width, height, x, y [ 79.408652] viewport:1600, 1200, 0, 0 [ 79.408652] recout: 1600, 1200, 0, 0 [ 79.428580] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.428597] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: finish, [ 79.428597] nbpMark_b: 0 nbpMark_a: 31870 urgentMark_b: 0 urgentMark_a: 16615 [ 79.428597] stutMark_b: 0 stutMark_a: 27915 [ 79.428597] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0 [ 79.428597] stutMark_b: 0 stutMark_a: 0 [ 79.428597] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0 [ 79.428597] stutMark_b: 0 stutMark_a: 0 stutter_mode_enable: 1 [ 79.428597] cstate: 1 pstate: 1 nbpstate: 1 sync: 0 dispclk: 0 [ 79.428597] sclk: 0 sclk_sleep: 12225 yclk: 2668000 blackout_recovery_time_us: 0 [ 79.429071] amdgpu: [IPS]: dc_allow_idle_optimizations_internal: allow_idle old=0 new=1 (caller=amdgpu_dm_crtc_vblank_control_worker) [ 79.527445] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.527463] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: finish, [ 79.527463] nbpMark_b: 0 nbpMark_a: 31870 urgentMark_b: 0 urgentMark_a: 16615 [ 79.527463] stutMark_b: 0 stutMark_a: 27915 [ 79.527463] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0 [ 79.527463] stutMark_b: 0 stutMark_a: 0 [ 79.527463] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0 [ 79.527463] stutMark_b: 0 stutMark_a: 0 stutter_mode_enable: 1 [ 79.527463] cstate: 1 pstate: 1 nbpstate: 1 sync: 0 dispclk: 0 [ 79.527463] sclk: 0 sclk_sleep: 12225 yclk: 2668000 blackout_recovery_time_us: 0 [ 79.609435] amdgpu: Setting Deep Sleep Clock: 1222 [ 79.616505] amdgpu: enable Low Memory PState. [ 79.708792] amdgpu: Setting Deep Sleep Clock: 1222 [ 79.715842] amdgpu: enable Low Memory PState. [ 79.722763] amdgpu 0000:00:01.0: amdgpu: IP block9 already in the target gate state!
Quoted 9 lines · Michał Pecio
Hi,
I have a machine with this APU:
AMD PRO A10-8770 R7, 10 COMPUTE CORES 4C+6G6.13 was OK, with 6.14-rc2 it hangs on shutdown after the display turns off.
Quoted 7 lines
git-bisect says:
# first bad commit: [ff69bba05f085cd6d4277c27ac7600160167b384] drm/amd/pm: add inst to dpm_set_powergating_by_smuThe preceding commit does indeed shutdown normally. AMDGPU is built into the kernel image, not sure if it matters.
Final lines of dynamic debug over serial pasted below. Any ideas?
Does the attached patch fix it?
Alex
Quoted 41 lines
Thanks,
Michal[ 79.232113] [SURFACE]:Pipe 0: width, height, x, y [ 79.232113] viewport:1600, 1200, 0, 0 [ 79.232113] recout: 1600, 1200, 0, 0 [ 79.251418] amdgpu: [IPS]: dc_allow_idle_optimizations_internal: allow_idle old=0 new=1 (caller=amdgpu_dm_crtc_vblank_control_worker) [ 79.253727] [SCALER]:resource_build_scaling_params pipe 0: [ 79.253727] Viewport: height:1200 width:1600 x:0 y:0 Recout: height:1200 width:1600 x:0 y:0 HACTIVE:1600 VACTIVE:1200 [ 79.253727] src_rect: height:1200 width:1600 x:0 y:0 dst_rect: height:1200 width:1600 x:0 y:0 clip_rect: height:1200 width:1600 x:0 y:0 [ 79.303043] [SCALER]:resource_build_scaling_params pipe 0: [ 79.303043] Viewport: height:1200 width:1600 x:0 y:0 Recout: height:1200 width:1600 x:0 y:0 HACTIVE:1600 VACTIVE:1200 [ 79.303043] src_rect: height:1200 width:1600 x:0 y:0 dst_rect: height:1200 width:1600 x:0 y:0 clip_rect: height:1200 width:1600 x:0 y:0 [ 79.339233] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.339691] [SCALER]:resource_build_scaling_params pipe 0: [ 79.339691] Viewport: height:1200 width:1600 x:0 y:0 Recout: height:1200 width:1600 x:0 y:0 HACTIVE:1600 VACTIVE:1200 [ 79.339691] src_rect: height:1200 width:1600 x:0 y:0 dst_rect: height:1200 width:1600 x:0 y:0 clip_rect: height:1200 width:1600 x:0 y:0 [ 79.384264] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.384601] [SURFACE]:Pipe:0 ffff888104900000: addr hi:0xff, addr low:0xed3000, src: 0, 0, 1600, 1200; dst: 0, 0, 1600, 1200;clip: 0, 0, 1600, 1200 [ 79.408652] [SURFACE]:Pipe 0: width, height, x, y [ 79.408652] viewport:1600, 1200, 0, 0 [ 79.408652] recout: 1600, 1200, 0, 0 [ 79.428580] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.428597] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: finish, [ 79.428597] nbpMark_b: 0 nbpMark_a: 31870 urgentMark_b: 0 urgentMark_a: 16615 [ 79.428597] stutMark_b: 0 stutMark_a: 27915 [ 79.428597] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0 [ 79.428597] stutMark_b: 0 stutMark_a: 0 [ 79.428597] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0 [ 79.428597] stutMark_b: 0 stutMark_a: 0 stutter_mode_enable: 1 [ 79.428597] cstate: 1 pstate: 1 nbpstate: 1 sync: 0 dispclk: 0 [ 79.428597] sclk: 0 sclk_sleep: 12225 yclk: 2668000 blackout_recovery_time_us: 0 [ 79.429071] amdgpu: [IPS]: dc_allow_idle_optimizations_internal: allow_idle old=0 new=1 (caller=amdgpu_dm_crtc_vblank_control_worker) [ 79.527445] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: start [ 79.527463] [BANDWIDTH_CALCS]:dce110_validate_bandwidth: finish, [ 79.527463] nbpMark_b: 0 nbpMark_a: 31870 urgentMark_b: 0 urgentMark_a: 16615 [ 79.527463] stutMark_b: 0 stutMark_a: 27915 [ 79.527463] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0 [ 79.527463] stutMark_b: 0 stutMark_a: 0 [ 79.527463] nbpMark_b: 0 nbpMark_a: 0 urgentMark_b: 0 urgentMark_a: 0
Quoted 8 lines
[ 79.527463] stutMark_b: 0 stutMark_a: 0 stutter_mode_enable: 1 [ 79.527463] cstate: 1 pstate: 1 nbpstate: 1 sync: 0 dispclk: 0 [ 79.527463] sclk: 0 sclk_sleep: 12225 yclk: 2668000 blackout_recovery_time_us: 0 [ 79.609435] amdgpu: Setting Deep Sleep Clock: 1222 [ 79.616505] amdgpu: enable Low Memory PState. [ 79.708792] amdgpu: Setting Deep Sleep Clock: 1222 [ 79.715842] amdgpu: enable Low Memory PState. [ 79.722763] amdgpu 0000:00:01.0: amdgpu: IP block9 already in the target gate state!
From 70210c5a79b4840967b26cb97abbc09b87d2ae75 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Mon, 10 Feb 2025 18:18:29 -0500
Subject: [PATCH] drm/amdgpu/pm: fix UVD handing in
amdgpu_dpm_set_powergating_by_smu()
UVD and VCN were split into separate dpm helpers in commit ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") but the check at the top was still included UVD from an earlier version of the patch. Fix the check.
--- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +1 -1
@@ -78,7 +78,7 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev,int ret =0 ;const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;enum ip_power_state pwr_state = gate ?POWER_STATE_OFF :POWER_STATE_ON ; -bool is_vcn = (block_type ==AMD_IP_BLOCK_TYPE_UVD || block_type ==AMD_IP_BLOCK_TYPE_VCN ); +bool is_vcn = block_type ==AMD_IP_BLOCK_TYPE_VCN ;if (atomic_read (&adev->pm.pwr_state[block_type]) == pwr_state && (!is_vcn || adev->vcn.num_vcn_inst ==1 )) {
Signature · 1 line
2.48.1
Quoted 1 line · Alex Deucher
Does the attached patch fix it?
Yep, it prints a few more lines and shuts down now.
Thanks!
[ 53.525125] cstate: 1 pstate: 1 nbpstate: 1 sync: 0 dispclk: 0 [ 53.525125] sclk: 0 sclk_sleep: 12225 yclk: 2668000 blackout_recovery_time_us: 0 [ 53.605942] amdgpu: Setting Deep Sleep Clock: 1222 [ 53.613220] amdgpu: enable Low Memory PState. [ 53.707787] amdgpu: Setting Deep Sleep Clock: 1222 [ 53.714787] amdgpu: enable Low Memory PState. [ 53.721659] amdgpu 0000:00:01.0: amdgpu: IP block9 already in the target gate state! [ 53.732460] amdgpu 0000:00:01.0: amdgpu: IP block8 already in the target gate state! [ 53.742564] amdgpu: Setting Deep Sleep Clock: 1222 [ 53.750680] amdgpu: enable Low Memory PState. [ 53.759500] amdgpu: enable Low Memory PState. [ 53.767937] ACPI: PM: Preparing to enter system sleep state S5 [ 53.777664] ACPI Warning: Time parameter 255 us > 100 us violating ACPI spec, please fix the firmware. (20240827/exsystem-142) [ 53.792988] kvm: exiting hardware virtualization [ 53.801592] reboot: Power down