Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: Karthik Poosa <karthik.poosa@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <badal.nilawar@intel.com>,
	<rodrigo.vivi@intel.com>, <lucas.demarchi@intel.com>
Subject: Re: [PATCH] drm/xe/hwmon: Remove unwanted write permission for currN_label
Date: Fri, 19 Apr 2024 19:55:11 +0530	[thread overview]
Message-ID: <65bcccf4-475a-494a-b88b-40afd0aae639@intel.com> (raw)
In-Reply-To: <20240419125945.4085629-1-karthik.poosa@intel.com>



On 4/19/2024 6:29 PM, Karthik Poosa wrote:
> 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>
Looks good to me
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_hwmon.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index 453e601ddd5e..dca275117232 100644
> --- 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;

  parent reply	other threads:[~2024-04-19 14:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 12:59 [PATCH] drm/xe/hwmon: Remove unwanted write permission for currN_label Karthik Poosa
2024-04-19 13:25 ` ✓ CI.Patch_applied: success for " Patchwork
2024-04-19 13:26 ` ✓ CI.checkpatch: " Patchwork
2024-04-19 13:27 ` ✓ CI.KUnit: " Patchwork
2024-04-19 13:44 ` ✓ CI.Build: " Patchwork
2024-04-19 13:46 ` ✓ CI.Hooks: " Patchwork
2024-04-19 13:48 ` ✓ CI.checksparse: " Patchwork
2024-04-19 14:25 ` Riana Tauro [this message]
2024-04-22 19:28   ` [PATCH] " Rodrigo Vivi
2024-04-19 14:46 ` ✗ CI.BAT: failure for " Patchwork
2024-04-19 21:27 ` ✓ CI.Patch_applied: success for drm/xe/hwmon: Remove unwanted write permission for currN_label (rev2) Patchwork
2024-04-19 21:30 ` ✓ CI.checkpatch: " Patchwork
2024-04-19 21:34 ` ✓ CI.KUnit: " Patchwork
2024-04-19 21:47 ` ✓ CI.Build: " Patchwork
2024-04-19 21:52 ` ✓ CI.Hooks: " Patchwork
2024-04-19 21:56 ` ✓ CI.checksparse: " Patchwork
2024-04-19 22:41 ` ✗ CI.BAT: failure " Patchwork
2024-04-21  5:13 ` ✗ CI.FULL: failure for drm/xe/hwmon: Remove unwanted write permission for currN_label Patchwork
2024-04-21 15:28 ` ✗ CI.FULL: failure for drm/xe/hwmon: Remove unwanted write permission for currN_label (rev2) Patchwork
2024-04-23 12:59 ` ✓ CI.Patch_applied: success for drm/xe/hwmon: Remove unwanted write permission for currN_label (rev3) Patchwork
2024-04-23 13:00 ` ✓ CI.checkpatch: " Patchwork
2024-04-23 13:01 ` ✓ CI.KUnit: " Patchwork
2024-04-23 13:13 ` ✓ CI.Build: " Patchwork
2024-04-23 13:15 ` ✓ CI.Hooks: " Patchwork
2024-04-23 13:17 ` ✓ CI.checksparse: " Patchwork
2024-04-23 13:41 ` ✓ CI.BAT: " Patchwork
2024-04-23 20:49 ` ✗ CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65bcccf4-475a-494a-b88b-40afd0aae639@intel.com \
    --to=riana.tauro@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox