drm/amd/vcn: fix an error msg on vcn 3.0
authortiancyin <tianci.yin@amd.com>
Sun, 27 Mar 2022 11:07:13 +0000 (19:07 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Apr 2022 15:25:22 +0000 (11:25 -0400)
Some video card has more than one vcn instance, passing 0 to
vcn_v3_0_pause_dpg_mode is incorrect.

Error msg:
Register(1) [mmUVD_POWER_STATUS] failed to reach value
0x00000001 != 0x00000002

Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c

index e1cca0a106531cd7c689612a318d6141364e8373..cb5f0a12333f308d2ec358014ec5cf206f305d11 100644 (file)
@@ -1488,7 +1488,7 @@ static int vcn_v3_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
        struct dpg_pause_state state = {.fw_based = VCN_DPG_STATE__UNPAUSE};
        uint32_t tmp;
 
-       vcn_v3_0_pause_dpg_mode(adev, 0, &state);
+       vcn_v3_0_pause_dpg_mode(adev, inst_idx, &state);
 
        /* Wait for power status to be 1 */
        SOC15_WAIT_ON_RREG(VCN, inst_idx, mmUVD_POWER_STATUS, 1,