Re: [PATCH] drm/amd/pm: use attr_update if the attr has it

2021-05-31 Thread Wang, Kevin(Yang)
[AMD Official Use Only]

Reviewed-by: Kevin Wang 

Best Regards,
Kevin


From: amd-gfx  on behalf of Sathishkumar 
S 
Sent: Thursday, May 27, 2021 12:23 PM
To: amd-gfx@lists.freedesktop.org 
Cc: Deucher, Alexander ; Sundararaju, Sathishkumar 
; Sharma, Shashank 
Subject: [PATCH] drm/amd/pm: use attr_update if the attr has it

use attr_update if its available as part of the attribute.
default_attr_update was used even if attr->attr_update is true.

Signed-off-by: Sathishkumar S 
Reviewed-by: Shashank Sharma 
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 13da377888d2..f48132bc089d 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -1942,7 +1942,7 @@ static int amdgpu_device_attr_create(struct amdgpu_device 
*adev,

 BUG_ON(!attr);

-   attr_update = attr->attr_update ? attr_update : default_attr_update;
+   attr_update = attr->attr_update ? attr->attr_update : 
default_attr_update;

 ret = attr_update(adev, attr, mask, _states);
 if (ret) {
--
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-gfxdata=04%7C01%7CKevin1.Wang%40amd.com%7Cdc81930600ef4ac8e5fe08d921aee79c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637577857383123909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=7YtvWuhj7sqCF%2BvKF8FG%2BcT8zFCZoNHU%2Bo1eiATTZQA%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH] drm/amd/pm: use attr_update if the attr has it

2021-05-31 Thread Lazar, Lijo
[Public]

Reviewed-by: Lijo Lazar 

-Original Message-
From: amd-gfx  On Behalf Of Sathishkumar 
S
Sent: Thursday, May 27, 2021 9:54 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander ; Sundararaju, Sathishkumar 
; Sharma, Shashank 
Subject: [PATCH] drm/amd/pm: use attr_update if the attr has it

use attr_update if its available as part of the attribute.
default_attr_update was used even if attr->attr_update is true.

Signed-off-by: Sathishkumar S 
Reviewed-by: Shashank Sharma 
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 13da377888d2..f48132bc089d 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -1942,7 +1942,7 @@ static int amdgpu_device_attr_create(struct amdgpu_device 
*adev,
 
BUG_ON(!attr);
 
-   attr_update = attr->attr_update ? attr_update : default_attr_update;
+   attr_update = attr->attr_update ? attr->attr_update : 
default_attr_update;
 
ret = attr_update(adev, attr, mask, _states);
if (ret) {
-- 
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-gfxdata=04%7C01%7Clijo.lazar%40amd.com%7Cdc81930600ef4ac8e5fe08d921aee79c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637577857384896071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=SH2QzceVG3P9l30SzIQ5sgTd9cUjUr1Dr7y87PR7Ie4%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amd/pm: use attr_update if the attr has it

2021-05-28 Thread Sathishkumar S
use attr_update if its available as part of the attribute.
default_attr_update was used even if attr->attr_update is true.

Signed-off-by: Sathishkumar S 
Reviewed-by: Shashank Sharma 
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 13da377888d2..f48132bc089d 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -1942,7 +1942,7 @@ static int amdgpu_device_attr_create(struct amdgpu_device 
*adev,
 
BUG_ON(!attr);
 
-   attr_update = attr->attr_update ? attr_update : default_attr_update;
+   attr_update = attr->attr_update ? attr->attr_update : 
default_attr_update;
 
ret = attr_update(adev, attr, mask, _states);
if (ret) {
-- 
2.17.1

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