OSDN Git Service

drm/amdgpu/vcn: fix race condition issue for vcn start
authorJames Zhu <James.Zhu@amd.com>
Mon, 10 Feb 2020 17:41:41 +0000 (12:41 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Apr 2020 18:44:45 +0000 (14:44 -0400)
commitbd718638b8513e20a481a67f37a8acc1ebf2d957
tree3fd16c8546827e31e64045fc30e96b9d42a4d0e1
parent17e137f27cb1e868a55ac5c41e1863660a388a9c
drm/amdgpu/vcn: fix race condition issue for vcn start

Fix race condition issue when multiple vcn starts are called.

v2: Removed checking the return value of cancel_delayed_work_sync()
to prevent possible races here.

v3: Add total_submission_cnt to avoid gate power unexpectedly.

v4: Remove extra counter check, and reduce counter before idle
work schedule

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h