AMD-GFX Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh
@ 2021-04-21  7:12 Jinzhou Su
  2021-04-21  7:27 ` Huang Rui
  0 siblings, 1 reply; 5+ messages in thread
From: Jinzhou Su @ 2021-04-21  7:12 UTC (permalink / raw)
  To: amd-gfx; +Cc: Jinzhou Su, ray.huang

Add flags AMD_CG_SUPPORT_SDMA_MGCG for Vangogh.
Start to open sdma mgcg from firmware version 70.

Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/nv.c        | 1 +
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index d54af7f8801b..0142f6760ad2 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -1118,6 +1118,7 @@ static int nv_common_early_init(void *handle)
 			AMD_CG_SUPPORT_MC_LS |
 			AMD_CG_SUPPORT_GFX_FGCG |
 			AMD_CG_SUPPORT_VCN_MGCG |
+			AMD_CG_SUPPORT_SDMA_MGCG |
 			AMD_CG_SUPPORT_JPEG_MGCG;
 		adev->pg_flags = AMD_PG_SUPPORT_GFX_PG |
 			AMD_PG_SUPPORT_VCN |
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index b1ad9e52b234..4ba7fce4c0b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -1556,6 +1556,10 @@ static void sdma_v5_2_update_medium_grain_clock_gating(struct amdgpu_device *ade
 	int i;
 
 	for (i = 0; i < adev->sdma.num_instances; i++) {
+
+		if (adev->sdma.instance[i].fw_version < 70 && adev->asic_type == CHIP_VANGOGH)
+			adev->cg_flags &= ~AMD_CG_SUPPORT_SDMA_MGCG;
+
 		if (enable && (adev->cg_flags & AMD_CG_SUPPORT_SDMA_MGCG)) {
 			/* Enable sdma clock gating */
 			def = data = RREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_CLK_CTRL));
-- 
2.27.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh
  2021-04-21  7:12 [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh Jinzhou Su
@ 2021-04-21  7:27 ` Huang Rui
  0 siblings, 0 replies; 5+ messages in thread
From: Huang Rui @ 2021-04-21  7:27 UTC (permalink / raw)
  To: Su, Jinzhou (Joe); +Cc: amd-gfx

On Wed, Apr 21, 2021 at 03:12:50PM +0800, Su, Jinzhou (Joe) wrote:
> Add flags AMD_CG_SUPPORT_SDMA_MGCG for Vangogh.
> Start to open sdma mgcg from firmware version 70.
> 
> Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/nv.c        | 1 +
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
> index d54af7f8801b..0142f6760ad2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nv.c
> @@ -1118,6 +1118,7 @@ static int nv_common_early_init(void *handle)
>  			AMD_CG_SUPPORT_MC_LS |
>  			AMD_CG_SUPPORT_GFX_FGCG |
>  			AMD_CG_SUPPORT_VCN_MGCG |
> +			AMD_CG_SUPPORT_SDMA_MGCG |
>  			AMD_CG_SUPPORT_JPEG_MGCG;
>  		adev->pg_flags = AMD_PG_SUPPORT_GFX_PG |
>  			AMD_PG_SUPPORT_VCN |
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> index b1ad9e52b234..4ba7fce4c0b4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> @@ -1556,6 +1556,10 @@ static void sdma_v5_2_update_medium_grain_clock_gating(struct amdgpu_device *ade
>  	int i;
>  
>  	for (i = 0; i < adev->sdma.num_instances; i++) {
> +
> +		if (adev->sdma.instance[i].fw_version < 70 && adev->asic_type == CHIP_VANGOGH)
> +			adev->cg_flags &= ~AMD_CG_SUPPORT_SDMA_MGCG;
> +
>  		if (enable && (adev->cg_flags & AMD_CG_SUPPORT_SDMA_MGCG)) {
>  			/* Enable sdma clock gating */
>  			def = data = RREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_CLK_CTRL));
> -- 
> 2.27.0
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh
  2021-02-24  5:33 Jinzhou Su
  2021-02-24  5:41 ` Deucher, Alexander
@ 2021-02-24  6:27 ` Huang Rui
  1 sibling, 0 replies; 5+ messages in thread
From: Huang Rui @ 2021-02-24  6:27 UTC (permalink / raw)
  To: Su, Jinzhou (Joe); +Cc: amd-gfx

On Wed, Feb 24, 2021 at 01:33:19PM +0800, Su, Jinzhou (Joe) wrote:
> Add AMD_CG_SUPPORT_SDMA_MGCG for Vangogh
> 
> Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/nv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
> index 160fa5f59805..393a0d5905ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nv.c
> @@ -1003,6 +1003,7 @@ static int nv_common_early_init(void *handle)
>  			AMD_CG_SUPPORT_MC_LS |
>  			AMD_CG_SUPPORT_GFX_FGCG |
>  			AMD_CG_SUPPORT_VCN_MGCG |
> +			AMD_CG_SUPPORT_SDMA_MGCG |
>  			AMD_CG_SUPPORT_JPEG_MGCG;
>  		adev->pg_flags = AMD_PG_SUPPORT_GFX_PG |
>  			AMD_PG_SUPPORT_VCN |
> -- 
> 2.17.1
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh
  2021-02-24  5:33 Jinzhou Su
@ 2021-02-24  5:41 ` Deucher, Alexander
  2021-02-24  6:27 ` Huang Rui
  1 sibling, 0 replies; 5+ messages in thread
From: Deucher, Alexander @ 2021-02-24  5:41 UTC (permalink / raw)
  To: Su, Jinzhou (Joe), amd-gfx; +Cc: Huang, Ray

[-- Attachment #1.1: Type: text/plain, Size: 1854 bytes --]

[AMD Official Use Only - Internal Distribution Only]

Acked-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Jinzhou Su <Jinzhou.Su@amd.com>
Sent: Wednesday, February 24, 2021 12:33 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Su, Jinzhou (Joe) <Jinzhou.Su@amd.com>; Huang, Ray <Ray.Huang@amd.com>
Subject: [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh

Add AMD_CG_SUPPORT_SDMA_MGCG for Vangogh

Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/nv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 160fa5f59805..393a0d5905ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -1003,6 +1003,7 @@ static int nv_common_early_init(void *handle)
                         AMD_CG_SUPPORT_MC_LS |
                         AMD_CG_SUPPORT_GFX_FGCG |
                         AMD_CG_SUPPORT_VCN_MGCG |
+                       AMD_CG_SUPPORT_SDMA_MGCG |
                         AMD_CG_SUPPORT_JPEG_MGCG;
                 adev->pg_flags = AMD_PG_SUPPORT_GFX_PG |
                         AMD_PG_SUPPORT_VCN |
--
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C791e8418aa8f4ff6eb5708d8d885be42%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637497416235253073%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Ajm4v5%2FRrbMGO1%2BbUGHByfzI3%2Bb%2F8GJY7hnIt6FHzB0%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 4110 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh
@ 2021-02-24  5:33 Jinzhou Su
  2021-02-24  5:41 ` Deucher, Alexander
  2021-02-24  6:27 ` Huang Rui
  0 siblings, 2 replies; 5+ messages in thread
From: Jinzhou Su @ 2021-02-24  5:33 UTC (permalink / raw)
  To: amd-gfx; +Cc: Jinzhou Su, ray.huang

Add AMD_CG_SUPPORT_SDMA_MGCG for Vangogh

Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/nv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 160fa5f59805..393a0d5905ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -1003,6 +1003,7 @@ static int nv_common_early_init(void *handle)
 			AMD_CG_SUPPORT_MC_LS |
 			AMD_CG_SUPPORT_GFX_FGCG |
 			AMD_CG_SUPPORT_VCN_MGCG |
+			AMD_CG_SUPPORT_SDMA_MGCG |
 			AMD_CG_SUPPORT_JPEG_MGCG;
 		adev->pg_flags = AMD_PG_SUPPORT_GFX_PG |
 			AMD_PG_SUPPORT_VCN |
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21  7:12 [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh Jinzhou Su
2021-04-21  7:27 ` Huang Rui
  -- strict thread matches above, loose matches on Subject: below --
2021-02-24  5:33 Jinzhou Su
2021-02-24  5:41 ` Deucher, Alexander
2021-02-24  6:27 ` Huang Rui

AMD-GFX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/amd-gfx/0 amd-gfx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 amd-gfx amd-gfx/ https://lore.kernel.org/amd-gfx \
		amd-gfx@lists.freedesktop.org
	public-inbox-index amd-gfx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.amd-gfx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git