AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Prike Liang <Prike.Liang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alexander.Deucher@amd.com, phil@jpmr.org
Subject: Re: [PATCH 2/2] drm/amdgpu: validate the flush_gpu_tlb_pasid()
Date: Fri, 9 Jan 2026 10:09:22 +0100	[thread overview]
Message-ID: <2e383ce6-9cbd-4fd3-97ff-75c5c8cd89e1@amd.com> (raw)
In-Reply-To: <20260109082523.889564-2-Prike.Liang@amd.com>

On 1/9/26 09:25, Prike Liang wrote:
> Validate flush_gpu_tlb_pasid() availability before flushing tlb.
> 
> Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>

This patch set needs to be re-ordered, e.g. this patch here first and then the other one.

Otherwise you have a state in between where it is broken again.

Apart from that looks good to me.

Regards,
Christian.

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 6d7b8bb953ae..0e67fa4338ff 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -780,6 +780,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,
>  		return 0;
>  
>  	if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) {
> +
> +		if (!adev->gmc.gmc_funcs->flush_gpu_tlb_pasid)
> +			return 0;
> +
>  		if (adev->gmc.flush_tlb_needs_extra_type_2)
>  			adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid,
>  								 2, all_hub,


  reply	other threads:[~2026-01-09  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  8:25 [PATCH 1/2] Revert "drm/amdgpu: don't attach the tlb fence for SI" Prike Liang
2026-01-09  8:25 ` [PATCH 2/2] drm/amdgpu: validate the flush_gpu_tlb_pasid() Prike Liang
2026-01-09  9:09   ` Christian König [this message]
2026-01-12  1:56     ` Liang, Prike
2026-01-09  9:08 ` [PATCH 1/2] Revert "drm/amdgpu: don't attach the tlb fence for SI" Christian König

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=2e383ce6-9cbd-4fd3-97ff-75c5c8cd89e1@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Prike.Liang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=phil@jpmr.org \
    /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