Skip to content

Commit 4de34b0

Browse files
committed
drm/amdgpu: always allocate cleared VRAM for GEM allocations
This adds allocation latency, but aligns better with user expectations. The latency should improve with the drm buddy clearing patches that Arun has been working on. In addition this fixes the high CPU spikes seen when doing wipe on release. v2: always set AMDGPU_GEM_CREATE_VRAM_CLEARED (Christian) Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3528 Fixes: a68c7ea ("drm/amdgpu: Enable clear page functionality") Acked-by: Arunpravin Paneer Selvam <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> (v1) Signed-off-by: Alex Deucher <[email protected]> Cc: Arunpravin Paneer Selvam <[email protected]> Cc: Christian König <[email protected]> (cherry picked from commit 6c0a7c3) Cc: [email protected] # 6.10.x
1 parent 34c36a7 commit 4de34b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
348348
return -EINVAL;
349349
}
350350

351+
/* always clear VRAM */
352+
flags |= AMDGPU_GEM_CREATE_VRAM_CLEARED;
353+
351354
/* create a gem object to contain this object in */
352355
if (args->in.domains & (AMDGPU_GEM_DOMAIN_GDS |
353356
AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA)) {

0 commit comments

Comments
 (0)