]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: fix typo for vcn2/jpeg2 idle check
authorJames Zhu <James.Zhu@amd.com>
Wed, 18 Mar 2020 21:10:56 +0000 (17:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Mar 2020 04:03:05 +0000 (00:03 -0400)
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>
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c

index ff2e6e1ccde7ccee5008fe282a4e407a905b4b33..6173951db7b4527875a6cb53b043a124c1ae8227 100644 (file)
@@ -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 {
index f2745fd1ddb36dd7ed8a0582e73c9c0d2c133577..ec8091a661df140e8ffcc6d24d1db85225cc4232 100644 (file)
@@ -1251,7 +1251,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 {