diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-07-27 05:00:02 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-27 12:09:53 -0400 |
commit | 3fded222f4bf7f4c56ef4854872a39a4de08f7a8 (patch) | |
tree | 44d0835e37d14d7227257ab58a5fa9e449091a85 /drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | |
parent | 408acede8732bec629959f8628c46ab4517e3995 (diff) |
drm/amdgpu: Disable gfx off if VCN is busy
this patch is a workaround for the gpu hang
at video begin/end time if gfx off is enabled.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index fd654a4406db..76e59a6e8311 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | |||
@@ -217,6 +217,7 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) | |||
217 | fences += amdgpu_fence_count_emitted(&adev->vcn.ring_jpeg); | 217 | fences += amdgpu_fence_count_emitted(&adev->vcn.ring_jpeg); |
218 | 218 | ||
219 | if (fences == 0) { | 219 | if (fences == 0) { |
220 | amdgpu_gfx_off_ctrl(adev, true); | ||
220 | if (adev->pm.dpm_enabled) | 221 | if (adev->pm.dpm_enabled) |
221 | amdgpu_dpm_enable_uvd(adev, false); | 222 | amdgpu_dpm_enable_uvd(adev, false); |
222 | else | 223 | else |
@@ -233,6 +234,7 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring) | |||
233 | bool set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work); | 234 | bool set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work); |
234 | 235 | ||
235 | if (set_clocks) { | 236 | if (set_clocks) { |
237 | amdgpu_gfx_off_ctrl(adev, false); | ||
236 | if (adev->pm.dpm_enabled) | 238 | if (adev->pm.dpm_enabled) |
237 | amdgpu_dpm_enable_uvd(adev, true); | 239 | amdgpu_dpm_enable_uvd(adev, true); |
238 | else | 240 | else |