drm/amdgpu/jpeg2.0: add cancel_delayed_work_sync before power gate
authorJames Zhu <James.Zhu@amd.com>
Wed, 19 May 2021 15:42:48 +0000 (11:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 21:04:17 +0000 (17:04 -0400)
commitff48f6dbf0ff896c98d167a67a5b975fb034356b
tree23dca0c36a442de42f6f6f6a3b81f5b9eaa895e3
parent4a62542ae064e3b645d6bbf2295a6c05136956c6
drm/amdgpu/jpeg2.0: add cancel_delayed_work_sync before power gate

Add cancel_delayed_work_sync before set power gating state
to avoid race condition issue when power gating.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c