<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<span style="font-family:Aptos">this will fix performance issues,<br>
Acked-by: </span><span style="font-family:Calibri">Arunpravin
Paneer Selvam <</span><a href="mailto:Arunpravin.PaneerSelvam@amd.com"><span style="font-family:Calibri">Arunpravin.PaneerSelvam@amd.com</span></a><span style="font-family:Calibri">></span><br>
<br>
<div class="moz-cite-prefix">On 8/29/2024 10:56 PM, Alex Deucher
wrote:<br>
</div>
<blockquote type="cite" cite="mid:20240829172645.1678920-1-alexander.deucher@amd.com">
<pre class="moz-quote-pre" wrap="">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: <a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/drm/amd/-/issues/3528">https://gitlab.freedesktop.org/drm/amd/-/issues/3528</a>
Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality")
Reviewed-by: Michel Dänzer <a class="moz-txt-link-rfc2396E" href="mailto:mdaenzer@redhat.com"><mdaenzer@redhat.com></a> (v1)
Signed-off-by: Alex Deucher <a class="moz-txt-link-rfc2396E" href="mailto:alexander.deucher@amd.com"><alexander.deucher@amd.com></a>
Cc: Arunpravin Paneer Selvam <a class="moz-txt-link-rfc2396E" href="mailto:Arunpravin.PaneerSelvam@amd.com"><Arunpravin.PaneerSelvam@amd.com></a>
Cc: Christian König <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 1f149c9e2177..8794661b0bfa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -349,6 +349,9 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
}
+ /* always clear VRAM */
+ flags |= AMDGPU_GEM_CREATE_VRAM_CLEARED;
+
/* create a gem object to contain this object in */
if (args->in.domains & (AMDGPU_GEM_DOMAIN_GDS |
AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA)) {
</pre>
</blockquote>
<br>
</body>
</html>