]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: prevent memory wipe in suspend/shutdown stage
authorGuchun Chen <guchun.chen@amd.com>
Tue, 15 Mar 2022 06:46:28 +0000 (14:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Mar 2022 16:40:24 +0000 (12:40 -0400)
commit196b510fc93943c7069ff11dd8780d232f1b09c8
tree93e9250c64532a0c6160e2cb9ed0ae9061dce273
parent2dc5b714c282755b131113dc9ba975169e692af0
drm/amdgpu: prevent memory wipe in suspend/shutdown stage

On GPUs with RAS enabled, below call trace is observed when
suspending or shutting down device. The cause is we have enabled
memory wipe flag for BOs on such GPUs by default, and such BOs
will go to memory wipe by amdgpu_fill_buffer, however, because
ring is off already, it fails to clean up the memory and throw
this error message. So add a suspend/shutdown check before
wipping memory.

[drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.

v2: fix coding style issue

Fixes: 95b39a9873fc46 ("drm/amdgpu: Wipe all VRAM on free when RAS is enabled")
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c