From: Michel Dänzer <>

Finally got confirmation from the debugging patch in the bug report
that these values need to be atomic, or they can get corrupted.

Patch 1 is so that it's not necessary to use two atomic values for
computing the amount of non-pinned CPU visible VRAM, as that could
still give an inconsistent result if there are BOs being (un)pinned

Michel Dänzer (3):
  drm/amdgpu: Keep track of amount of pinned CPU visible VRAM
  drm/amdgpu: Make pin_size values atomic
  drm/amdgpu: Warn and update pin_size values when destroying a pinned

 drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  6 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c     |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 23 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 43 +++++++++++++++++-----
 4 files changed, 49 insertions(+), 25 deletions(-)


amd-gfx mailing list

Reply via email to