drm/amdgpu: Clean sdma wptr register when only enable wptr polling
authorEmily Deng <Emily.Deng@amd.com>
Wed, 7 Mar 2018 01:47:43 +0000 (09:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Mar 2018 21:10:35 +0000 (16:10 -0500)
commit4062119b9d958df33bcda703dc3ac646908fa861
treee585350e0f4d3def663ca0c45720aed5c06c7d53
parent8113cf9cab1713e8b711f195bf673206f44fa050
drm/amdgpu: Clean sdma wptr register when only enable wptr polling

The sdma wptr polling memory is not fast enough, then the sdma
wptr register will be random, and not equal to sdma rptr, which
will cause sdma engine hang when load driver, so clean up the sdma
wptr directly to fix this issue.

v2:add comment above the code and correct coding style

Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c