On Mon, Feb 10, 2025 at 6:03 PM Michał Pecio <michal.pecio@xxxxxxxxx> wrote: > > 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? Does the attached patch fix it? Alex > > 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!
From 70210c5a79b4840967b26cb97abbc09b87d2ae75 Mon Sep 17 00:00:00 2001 From: Alex Deucher <alexander.deucher@xxxxxxx> 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. Fixes: ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3959 Link: https://lists.freedesktop.org/archives/amd-gfx/2025-February/119827.html Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Cc: Boyuan Zhang <boyuan.zhang@xxxxxxx> --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c index 6a9e26905edfc..7a22aef6e59c3 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c @@ -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)) { -- 2.48.1