All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/pm: use attr_update if the attr has it
@ 2021-05-27  4:23 Sathishkumar S
  2021-05-31  6:57 ` Lazar, Lijo
  2021-05-31  7:05 ` Wang, Kevin(Yang)
  0 siblings, 2 replies; 3+ messages in thread
From: Sathishkumar S @ 2021-05-27  4:23 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alexander Deucher, Sathishkumar S, Shashank Sharma

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 <sathishkumar.sundararaju@amd.com>
Reviewed-by: Shashank Sharma <Shashank.sharma@amd.com>
---
 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, &attr_states);
 	if (ret) {
-- 
2.17.1

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

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

* RE: [PATCH] drm/amd/pm: use attr_update if the attr has it
  2021-05-27  4:23 [PATCH] drm/amd/pm: use attr_update if the attr has it Sathishkumar S
@ 2021-05-31  6:57 ` Lazar, Lijo
  2021-05-31  7:05 ` Wang, Kevin(Yang)
  1 sibling, 0 replies; 3+ messages in thread
From: Lazar, Lijo @ 2021-05-31  6:57 UTC (permalink / raw)
  To: Sundararaju, Sathishkumar, amd-gfx
  Cc: Deucher, Alexander, Sundararaju, Sathishkumar, Sharma, Shashank

[Public]

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Sathishkumar S
Sent: Thursday, May 27, 2021 9:54 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Sundararaju, Sathishkumar <Sathishkumar.Sundararaju@amd.com>; Sharma, Shashank <Shashank.Sharma@amd.com>
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 <sathishkumar.sundararaju@amd.com>
Reviewed-by: Shashank Sharma <Shashank.sharma@amd.com>
---
 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, &attr_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-gfx&amp;data=04%7C01%7Clijo.lazar%40amd.com%7Cdc81930600ef4ac8e5fe08d921aee79c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637577857384896071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=SH2QzceVG3P9l30SzIQ5sgTd9cUjUr1Dr7y87PR7Ie4%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amd/pm: use attr_update if the attr has it
  2021-05-27  4:23 [PATCH] drm/amd/pm: use attr_update if the attr has it Sathishkumar S
  2021-05-31  6:57 ` Lazar, Lijo
@ 2021-05-31  7:05 ` Wang, Kevin(Yang)
  1 sibling, 0 replies; 3+ messages in thread
From: Wang, Kevin(Yang) @ 2021-05-31  7:05 UTC (permalink / raw)
  To: Sundararaju, Sathishkumar, amd-gfx; +Cc: Deucher, Alexander, Sharma, Shashank


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

[AMD Official Use Only]

Reviewed-by: Kevin Wang <kevin1.wang@amd.com>

Best Regards,
Kevin

________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Sathishkumar S <sathishkumar.sundararaju@amd.com>
Sent: Thursday, May 27, 2021 12:23 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Sundararaju, Sathishkumar <Sathishkumar.Sundararaju@amd.com>; Sharma, Shashank <Shashank.Sharma@amd.com>
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 <sathishkumar.sundararaju@amd.com>
Reviewed-by: Shashank Sharma <Shashank.sharma@amd.com>
---
 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, &attr_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-gfx&amp;data=04%7C01%7CKevin1.Wang%40amd.com%7Cdc81930600ef4ac8e5fe08d921aee79c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637577857383123909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=7YtvWuhj7sqCF%2BvKF8FG%2BcT8zFCZoNHU%2Bo1eiATTZQA%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 4194 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 related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-31  7:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  4:23 [PATCH] drm/amd/pm: use attr_update if the attr has it Sathishkumar S
2021-05-31  6:57 ` Lazar, Lijo
2021-05-31  7:05 ` Wang, Kevin(Yang)

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.