AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: YuBiao Wang <YuBiao.Wang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>,
	Jack Xiao <Jack.Xiao@amd.com>, Feifei Xu <Feifei.Xu@amd.com>,
	horace.chen@amd.com, Kevin Wang <Kevin1.Wang@amd.com>,
	Tuikov Luben <Luben.Tuikov@amd.com>,
	Deucher Alexander <Alexander.Deucher@amd.com>,
	Evan Quan <Evan.Quan@amd.com>,
	Jingwen Chen <Jingwen.Chen2@amd.com>, Monk Liu <Monk.Liu@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>
Subject: Re: [PATCH] drm/amd/amdgpu: Fix csb.bo pin_count leak on gfx 9
Date: Thu, 4 Nov 2021 10:53:43 +0100	[thread overview]
Message-ID: <f4ca35ed-3d3b-3207-4c87-6eef7fc9364e@amd.com> (raw)
In-Reply-To: <20211104094021.1311552-1-YuBiao.Wang@amd.com>

Am 04.11.21 um 10:40 schrieb YuBiao Wang:
> [Why]
> csb bo is not unpinned in gfx 9. It will lead to pin_count leak on
> driver unload.
>
> [How]
> Call bo_free_kernel corresponding to bo_create_kernel in
> gfx_rlc_init_csb. This will also unify the code path with other gfx
> versions.
>
> Signed-off-by: YuBiao Wang <YuBiao.Wang@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 7f944bb11298..be803ebd543c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -2462,7 +2462,9 @@ static int gfx_v9_0_sw_fini(void *handle)
>   	amdgpu_gfx_kiq_fini(adev);
>   
>   	gfx_v9_0_mec_fini(adev);
> -	amdgpu_bo_unref(&adev->gfx.rlc.clear_state_obj);
> +	amdgpu_bo_free_kernel(&adev->gfx.rlc.clear_state_obj,
> +				&adev->gfx.rlc.clear_state_gpu_addr,
> +				(void **)&adev->gfx.rlc.cs_ptr);
>   	if (adev->flags & AMD_IS_APU) {
>   		amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj,
>   				&adev->gfx.rlc.cp_table_gpu_addr,


      reply	other threads:[~2021-11-04  9:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04  9:40 [PATCH] drm/amd/amdgpu: Fix csb.bo pin_count leak on gfx 9 YuBiao Wang
2021-11-04  9:53 ` Christian König [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=f4ca35ed-3d3b-3207-4c87-6eef7fc9364e@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Andrey.Grodzovsky@amd.com \
    --cc=Evan.Quan@amd.com \
    --cc=Feifei.Xu@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Jack.Xiao@amd.com \
    --cc=Jingwen.Chen2@amd.com \
    --cc=Kevin1.Wang@amd.com \
    --cc=Luben.Tuikov@amd.com \
    --cc=Monk.Liu@amd.com \
    --cc=YuBiao.Wang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=horace.chen@amd.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