All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Riana Tauro <riana.tauro@intel.com>
Cc: "Nilawar, Badal" <badal.nilawar@intel.com>,
	lucas.demarchi@intel.com, rodrigo.vivi@intel.com,
	matthew.d.roper@intel.com, andi.shyti@linux.intel.com,
	Karthik Poosa <karthik.poosa@intel.com>,
	intel-xe@lists.freedesktop.org, anshuman.gupta@intel.com
Subject: Re: [PATCH v1] drm/xe/hwmon: expose package and vram temperature
Date: Fri, 24 Jan 2025 14:50:25 +0200	[thread overview]
Message-ID: <Z5OMkeSZT5us_PM-@black.fi.intel.com> (raw)
In-Reply-To: <bc971c1c-bcf1-40f4-a7fd-52107ebec05b@intel.com>

On Fri, Jan 24, 2025 at 11:46:05AM +0530, Riana Tauro wrote:
> Hi Raag
> 
> On 1/23/2025 8:21 AM, Raag Jadav wrote:
> > On Tue, Jan 21, 2025 at 01:56:05PM +0530, Riana Tauro wrote:
> > > Hi Raag
> > > 
> > > On 1/8/2025 2:54 PM, Raag Jadav wrote:
> > > > Add hwmon support for temp1_input and temp2_input attributes, which will
> > > > expose package and vram temperature in millidegree Celsius. With this in
> > > > place we can monitor temperature using lm-sensors tool.
> > > > 
> > > > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > > > ---
> > > >    .../ABI/testing/sysfs-driver-intel-xe-hwmon   | 16 +++++
> > > >    drivers/gpu/drm/xe/regs/xe_mchbar_regs.h      |  3 +
> > > >    drivers/gpu/drm/xe/regs/xe_pcode_regs.h       |  2 +
> > > >    drivers/gpu/drm/xe/xe_hwmon.c                 | 63 +++++++++++++++++++
> > > >    4 files changed, 84 insertions(+)
> > > > 
> > > > diff --git a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
> > > > index d792a56f59ac..998cfb0ee1a6 100644
> > > > --- a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
> > > > +++ b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
> > > > @@ -108,3 +108,19 @@ Contact:	intel-xe@lists.freedesktop.org
> > > >    Description:	RO. Package current voltage in millivolt.
> > > >    		Only supported for particular Intel Xe graphics platforms.
> > > > +
> > > > +What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp1_input
> > > > +Date:		April 2025
> > > > +KernelVersion:	6.15
> > > > +Contact:	intel-xe@lists.freedesktop.org
> > > > +Description:	RO. Package temperature in millidegree Celsius.
> > > > +
> > > > +		Only supported for particular Intel Xe graphics platforms.
> > > > +
> > > > +What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp2_input
> > > > +Date:		April 2025
> > > > +KernelVersion:	6.15
> > > > +Contact:	intel-xe@lists.freedesktop.org
> > > > +Description:	RO. VRAM temperature in millidegree Celsius.
> > > > +
> > > > +		Only supported for particular Intel Xe graphics platforms.
> > > > diff --git a/drivers/gpu/drm/xe/regs/xe_mchbar_regs.h b/drivers/gpu/drm/xe/regs/xe_mchbar_regs.h
> > > > index 519dd1067a19..f5e5234857c1 100644
> > > > --- a/drivers/gpu/drm/xe/regs/xe_mchbar_regs.h
> > > > +++ b/drivers/gpu/drm/xe/regs/xe_mchbar_regs.h
> > > > @@ -34,6 +34,9 @@
> > > >    #define PCU_CR_PACKAGE_ENERGY_STATUS		XE_REG(MCHBAR_MIRROR_BASE_SNB + 0x593c)
> > > > +#define PCU_CR_PACKAGE_TEMPERATURE		XE_REG(MCHBAR_MIRROR_BASE_SNB + 0x5978)
> > > > +#define   TEMP_MASK				REG_GENMASK(7, 0)
> > > > +
> > > >    #define PCU_CR_PACKAGE_RAPL_LIMIT		XE_REG(MCHBAR_MIRROR_BASE_SNB + 0x59a0)
> > > >    #define   PKG_PWR_LIM_1				REG_GENMASK(14, 0)
> > > >    #define   PKG_PWR_LIM_1_EN			REG_BIT(15)
> > > > diff --git a/drivers/gpu/drm/xe/regs/xe_pcode_regs.h b/drivers/gpu/drm/xe/regs/xe_pcode_regs.h
> > > > index 0b0b49d850ae..8846eb9ce2a4 100644
> > > > --- a/drivers/gpu/drm/xe/regs/xe_pcode_regs.h
> > > > +++ b/drivers/gpu/drm/xe/regs/xe_pcode_regs.h
> > > > @@ -21,6 +21,8 @@
> > > >    #define BMG_PACKAGE_POWER_SKU			XE_REG(0x138098)
> > > >    #define BMG_PACKAGE_POWER_SKU_UNIT		XE_REG(0x1380dc)
> > > >    #define BMG_PACKAGE_ENERGY_STATUS		XE_REG(0x138120)
> > > > +#define BMG_VRAM_TEMPERATURE			XE_REG(0x1382c0)
> > > > +#define BMG_PACKAGE_TEMPERATURE			XE_REG(0x138434)
> > > indentation.
> > 
> > It's a git quirk, you won't see it in file.
> > 
> > > Also you are using the same for DG2. Should have a common name
> > 
> > Just following the conventions.
> Did not find this convention in the file.
> BMG_VRAM_TEMPERATURE is used in both dg2 and bmg and has a bmg prefix.
> Doesn't seem right		

That's what we use for pcode registers.

Raag

      parent reply	other threads:[~2025-01-24 12:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08  9:24 [PATCH v1] drm/xe/hwmon: expose package and vram temperature Raag Jadav
2025-01-08  9:32 ` ✓ CI.Patch_applied: success for " Patchwork
2025-01-08  9:32 ` ✓ CI.checkpatch: " Patchwork
2025-01-08  9:34 ` ✓ CI.KUnit: " Patchwork
2025-01-08 10:00 ` ✓ CI.Build: " Patchwork
2025-01-08 10:02 ` ✓ CI.Hooks: " Patchwork
2025-01-08 10:04 ` ✓ CI.checksparse: " Patchwork
2025-01-08 10:30 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-01-10  1:32 ` ✗ Xe.CI.Full: " Patchwork
2025-01-11  1:22 ` [PATCH v1] " Andi Shyti
2025-01-21  8:26 ` Riana Tauro
2025-01-23  2:51   ` Raag Jadav
2025-01-24  6:16     ` Riana Tauro
2025-01-24 11:59       ` Nilawar, Badal
2025-01-24 12:33         ` Raag Jadav
2025-01-24 14:57           ` Nilawar, Badal
2025-01-24 15:20             ` Raag Jadav
2025-01-24 16:07               ` Nilawar, Badal
2025-01-25  7:14                 ` Raag Jadav
2025-01-31  4:25                   ` Poosa, Karthik
2025-01-24 12:50       ` Raag Jadav [this message]

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=Z5OMkeSZT5us_PM-@black.fi.intel.com \
    --to=raag.jadav@intel.com \
    --cc=andi.shyti@linux.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=matthew.d.roper@intel.com \
    --cc=riana.tauro@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 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.