projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
205e5c4
)
drm/xe/hwmon: Remove unwanted write permission for currN_label
author
Karthik Poosa
<karthik.poosa@intel.com>
Fri, 19 Apr 2024 12:59:45 +0000
(18:29 +0530)
committer
Rodrigo Vivi
<rodrigo.vivi@intel.com>
Thu, 9 May 2024 18:50:25 +0000
(14:50 -0400)
Change umode of currN_label from 0644 to 0444 as write permission
not needed for label.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20240419125945.4085629-1-karthik.poosa@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_hwmon.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/xe/xe_hwmon.c
b/drivers/gpu/drm/xe/xe_hwmon.c
index
453e601
..
dca2751
100644
(file)
--- a/
drivers/gpu/drm/xe/xe_hwmon.c
+++ b/
drivers/gpu/drm/xe/xe_hwmon.c
@@
-550,12
+550,17
@@
xe_hwmon_curr_is_visible(const struct xe_hwmon *hwmon, u32 attr, int channel)
{
u32 uval;
+ /* hwmon sysfs attribute of current available only for package */
+ if (channel != CHANNEL_PKG)
+ return 0;
+
switch (attr) {
case hwmon_curr_crit:
- case hwmon_curr_label:
- if (channel == CHANNEL_PKG)
return (xe_hwmon_pcode_read_i1(hwmon->gt, &uval) ||
(uval & POWER_SETUP_I1_WATTS)) ? 0 : 0644;
+ case hwmon_curr_label:
+ return (xe_hwmon_pcode_read_i1(hwmon->gt, &uval) ||
+ (uval & POWER_SETUP_I1_WATTS)) ? 0 : 0444;
break;
default:
return 0;