Skip to contentSkip to conversation

drm/amd/pm: Add vclk and dclk sysnode for GC 9.4.3

PATCH In review Asad Kamal 3 participants 3 messages Aug 9, 2023 – Aug 10, 2023

Subsystems (3)
lore
Share & tools
lore

Asad Kamal

author
#0 lore raw

PATCH 1/1 drm/amd/pm: Add vclk and dclk sysnode for GC 9.4.3

Expose sysfs vclck and dclk entries for GC version 9.4.3

---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +4 -2
index 3922dd274f30..e4183d6d7f39 100644
@@ -2095,7 +2095,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 		      gc_ver == IP_VERSION(10, 1, 2) ||
 		      gc_ver == IP_VERSION(11, 0, 0) ||
 		      gc_ver == IP_VERSION(11, 0, 2) ||
-		      gc_ver == IP_VERSION(11, 0, 3)))
+		      gc_ver == IP_VERSION(11, 0, 3) ||
+		      gc_ver == IP_VERSION(9, 4, 3)))
 			*states = ATTR_STATE_UNSUPPORTED;
 	} else if (DEVICE_ATTR_IS(pp_dpm_vclk1)) {
 		if (!((gc_ver == IP_VERSION(10, 3, 1) ||
@@ -2109,7 +2110,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 		      gc_ver == IP_VERSION(10, 1, 2) ||
 		      gc_ver == IP_VERSION(11, 0, 0) ||
 		      gc_ver == IP_VERSION(11, 0, 2) ||
-		      gc_ver == IP_VERSION(11, 0, 3)))
+		      gc_ver == IP_VERSION(11, 0, 3) ||
+		      gc_ver == IP_VERSION(9, 4, 3)))
 			*states = ATTR_STATE_UNSUPPORTED;
 	} else if (DEVICE_ATTR_IS(pp_dpm_dclk1)) {
 		if (!((gc_ver == IP_VERSION(10, 3, 1) ||
Signature · 1 line
2.34.1
Reviewed-by Reviewed-by Lijo Lazar on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Regards,
Hawking
-----Original Message-----
From: Kamal, Asad <[email protected]>
Sent: Wednesday, August 9, 2023 17:10
To: [email protected]
Cc: Kamal, Asad <[email protected]>; Zhang, Hawking <[email protected]>; Lazar, Lijo <[email protected]>
Subject: [PATCH] drm/amd/pm: Add vclk and dclk sysnode for GC 9.4.3

Expose sysfs vclck and dclk entries for GC version 9.4.3

---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -1
index 3922dd274f30..e4183d6d7f39 100644
@@ -2095,7 +2095,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
                      gc_ver == IP_VERSION(10, 1, 2) ||
                      gc_ver == IP_VERSION(11, 0, 0) ||
                      gc_ver == IP_VERSION(11, 0, 2) ||
-                     gc_ver == IP_VERSION(11, 0, 3)))
+                     gc_ver == IP_VERSION(11, 0, 3) ||
+                     gc_ver == IP_VERSION(9, 4, 3)))
                        *states = ATTR_STATE_UNSUPPORTED;
        } else if (DEVICE_ATTR_IS(pp_dpm_vclk1)) {
                if (!((gc_ver == IP_VERSION(10, 3, 1) || @@ -2109,7 +2110,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
                      gc_ver == IP_VERSION(10, 1, 2) ||
                      gc_ver == IP_VERSION(11, 0, 0) ||
                      gc_ver == IP_VERSION(11, 0, 2) ||
-                     gc_ver == IP_VERSION(11, 0, 3)))
+                     gc_ver == IP_VERSION(11, 0, 3) ||
+                     gc_ver == IP_VERSION(9, 4, 3)))
                        *states = ATTR_STATE_UNSUPPORTED;
        } else if (DEVICE_ATTR_IS(pp_dpm_dclk1)) {
                if (!((gc_ver == IP_VERSION(10, 3, 1) ||

--
2.34.1

#2 lore raw
In reply to Asad Kamal

[Public]

Quoted 27 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Asad Kamal
Sent: Wednesday, August 9, 2023 5:10 PM
To: [email protected]
Cc: Lazar, Lijo <[email protected]>; Kamal, Asad <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amd/pm: Add vclk and dclk sysnode for GC 9.4.3

Expose sysfs vclck and dclk entries for GC version 9.4.3

---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +0 -0
index 3922dd274f30..e4183d6d7f39 100644
@@ -2095,7 +2095,8 @@ static int default_attr_update(struct

amdgpu_device *adev, struct amdgpu_device_

                    gc_ver == IP_VERSION(10, 1, 2) ||
                    gc_ver == IP_VERSION(11, 0, 0) ||
                    gc_ver == IP_VERSION(11, 0, 2) ||

drivers/gpu/drm/amd/pm/amdgpu_pm.c static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ · line 2099

Quoted 3 lines
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -1
-                   gc_ver == IP_VERSION(11, 0, 3)))
+                   gc_ver == IP_VERSION(11, 0, 3) ||
+                   gc_ver == IP_VERSION(9, 4, 3)))

I suggest to put IP_VERSION(9, 4, 3) prior to IP_VERSION(10...) to maintain it numerically.

drivers/gpu/drm/amd/pm/amdgpu_pm.c static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ · line 2099

Quoted 11 lines
                      *states = ATTR_STATE_UNSUPPORTED;
      } else if (DEVICE_ATTR_IS(pp_dpm_vclk1)) {
              if (!((gc_ver == IP_VERSION(10, 3, 1) || @@ -2109,7 +2110,8
@@ static int default_attr_update(struct amdgpu_device *adev, struct
amdgpu_device_
                    gc_ver == IP_VERSION(10, 1, 2) ||
                    gc_ver == IP_VERSION(11, 0, 0) ||
                    gc_ver == IP_VERSION(11, 0, 2) ||
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -1
-                   gc_ver == IP_VERSION(11, 0, 3)))
+                   gc_ver == IP_VERSION(11, 0, 3) ||
+                   gc_ver == IP_VERSION(9, 4, 3)))

Same as above.

Regards,
Guchun

Quoted 5 lines
                      *states = ATTR_STATE_UNSUPPORTED;
      } else if (DEVICE_ATTR_IS(pp_dpm_dclk1)) {
              if (!((gc_ver == IP_VERSION(10, 3, 1) ||

--
2.34.1