diff options
author | James Zhu <[email protected]> | 2020-06-10 12:10:20 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2020-07-01 01:59:19 -0400 |
commit | 651a146526a04993c5bebf0e19cd9256f5e6511d (patch) | |
tree | 468b464c3be55471f98fb6b7330dd90faf3c8e95 /drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h | |
parent | 7ef869ef6876a511c68da0592209442d16d36f0c (diff) |
drm/amdgpu/jpeg: fix race condition issue for jpeg start
Fix race condition issue when multiple jpeg starts are called.
Signed-off-by: James Zhu <[email protected]>
Acked-by: Nirmoy Das <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h index 5131a0a1bc8a..55fbff2be761 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h @@ -46,6 +46,8 @@ struct amdgpu_jpeg { unsigned harvest_config; struct delayed_work idle_work; enum amd_powergating_state cur_state; + struct mutex jpeg_pg_lock; + atomic_t total_submission_cnt; }; int amdgpu_jpeg_sw_init(struct amdgpu_device *adev); |