All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Remove redundant logic in GC v9.4.3
@ 2025-02-17  5:14 Lijo Lazar
  2025-02-19  6:24 ` Lazar, Lijo
  2025-02-19  6:48 ` Zhang, Hawking
  0 siblings, 2 replies; 3+ messages in thread
From: Lijo Lazar @ 2025-02-17  5:14 UTC (permalink / raw)
  To: amd-gfx; +Cc: Hawking.Zhang, Alexander.Deucher, Le.Ma

GFXOFF check is not need for GC v9.4.3. Also, save/restore list is
available by default.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index f4635fc8a7ca..f1d6f4b92e99 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -563,17 +563,6 @@ static int gfx_v9_4_3_init_rlc_microcode(struct amdgpu_device *adev,
 	return err;
 }
 
-static bool gfx_v9_4_3_should_disable_gfxoff(struct pci_dev *pdev)
-{
-	return true;
-}
-
-static void gfx_v9_4_3_check_if_need_gfxoff(struct amdgpu_device *adev)
-{
-	if (gfx_v9_4_3_should_disable_gfxoff(adev->pdev))
-		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
-}
-
 static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
 					  const char *chip_name)
 {
@@ -600,8 +589,6 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
 	adev->gfx.mec2_fw_version = adev->gfx.mec_fw_version;
 	adev->gfx.mec2_feature_version = adev->gfx.mec_feature_version;
 
-	gfx_v9_4_3_check_if_need_gfxoff(adev);
-
 out:
 	if (err)
 		amdgpu_ucode_release(&adev->gfx.mec_fw);
@@ -1360,10 +1347,8 @@ static void gfx_v9_4_3_xcc_init_pg(struct amdgpu_device *adev, int xcc_id)
 {
 	/*
 	 * Rlc save restore list is workable since v2_1.
-	 * And it's needed by gfxoff feature.
 	 */
-	if (adev->gfx.rlc.is_rlc_v2_1)
-		gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
+	gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
 }
 
 static void gfx_v9_4_3_xcc_disable_gpa_mode(struct amdgpu_device *adev, int xcc_id)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Remove redundant logic in GC v9.4.3
  2025-02-17  5:14 [PATCH] drm/amdgpu: Remove redundant logic in GC v9.4.3 Lijo Lazar
@ 2025-02-19  6:24 ` Lazar, Lijo
  2025-02-19  6:48 ` Zhang, Hawking
  1 sibling, 0 replies; 3+ messages in thread
From: Lazar, Lijo @ 2025-02-19  6:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Hawking.Zhang, Alexander.Deucher, Le.Ma

<Ping>

On 2/17/2025 10:44 AM, Lijo Lazar wrote:
> GFXOFF check is not need for GC v9.4.3. Also, save/restore list is
> available by default.
> 
> Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 17 +----------------
>  1 file changed, 1 insertion(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> index f4635fc8a7ca..f1d6f4b92e99 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> @@ -563,17 +563,6 @@ static int gfx_v9_4_3_init_rlc_microcode(struct amdgpu_device *adev,
>  	return err;
>  }
>  
> -static bool gfx_v9_4_3_should_disable_gfxoff(struct pci_dev *pdev)
> -{
> -	return true;
> -}
> -
> -static void gfx_v9_4_3_check_if_need_gfxoff(struct amdgpu_device *adev)
> -{
> -	if (gfx_v9_4_3_should_disable_gfxoff(adev->pdev))
> -		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
> -}
> -
>  static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
>  					  const char *chip_name)
>  {
> @@ -600,8 +589,6 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
>  	adev->gfx.mec2_fw_version = adev->gfx.mec_fw_version;
>  	adev->gfx.mec2_feature_version = adev->gfx.mec_feature_version;
>  
> -	gfx_v9_4_3_check_if_need_gfxoff(adev);
> -
>  out:
>  	if (err)
>  		amdgpu_ucode_release(&adev->gfx.mec_fw);
> @@ -1360,10 +1347,8 @@ static void gfx_v9_4_3_xcc_init_pg(struct amdgpu_device *adev, int xcc_id)
>  {
>  	/*
>  	 * Rlc save restore list is workable since v2_1.
> -	 * And it's needed by gfxoff feature.
>  	 */
> -	if (adev->gfx.rlc.is_rlc_v2_1)
> -		gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
> +	gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
>  }
>  
>  static void gfx_v9_4_3_xcc_disable_gpa_mode(struct amdgpu_device *adev, int xcc_id)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu: Remove redundant logic in GC v9.4.3
  2025-02-17  5:14 [PATCH] drm/amdgpu: Remove redundant logic in GC v9.4.3 Lijo Lazar
  2025-02-19  6:24 ` Lazar, Lijo
@ 2025-02-19  6:48 ` Zhang, Hawking
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Hawking @ 2025-02-19  6:48 UTC (permalink / raw)
  To: Lazar, Lijo, amd-gfx@lists.freedesktop.org; +Cc: Deucher, Alexander, Ma, Le

[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>

Regards,
Hawking
-----Original Message-----
From: Lazar, Lijo <Lijo.Lazar@amd.com>
Sent: Monday, February 17, 2025 13:15
To: amd-gfx@lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Ma, Le <Le.Ma@amd.com>
Subject: [PATCH] drm/amdgpu: Remove redundant logic in GC v9.4.3

GFXOFF check is not need for GC v9.4.3. Also, save/restore list is available by default.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index f4635fc8a7ca..f1d6f4b92e99 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -563,17 +563,6 @@ static int gfx_v9_4_3_init_rlc_microcode(struct amdgpu_device *adev,
        return err;
 }

-static bool gfx_v9_4_3_should_disable_gfxoff(struct pci_dev *pdev) -{
-       return true;
-}
-
-static void gfx_v9_4_3_check_if_need_gfxoff(struct amdgpu_device *adev) -{
-       if (gfx_v9_4_3_should_disable_gfxoff(adev->pdev))
-               adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
-}
-
 static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
                                          const char *chip_name)
 {
@@ -600,8 +589,6 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
        adev->gfx.mec2_fw_version = adev->gfx.mec_fw_version;
        adev->gfx.mec2_feature_version = adev->gfx.mec_feature_version;

-       gfx_v9_4_3_check_if_need_gfxoff(adev);
-
 out:
        if (err)
                amdgpu_ucode_release(&adev->gfx.mec_fw);
@@ -1360,10 +1347,8 @@ static void gfx_v9_4_3_xcc_init_pg(struct amdgpu_device *adev, int xcc_id)  {
        /*
         * Rlc save restore list is workable since v2_1.
-        * And it's needed by gfxoff feature.
         */
-       if (adev->gfx.rlc.is_rlc_v2_1)
-               gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
+       gfx_v9_4_3_xcc_enable_save_restore_machine(adev, xcc_id);
 }

 static void gfx_v9_4_3_xcc_disable_gpa_mode(struct amdgpu_device *adev, int xcc_id)
--
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-19  6:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17  5:14 [PATCH] drm/amdgpu: Remove redundant logic in GC v9.4.3 Lijo Lazar
2025-02-19  6:24 ` Lazar, Lijo
2025-02-19  6:48 ` Zhang, Hawking

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.