AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Cc: "Michel Dänzer" <mdaenzer@redhat.com>,
	"Arunpravin Paneer Selvam" <Arunpravin.PaneerSelvam@amd.com>
Subject: Re: [PATCH] drm/amdgpu: always allocate cleared VRAM for GEM allocations
Date: Fri, 23 Aug 2024 16:01:14 +0200	[thread overview]
Message-ID: <8c110bee-ad61-4e3c-9f59-94fb1e7ee586@amd.com> (raw)
In-Reply-To: <20240823133612.719681-1-alexander.deucher@amd.com>

Am 23.08.24 um 15:36 schrieb Alex Deucher:
> 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.

The problem is still that we can't most likely will run into issues with 
some of the bootup time constrains we have.

>
> In addition this fixes the high CPU spikes seen when doing
> wipe on release.

Mhm, interesting.

>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3528
> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 1f149c9e2177..16af465f1c01 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -349,6 +349,10 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
>   		return -EINVAL;
>   	}
>   
> +	/* always clear VRAM */
> +	if (args->in.domains & AMDGPU_GEM_DOMAIN_VRAM)

I think we should drop that if. When only GTT is allocated the flag is 
ignored and it can be the we switch the domain later on.

Christian.

> +		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)) {


  reply	other threads:[~2024-08-23 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23 13:36 [PATCH] drm/amdgpu: always allocate cleared VRAM for GEM allocations Alex Deucher
2024-08-23 14:01 ` Christian König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-29 17:26 Alex Deucher
2024-08-29 18:09 ` Paneer Selvam, Arunpravin
2024-09-06 14:07   ` Marek Olšák
2024-09-06 17:53     ` Alex Deucher
2024-09-06 18:50       ` Marek Olšák
2024-09-10  6:10     ` Paneer Selvam, Arunpravin
2024-07-26 13:41 Alex Deucher
2024-07-26 15:25 ` Alex Deucher
2024-07-29 10:42   ` Michel Dänzer
2024-07-29 11:14     ` Christian König
2024-07-29 15:41       ` Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c110bee-ad61-4e3c-9f59-94fb1e7ee586@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Arunpravin.PaneerSelvam@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mdaenzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox