drm/amdgpu: Only clear dumb buffers if ring is enabled
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Mon, 11 Mar 2019 18:16:29 +0000 (14:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:57 +0000 (15:36 -0500)
commit46846ba265583199ad84bcf6ec06443b098510ac
tree603074c7ec09556b80a850962dde2ccaa0573ba2
parent95b1346872f80c0645e0a60b30a4e9dd37e66d0f
drm/amdgpu: Only clear dumb buffers if ring is enabled

The buffers should be cleared when possible but we also don't want
buffer creation to fail in the rare case where the ring isn't ready
during the call. This could happen during some suspend/resume sequences.

Cc: Christian König <ckoenig.leichtzumerken@gmail.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@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_gem.c