public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Lang Yu <Lang.Yu@amd.com>
To: "Zhang, Yifan" <Yifan1.Zhang@amd.com>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: always use legacy tlb flush on cyan_skilfish
Date: Thu, 14 Sep 2023 16:58:18 +0800	[thread overview]
Message-ID: <ZQLLKgWZ0bugI4TD@lang-desktop> (raw)
In-Reply-To: <CY5PR12MB636949A47321FC9F16898B9DC1F7A@CY5PR12MB6369.namprd12.prod.outlook.com>

On 09/14/ , Zhang, Yifan wrote:
> [Public]
> 
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Lang Yu
> Sent: Thursday, September 14, 2023 3:00 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Yu, Lang <Lang.Yu@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; stable@vger.kernel.org
> Subject: [PATCH] drm/amdgpu: always use legacy tlb flush on cyan_skilfish
> 
> cyan_skilfish has problems with other flush types.
> 
> Signed-off-by: Lang Yu <Lang.Yu@amd.com>
> Cc: <stable@vger.kernel.org> # v5.15+
> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> index d3da13f4c80e..27504ac21653 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> @@ -236,7 +236,8 @@ static void gmc_v10_0_flush_vm_hub(struct amdgpu_device *adev, uint32_t vmid,  {
>         bool use_semaphore = gmc_v10_0_use_invalidate_semaphore(adev, vmhub);
>         struct amdgpu_vmhub *hub = &adev->vmhub[vmhub];
> -       u32 inv_req = hub->vmhub_funcs->get_invalidate_req(vmid, flush_type);
> +       u32 inv_req = hub->vmhub_funcs->get_invalidate_req(vmid,
> +                     (adev->asic_type != CHIP_CYAN_SKILLFISH) ? flush_type : 0);
>         u32 tmp;
>         /* Use register 17 for GART */
>         const unsigned int eng = 17;
> @@ -331,6 +332,8 @@ static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
> 
>         int r;
> 
> +       flush_type = (adev->asic_type != CHIP_CYAN_SKILLFISH) ? : 0;
> Should be flush_type = (adev->asic_type != CHIP_CYAN_SKILLFISH) ? flush_type : 0; here ?
> +
>         /* flush hdp cache */
>         adev->hdp.funcs->flush_hdp(adev, NULL);
> 
> @@ -426,6 +429,8 @@ static int gmc_v10_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
>         struct amdgpu_ring *ring = &adev->gfx.kiq[0].ring;
>         struct amdgpu_kiq *kiq = &adev->gfx.kiq[0];
> 
> +       flush_type = (adev->asic_type != CHIP_CYAN_SKILLFISH) ? : 0;
> Should be flush_type = (adev->asic_type != CHIP_CYAN_SKILLFISH) ? flush_type : 0; here ?

Yes, thank you! Will fix it.

Regards,
Lang

>         if (amdgpu_emu_mode == 0 && ring->sched.ready) {
>                 spin_lock(&adev->gfx.kiq[0].ring_lock);
>                 /* 2 dwords flush + 8 dwords fence */
> --
> 2.25.1
> 

      reply	other threads:[~2023-09-14  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14  6:59 [PATCH] drm/amdgpu: always use legacy tlb flush on cyan_skilfish Lang Yu
2023-09-14  8:42 ` Zhang, Yifan
2023-09-14  8:58   ` Lang Yu [this message]

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=ZQLLKgWZ0bugI4TD@lang-desktop \
    --to=lang.yu@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Yifan1.Zhang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.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