Skip to content

Commit

Permalink
drm/amdgpu: fix typo for vcn2/jpeg2 idle check
Browse files Browse the repository at this point in the history
fix typo for vcn2/jpeg2 idle check

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
James Zhu authored and Alex Deucher committed Mar 18, 2020
1 parent acfc62d commit b5689d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ static int jpeg_v2_0_set_clockgating_state(void *handle,
bool enable = (state == AMD_CG_STATE_GATE);

if (enable) {
if (jpeg_v2_0_is_idle(handle))
if (!jpeg_v2_0_is_idle(handle))
return -EBUSY;
jpeg_v2_0_enable_clock_gating(adev);
} else {
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ static int vcn_v2_0_set_clockgating_state(void *handle,

if (enable) {
/* wait for STATUS to clear */
if (vcn_v2_0_is_idle(handle))
if (!vcn_v2_0_is_idle(handle))
return -EBUSY;
vcn_v2_0_enable_clock_gating(adev);
} else {
Expand Down

0 comments on commit b5689d2

Please sign in to comment.