From 5fb0180592b124857e2e0369e2cdee74bd552bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 17 Aug 2015 19:55:57 +0200 Subject: [PATCH] winsys/amdgpu: fix the type of memory usage counters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the 32-bit types overflowed, the driver could submit an IB that uses much more memory than is available. Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Reviewed-by: Michel Dänzer --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h index 0842259044b..12c6b624b03 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h @@ -77,8 +77,8 @@ struct amdgpu_cs { int buffer_indices_hashlist[512]; - unsigned used_vram; - unsigned used_gart; + uint64_t used_vram; + uint64_t used_gart; unsigned max_dependencies; };