drm/amdgpu: refine uvd4.2 init/stop code.
authorRex Zhu <Rex.Zhu@amd.com>
Fri, 20 Jan 2017 07:56:45 +0000 (15:56 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Feb 2017 22:21:14 +0000 (17:21 -0500)
commit8b55d17eeea70bd9b6e0711a6230fda10a002e6b
tree178467c7bb506c984b136dc9e09518966ec6a4be
parentd01c6236acff6ec460690dd5b040e53435799295
drm/amdgpu: refine uvd4.2 init/stop code.

1. set uvd_status busy before uvd_start.
2. clear uvd_status to 0 after uvd stop.
   smu firmware may check uvd_status.
3. wait uvd idle before stop uvd.
4. not start uvd when hw_init.

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