[PATCH 1/4] Utility function and macro for telemetry reading
Jani Nikula
jani.nikula at linux.intel.com
Wed May 14 17:18:27 UTC 2025
On Wed, 14 May 2025, "Poosa, Karthik" <karthik.poosa at intel.com> wrote:
> On 14-05-2025 14:57, Jani Nikula wrote:
>> On Wed, 14 May 2025, Soham Purkait <soham.purkait at intel.com> wrote:
>>> The changes in this patch is taken from
>>> https://patchwork.freedesktop.org/series/148926/
>>> Thay are added only for compilation and does not
>>> require review.
>>> ---
>>> drivers/gpu/drm/xe/regs/xe_pmt.h | 5 +++++
>>> drivers/gpu/drm/xe/xe_vsec.c | 2 +-
>>> drivers/gpu/drm/xe/xe_vsec.h | 5 +++++
>>> 3 files changed, 11 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/regs/xe_pmt.h b/drivers/gpu/drm/xe/regs/xe_pmt.h
>>> index f45abcd96ba8..b1d4504e4adc 100644
>>> --- a/drivers/gpu/drm/xe/regs/xe_pmt.h
>>> +++ b/drivers/gpu/drm/xe/regs/xe_pmt.h
>>> @@ -10,6 +10,11 @@
>>> #define BMG_PMT_BASE_OFFSET 0xDB000
>>> #define BMG_DISCOVERY_OFFSET (SOC_BASE + BMG_PMT_BASE_OFFSET)
>>>
>>> +#define PUNIT_TELEMETRY_GUID XE_REG(BMG_DISCOVERY_OFFSET + 0x4)
>>> +#define BMG_ENERGY_STATUS_PMT_OFFSET (0x30)
>>> +#define ENERGY_PKG REG_GENMASK64(31, 0)
>>> +#define ENERGY_CARD REG_GENMASK64(63, 32)
>>> +
>>> #define BMG_TELEMETRY_BASE_OFFSET 0xE0000
>>> #define BMG_TELEMETRY_OFFSET (SOC_BASE + BMG_TELEMETRY_BASE_OFFSET)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c
>>> index b378848d3b7b..a46e9580b1f4 100644
>>> --- a/drivers/gpu/drm/xe/xe_vsec.c
>>> +++ b/drivers/gpu/drm/xe/xe_vsec.c
>>> @@ -149,7 +149,7 @@ static int xe_guid_decode(u32 guid, int *index, u32 *offset)
>>> return 0;
>>> }
>>>
>>> -static int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>>> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>>> u32 count)
>>> {
>>> struct xe_device *xe = pdev_to_xe_device(pdev);
>>> diff --git a/drivers/gpu/drm/xe/xe_vsec.h b/drivers/gpu/drm/xe/xe_vsec.h
>>> index 5777c53faec2..6184b875e4b1 100644
>>> --- a/drivers/gpu/drm/xe/xe_vsec.h
>>> +++ b/drivers/gpu/drm/xe/xe_vsec.h
>>> @@ -4,8 +4,13 @@
>>> #ifndef _XE_VSEC_H_
>>> #define _XE_VSEC_H_
>>>
>>> +#include "linux/types.h"
>>> +#include "linux/pci.h"
>>> +
>> Please address the reviews [1].
>>
>> BR,
>> Jani.
>
> These are addressed here Jani,
>
> https://patchwork.freedesktop.org/patch/653146/?series=148926&rev=2
Please sort this out between you and Soham. This is clearly conflicting
stuff, sent *after* the above.
BR,
Jani.
>>
>>
>> [1] https://lore.kernel.org/r/87ikmcvfzd.fsf@intel.com
>>
>>
>>
>>> struct xe_device;
>>>
>>> void xe_vsec_init(struct xe_device *xe);
>>> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>>> + u32 count);
>>>
>>> #endif
--
Jani Nikula, Intel
More information about the Intel-xe
mailing list