* [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode
@ 2022-02-11 1:23 Danijel Slivka
2022-02-17 19:16 ` Kasiviswanathan, Harish
0 siblings, 1 reply; 3+ messages in thread
From: Danijel Slivka @ 2022-02-11 1:23 UTC (permalink / raw)
To: amd-gfx; +Cc: Danijel Slivka
This patch prohibits performing of set commands on all hwmon attributes
through sysfs in ONEVF mode.
Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index ad5da252228b..3cec023a7b06 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -3161,6 +3161,10 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev))
return 0;
+ /* under pp one vf mode manage of hwmon attributes is not supported */
+ if (amdgpu_sriov_is_pp_one_vf(adev))
+ effective_mode &= ~S_IWUSR;
+
/* Skip fan attributes if fan is not present */
if (adev->pm.no_fan && (attr == &sensor_dev_attr_pwm1.dev_attr.attr ||
attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr ||
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode
2022-02-11 1:23 [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode Danijel Slivka
@ 2022-02-17 19:16 ` Kasiviswanathan, Harish
2022-02-23 15:50 ` Kasiviswanathan, Harish
0 siblings, 1 reply; 3+ messages in thread
From: Kasiviswanathan, Harish @ 2022-02-17 19:16 UTC (permalink / raw)
To: Slivka, Danijel, amd-gfx; +Cc: Slivka, Danijel
[AMD Official Use Only]
Acked-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Danijel Slivka
Sent: Thursday, February 10, 2022 8:24 PM
To: amd-gfx@lists.freedesktop.org
Cc: Slivka, Danijel <Danijel.Slivka@amd.com>
Subject: [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode
This patch prohibits performing of set commands on all hwmon attributes through sysfs in ONEVF mode.
Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index ad5da252228b..3cec023a7b06 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -3161,6 +3161,10 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev))
return 0;
+ /* under pp one vf mode manage of hwmon attributes is not supported */
+ if (amdgpu_sriov_is_pp_one_vf(adev))
+ effective_mode &= ~S_IWUSR;
+
/* Skip fan attributes if fan is not present */
if (adev->pm.no_fan && (attr == &sensor_dev_attr_pwm1.dev_attr.attr ||
attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr ||
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode
2022-02-17 19:16 ` Kasiviswanathan, Harish
@ 2022-02-23 15:50 ` Kasiviswanathan, Harish
0 siblings, 0 replies; 3+ messages in thread
From: Kasiviswanathan, Harish @ 2022-02-23 15:50 UTC (permalink / raw)
To: Kasiviswanathan, Harish, Slivka, Danijel, amd-gfx; +Cc: Slivka, Danijel
[AMD Official Use Only]
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Kasiviswanathan, Harish
Sent: Thursday, February 17, 2022 2:17 PM
To: Slivka, Danijel <Danijel.Slivka@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Slivka, Danijel <Danijel.Slivka@amd.com>
Subject: RE: [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode
[AMD Official Use Only]
Acked-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Danijel Slivka
Sent: Thursday, February 10, 2022 8:24 PM
To: amd-gfx@lists.freedesktop.org
Cc: Slivka, Danijel <Danijel.Slivka@amd.com>
Subject: [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode
This patch prohibits performing of set commands on all hwmon attributes through sysfs in ONEVF mode.
Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index ad5da252228b..3cec023a7b06 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -3161,6 +3161,10 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev))
return 0;
+ /* under pp one vf mode manage of hwmon attributes is not supported */
+ if (amdgpu_sriov_is_pp_one_vf(adev))
+ effective_mode &= ~S_IWUSR;
+
/* Skip fan attributes if fan is not present */
if (adev->pm.no_fan && (attr == &sensor_dev_attr_pwm1.dev_attr.attr ||
attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr ||
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-23 15:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 1:23 [PATCH] amdgpu/pm: Disable managing hwmon sysfs attributes for ONEVF mode Danijel Slivka
2022-02-17 19:16 ` Kasiviswanathan, Harish
2022-02-23 15:50 ` Kasiviswanathan, Harish
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.