[PATCH] drm/amdgpu: always allocate cleared VRAM for GEM allocations
Paneer Selvam, Arunpravin
arunpravin.paneerselvam at amd.com
Thu Aug 29 18:09:22 UTC 2024
this will fix performance issues,
Acked-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam at amd.com
<mailto:Arunpravin.PaneerSelvam at amd.com>>
On 8/29/2024 10:56 PM, Alex Deucher wrote:
> 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: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality")
> Reviewed-by: Michel Dänzer<mdaenzer at redhat.com> (v1)
> Signed-off-by: Alex Deucher<alexander.deucher at amd.com>
> Cc: Arunpravin Paneer Selvam<Arunpravin.PaneerSelvam at amd.com>
> Cc: Christian König<christian.koenig at amd.com>
> ---
> 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)) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20240829/d6a84013/attachment.htm>
More information about the amd-gfx
mailing list