AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "Sunil Khatri" <sunil.khatri@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 11/15] drm/amdgpu: clean the dummy hw_fini functions
Date: Thu, 17 Oct 2024 13:58:39 +0200	[thread overview]
Message-ID: <6c44c6b7-bdb9-483b-9027-8e93380a710c@gmail.com> (raw)
In-Reply-To: <20241017100615.1492144-12-sunil.khatri@amd.com>

Am 17.10.24 um 12:06 schrieb Sunil Khatri:
> Remove the dummy hw_fini functions for all
> ip blocks.

As discussed on the call hw_init() and hw_fini() are the only two 
functions I consider mandatory.

So please drop this patch here and as a follow up task maybe look into 
why vkms and mes_v12 don't have a hw_fini function.

For SI and CIK we probably don't care any more since those are to old.

Regards,
Christian.

>
> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c |  6 ------
>   drivers/gpu/drm/amd/amdgpu/cik.c         |  6 ------
>   drivers/gpu/drm/amd/amdgpu/mes_v12_0.c   | 11 +----------
>   drivers/gpu/drm/amd/amdgpu/si.c          |  6 ------
>   4 files changed, 1 insertion(+), 28 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> index ed8015313827..e3a399bfab61 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
> @@ -600,11 +600,6 @@ static int amdgpu_vkms_hw_init(struct amdgpu_ip_block *ip_block)
>   	return 0;
>   }
>   
> -static int amdgpu_vkms_hw_fini(struct amdgpu_ip_block *ip_block)
> -{
> -	return 0;
> -}
> -
>   static int amdgpu_vkms_suspend(struct amdgpu_ip_block *ip_block)
>   {
>   	struct amdgpu_device *adev = ip_block->adev;
> @@ -661,7 +656,6 @@ static const struct amd_ip_funcs amdgpu_vkms_ip_funcs = {
>   	.sw_init = amdgpu_vkms_sw_init,
>   	.sw_fini = amdgpu_vkms_sw_fini,
>   	.hw_init = amdgpu_vkms_hw_init,
> -	.hw_fini = amdgpu_vkms_hw_fini,
>   	.suspend = amdgpu_vkms_suspend,
>   	.resume = amdgpu_vkms_resume,
>   	.is_idle = amdgpu_vkms_is_idle,
> diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c
> index c8fb592f13df..9cb25d0d1051 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cik.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cik.c
> @@ -2138,11 +2138,6 @@ static int cik_common_hw_init(struct amdgpu_ip_block *ip_block)
>   	return 0;
>   }
>   
> -static int cik_common_hw_fini(struct amdgpu_ip_block *ip_block)
> -{
> -	return 0;
> -}
> -
>   static int cik_common_resume(struct amdgpu_ip_block *ip_block)
>   {
>   	return cik_common_hw_init(ip_block);
> @@ -2181,7 +2176,6 @@ static const struct amd_ip_funcs cik_common_ip_funcs = {
>   	.early_init = cik_common_early_init,
>   	.late_init = NULL,
>   	.hw_init = cik_common_hw_init,
> -	.hw_fini = cik_common_hw_fini,
>   	.resume = cik_common_resume,
>   	.is_idle = cik_common_is_idle,
>   	.wait_for_idle = cik_common_wait_for_idle,
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> index 9d0e342a2f81..a1af5c90f79a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> @@ -40,7 +40,6 @@ MODULE_FIRMWARE("amdgpu/gc_12_0_1_mes1.bin");
>   MODULE_FIRMWARE("amdgpu/gc_12_0_1_uni_mes.bin");
>   
>   static int mes_v12_0_hw_init(struct amdgpu_ip_block *ip_block);
> -static int mes_v12_0_hw_fini(struct amdgpu_ip_block *ip_block);
>   static int mes_v12_0_kiq_hw_init(struct amdgpu_device *adev);
>   static int mes_v12_0_kiq_hw_fini(struct amdgpu_device *adev);
>   
> @@ -1516,7 +1515,6 @@ static int mes_v12_0_kiq_hw_init(struct amdgpu_device *adev)
>   	return r;
>   
>   failure:
> -	mes_v12_0_hw_fini(ip_block);
>   	return r;
>   }
>   
> @@ -1600,15 +1598,9 @@ static int mes_v12_0_hw_init(struct amdgpu_ip_block *ip_block)
>   	return 0;
>   
>   failure:
> -	mes_v12_0_hw_fini(ip_block);
>   	return r;
>   }
>   
> -static int mes_v12_0_hw_fini(struct amdgpu_ip_block *ip_block)
> -{
> -	return 0;
> -}
> -
>   static int mes_v12_0_suspend(struct amdgpu_ip_block *ip_block)
>   {
>   	int r;
> @@ -1617,7 +1609,7 @@ static int mes_v12_0_suspend(struct amdgpu_ip_block *ip_block)
>   	if (r)
>   		return r;
>   
> -	return mes_v12_0_hw_fini(ip_block);
> +	return 0;
>   }
>   
>   static int mes_v12_0_resume(struct amdgpu_ip_block *ip_block)
> @@ -1663,7 +1655,6 @@ static const struct amd_ip_funcs mes_v12_0_ip_funcs = {
>   	.sw_init = mes_v12_0_sw_init,
>   	.sw_fini = mes_v12_0_sw_fini,
>   	.hw_init = mes_v12_0_hw_init,
> -	.hw_fini = mes_v12_0_hw_fini,
>   	.suspend = mes_v12_0_suspend,
>   	.resume = mes_v12_0_resume,
>   };
> diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
> index 66ccb76eb72a..e1b3bef6992a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si.c
> @@ -2634,11 +2634,6 @@ static int si_common_hw_init(struct amdgpu_ip_block *ip_block)
>   	return 0;
>   }
>   
> -static int si_common_hw_fini(struct amdgpu_ip_block *ip_block)
> -{
> -	return 0;
> -}
> -
>   static int si_common_resume(struct amdgpu_ip_block *ip_block)
>   {
>   	return si_common_hw_init(ip_block);
> @@ -2676,7 +2671,6 @@ static const struct amd_ip_funcs si_common_ip_funcs = {
>   	.early_init = si_common_early_init,
>   	.late_init = NULL,
>   	.hw_init = si_common_hw_init,
> -	.hw_fini = si_common_hw_fini,
>   	.resume = si_common_resume,
>   	.is_idle = si_common_is_idle,
>   	.wait_for_idle = si_common_wait_for_idle,


  reply	other threads:[~2024-10-17 11:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 10:06 [PATCH v4 00/15] validate/clean the functions of ip funcs Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 01/15] drm/amdgpu: validate sw_init before function call Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 02/15] drm/amdgpu: clean the dummy sw_init functions Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 03/15] drm/amdgpu: validate sw_fini before function call Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 04/15] drm/amdgpu: clean the dummy sw_fini functions Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 05/15] drm/amdgpu: validate hw_fini before function call Sunil Khatri
2024-10-17 11:52   ` Christian König
2024-10-17 12:44     ` Khatri, Sunil
2024-10-17 10:06 ` [PATCH v4 06/15] drm/amdgpu: validate suspend " Sunil Khatri
2024-10-17 11:54   ` Christian König
2024-10-17 12:45     ` Khatri, Sunil
2024-10-17 10:06 ` [PATCH v4 07/15] drm/amdgpu: validate resume " Sunil Khatri
2024-10-17 11:55   ` Christian König
2024-10-17 12:46     ` Khatri, Sunil
2024-10-17 10:06 ` [PATCH v4 08/15] drm/amdgpu: validate wait_for_idle " Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 09/15] drm/amdgpu: clean the dummy resume functions Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 10/15] drm/amdgpu: clean the dummy suspend functions Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 11/15] drm/amdgpu: clean the dummy hw_fini functions Sunil Khatri
2024-10-17 11:58   ` Christian König [this message]
2024-10-17 12:47     ` Khatri, Sunil
2024-10-17 10:06 ` [PATCH v4 12/15] drm/amdgpu: clean the dummy wait_for_idle functions Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 13/15] drm/amdgpu: clean the dummy soft_reset functions Sunil Khatri
2024-10-17 10:06 ` [PATCH v4 14/15] drm/amdgpu: clean unused functions of amd_ip_funcs Sunil Khatri
2024-10-17 12:18   ` Christian König
2024-10-17 12:49     ` Khatri, Sunil
2024-10-17 10:06 ` [PATCH v4 15/15] drm/amdgpu: validate get_clockgating_state before use Sunil Khatri
2024-10-17 12:20   ` Christian König
2024-10-17 12:55     ` Khatri, Sunil
2024-10-17 13:15       ` Christian König
2024-10-17 12:23 ` [PATCH v4 00/15] validate/clean the functions of ip funcs Christian König
2024-10-17 12:57   ` Khatri, Sunil

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=6c44c6b7-bdb9-483b-9027-8e93380a710c@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=sunil.khatri@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