Commit df3183b3 authored by James Zhu's avatar James Zhu Committed by Alex Deucher

drm/amdgpu: fix typo for vcn3/jpeg3 idle check

fix typo for vcn3/jpeg3 idle check
Signed-off-by: default avatarJames Zhu <James.Zhu@amd.com>
Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 86a9eb3f
...@@ -479,7 +479,7 @@ static int jpeg_v3_0_set_clockgating_state(void *handle, ...@@ -479,7 +479,7 @@ static int jpeg_v3_0_set_clockgating_state(void *handle,
bool enable = (state == AMD_CG_STATE_GATE) ? true : false; bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
if (enable) { if (enable) {
if (jpeg_v3_0_is_idle(handle)) if (!jpeg_v3_0_is_idle(handle))
return -EBUSY; return -EBUSY;
jpeg_v3_0_enable_clock_gating(adev); jpeg_v3_0_enable_clock_gating(adev);
} else { } else {
......
...@@ -1174,7 +1174,7 @@ static int vcn_v3_0_set_clockgating_state(void *handle, ...@@ -1174,7 +1174,7 @@ static int vcn_v3_0_set_clockgating_state(void *handle,
continue; continue;
if (enable) { if (enable) {
if (RREG32_SOC15(VCN, i, mmUVD_STATUS) == UVD_STATUS__IDLE) if (RREG32_SOC15(VCN, i, mmUVD_STATUS) != UVD_STATUS__IDLE)
return -EBUSY; return -EBUSY;
vcn_v3_0_enable_clock_gating(adev, i); vcn_v3_0_enable_clock_gating(adev, i);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment