Skip to contentSkip to conversation

drm/amd: some trivial fixes

PATCH Applied [email protected] 2 participants 5 messages Aug 4, 2024 – Aug 5, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover drm/amd: some trivial fixes

From: Tobias Jakobi <[email protected]>

Nothing serious here, just some bits I noticed when reading code.

Tobias Jakobi (3):
drm/amd: Make amd_ip_funcs static for SDMA v5.0 drm/amd: Make amd_ip_funcs static for SDMA v5.2 drm/amdgpu/swsmu: fix SMU11 typos (memlk -> memclk)

 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c                  | 2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.h                  | 1 -
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c                  | 2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.h                  | 1 -
 drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c         | 4 ++--
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 ++--
 6 files changed, 6 insertions(+), 8 deletions(-)
Signature · 1 line
2.44.2
#1 lore raw

PATCH 1/3 drm/amd: Make amd_ip_funcs static for SDMA v5.0

From: Tobias Jakobi <[email protected]>

The struct can be static, as it is only used in this translation unit.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -1
index b7d33d78bce0..846c05332cd8 100644
@@ -1718,7 +1718,7 @@ static void sdma_v5_0_get_clockgating_state(void *handle, u64 *flags)
 		*flags |= AMD_CG_SUPPORT_SDMA_LS;
 }
 
-const struct amd_ip_funcs sdma_v5_0_ip_funcs = {
+static const struct amd_ip_funcs sdma_v5_0_ip_funcs = {
 	.name = "sdma_v5_0",
 	.early_init = sdma_v5_0_early_init,
 	.late_init = NULL,
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.h +0 -1
index d4e3c2e696f6..2ab71f21755a 100644
@@ -24,7 +24,6 @@
 #ifndef __SDMA_V5_0_H__
 #define __SDMA_V5_0_H__
 
-extern const struct amd_ip_funcs sdma_v5_0_ip_funcs;
 extern const struct amdgpu_ip_block_version sdma_v5_0_ip_block;
 
 #endif /* __SDMA_V5_0_H__ */
Signature · 1 line
2.44.2
#2 lore raw

PATCH 2/3 drm/amd: Make amd_ip_funcs static for SDMA v5.2

In reply to [email protected]

From: Tobias Jakobi <[email protected]>

The struct can be static, as it is only used in this translation unit.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1 -1
index af1e90159ce3..3196663dd4f4 100644
@@ -1674,7 +1674,7 @@ static void sdma_v5_2_ring_end_use(struct amdgpu_ring *ring)
 	amdgpu_gfx_off_ctrl(adev, true);
 }
 
-const struct amd_ip_funcs sdma_v5_2_ip_funcs = {
+static const struct amd_ip_funcs sdma_v5_2_ip_funcs = {
 	.name = "sdma_v5_2",
 	.early_init = sdma_v5_2_early_init,
 	.late_init = NULL,
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.h +0 -1
index b70414fef2a1..863145b3a77e 100644
@@ -24,7 +24,6 @@
 #ifndef __SDMA_V5_2_H__
 #define __SDMA_V5_2_H__
 
-extern const struct amd_ip_funcs sdma_v5_2_ip_funcs;
 extern const struct amdgpu_ip_block_version sdma_v5_2_ip_block;
 
 #endif /* __SDMA_V5_2_H__ */
Signature · 1 line
2.44.2
#3 lore raw

PATCH 3/3 drm/amdgpu/swsmu: fix SMU11 typos (memlk -> memclk)

In reply to [email protected]

From: Tobias Jakobi <[email protected]>

No functional changes.

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c         | 4 ++--
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +2 -2
index 5a68d365967f..a1a0e6224d72 100644
@@ -1978,7 +1978,7 @@ static int navi10_get_power_profile_mode(struct smu_context *smu, char *buf)
 		size += sysfs_emit_at(buf, size, "%19s %d(%13s) %7d %7d %7d %7d %7d %7d %7d %7d %7d\n",
 			" ",
 			2,
-			"MEMLK",
+			"MEMCLK",
 			activity_monitor.Mem_FPS,
 			activity_monitor.Mem_MinFreqStep,
 			activity_monitor.Mem_MinActiveFreqType,
@@ -2038,7 +2038,7 @@ static int navi10_set_power_profile_mode(struct smu_context *smu, long *input, u
 			activity_monitor.Soc_PD_Data_error_coeff = input[8];
 			activity_monitor.Soc_PD_Data_error_rate_coeff = input[9];
 			break;
-		case 2: /* Memlk */
+		case 2: /* Memclk */
 			activity_monitor.Mem_FPS = input[1];
 			activity_monitor.Mem_MinFreqStep = input[2];
 			activity_monitor.Mem_MinActiveFreqType = input[3];
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +2 -2
index e426f457a017..a7340569b9a1 100644
@@ -1691,7 +1691,7 @@ static int sienna_cichlid_get_power_profile_mode(struct smu_context *smu, char *
 		size += sysfs_emit_at(buf, size, "%19s %d(%13s) %7d %7d %7d %7d %7d %7d %7d %7d %7d\n",
 			" ",
 			2,
-			"MEMLK",
+			"MEMCLK",
 			activity_monitor->Mem_FPS,
 			activity_monitor->Mem_MinFreqStep,
 			activity_monitor->Mem_MinActiveFreqType,
@@ -1754,7 +1754,7 @@ static int sienna_cichlid_set_power_profile_mode(struct smu_context *smu, long *
 			activity_monitor->Fclk_PD_Data_error_coeff = input[8];
 			activity_monitor->Fclk_PD_Data_error_rate_coeff = input[9];
 			break;
-		case 2: /* Memlk */
+		case 2: /* Memclk */
 			activity_monitor->Mem_FPS = input[1];
 			activity_monitor->Mem_MinFreqStep = input[2];
 			activity_monitor->Mem_MinActiveFreqType = input[3];
Signature · 1 line
2.44.2
Applied
#4 lore raw
In reply to [email protected]

Applied the series. Thanks!

Alex

Quoted 21 lines · On Sun, Aug 4, 2024 at 10:14 AM <[email protected]> wrote:

From: Tobias Jakobi <[email protected]>

Nothing serious here, just some bits I noticed when reading code.

Tobias Jakobi (3):
drm/amd: Make amd_ip_funcs static for SDMA v5.0 drm/amd: Make amd_ip_funcs static for SDMA v5.2 drm/amdgpu/swsmu: fix SMU11 typos (memlk -> memclk)

 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c                  | 2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.h                  | 1 -
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c                  | 2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.h                  | 1 -
 drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c         | 4 ++--
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 ++--
 6 files changed, 6 insertions(+), 8 deletions(-)

--
2.44.2