From: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH v3 01/24] drm-uapi/xe_drm: Align with new PMU interface
Date: Fri, 29 Sep 2023 11:31:40 +0530 [thread overview]
Message-ID: <a1869644-f02a-c57d-403f-482d5f5b0605@linux.intel.com> (raw)
In-Reply-To: <ZRRehIfAtg5csw86@intel.com>
On 27/09/23 22:25, Rodrigo Vivi wrote:
> On Tue, Sep 26, 2023 at 05:50:53PM +0100, Tvrtko Ursulin wrote:
>> On 26/09/2023 14:00, Francois Dugast wrote:
>>> From: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>>
>>> Align with commit ("drm/xe/pmu: Enable PMU interface")
>>>
>>> Cc: Francois Dugast <francois.dugast@intel.com>
>>> Cc: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>
>>> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>> ---
>>> include/drm-uapi/xe_drm.h | 38 ++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 38 insertions(+)
>>>
>>> diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h
>>> index 804c02270..643eb6e82 100644
>>> --- a/include/drm-uapi/xe_drm.h
>>> +++ b/include/drm-uapi/xe_drm.h
>>> @@ -1053,6 +1053,44 @@ struct drm_xe_vm_madvise {
>>> __u64 reserved[2];
>>> };
>>> +/**
>>> + * DOC: XE PMU event config IDs
>>> + *
>>> + * Check 'man perf_event_open' to use these ID's in 'struct perf_event_attr'
>>> + * as part of perf_event_open syscall to read a particular event.
>>> + *
>>> + * For example to open the XE_PMU_INTERRUPTS(0):
>>> + *
>>> + * .. code-block:: C
>>> + * struct perf_event_attr attr;
>>> + * long long count;
>>> + * int cpu = 0;
>>> + * int fd;
>>> + *
>>> + * memset(&attr, 0, sizeof(struct perf_event_attr));
>>> + * attr.type = type; // eg: /sys/bus/event_source/devices/xe_0000_56_00.0/type
>>> + * attr.read_format = PERF_FORMAT_TOTAL_TIME_ENABLED;
>>> + * attr.use_clockid = 1;
>>> + * attr.clockid = CLOCK_MONOTONIC;
>>> + * attr.config = XE_PMU_INTERRUPTS(0);
>>> + *
>>> + * fd = syscall(__NR_perf_event_open, &attr, -1, cpu, -1, 0);
>>> + */
>>> +
>>> +/*
>>> + * Top bits of every counter are GT id.
>>> + */
>>> +#define __XE_PMU_GT_SHIFT (56)
>>> +
>>> +#define ___XE_PMU_OTHER(gt, x) \
>>> + (((__u64)(x)) | ((__u64)(gt) << __XE_PMU_GT_SHIFT))
>>> +
>>> +#define XE_PMU_INTERRUPTS(gt) ___XE_PMU_OTHER(gt, 0)
>> AFAIR interrupts is probably the least useful counter and I don't remember
>> that anyone asked much about it. Therefore I'd say it could be worth seeing
>> if you could just drop it. Changes to intel_gpu_top to work with the below
>> set (no per engine, no frequencies) will have to be extensive already
>> anyway.
Ok, will drop the interrupt.
Also, this is just the initial set, per engine will follow but sometime later.
Thanks,
Aravind.
> Aravind, could you please reply to that?
>
>> Regards,
>>
>> Tvrtko
>>
>>> +#define XE_PMU_RENDER_GROUP_BUSY(gt) ___XE_PMU_OTHER(gt, 1)
>>> +#define XE_PMU_COPY_GROUP_BUSY(gt) ___XE_PMU_OTHER(gt, 2)
>>> +#define XE_PMU_MEDIA_GROUP_BUSY(gt) ___XE_PMU_OTHER(gt, 3)
>>> +#define XE_PMU_ANY_ENGINE_GROUP_BUSY(gt) ___XE_PMU_OTHER(gt, 4)
>>> +
>>> #if defined(__cplusplus)
>>> }
>>> #endif
next prev parent reply other threads:[~2023-09-29 5:58 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 13:00 [igt-dev] [PATCH v3 00/24] uAPI Alignment - take 1 v3 Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 01/24] drm-uapi/xe_drm: Align with new PMU interface Francois Dugast
2023-09-26 16:50 ` Tvrtko Ursulin
2023-09-27 16:55 ` Rodrigo Vivi
2023-09-29 6:01 ` Aravind Iddamsetty [this message]
2023-09-27 4:58 ` Aravind Iddamsetty
2023-09-26 13:00 ` [igt-dev] [PATCH v3 02/24] tests/intel/xe_query: Add a test for querying cs cycles Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 03/24] drm-uapi/xe_drm: Separate VM_BIND's operation and flag, align with latest uapi Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 04/24] drm-uapi/xe_drm: Remove MMIO ioctl and " Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 05/24] xe_exec_balancer: Enable parallel submission and compute mode Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 06/24] xe_exec_threads: Use DRM_XE_VM_CREATE_COMPUTE_MODE when creating a compute VM Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 07/24] xe: Update uAPI and remove XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 08/24] drm-uapi/xe: Use common drm_xe_ext_set_property extension Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 09/24] drm-uapi: Kill XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS extension Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 10/24] xe: Update to new VM bind uAPI Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 11/24] drm-uapi/xe: Replace useless 'instance' per unique gt_id Francois Dugast
2023-09-26 16:47 ` Tvrtko Ursulin
2023-09-27 16:53 ` Rodrigo Vivi
2023-09-28 8:19 ` Tvrtko Ursulin
2023-09-26 13:00 ` [igt-dev] [PATCH v3 12/24] drm-uapi/xe: Remove unused field of drm_xe_query_gt Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 13/24] drm-uapi/xe: Rename gts to gt_list Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 14/24] drm-uapi/xe: Fix naming of XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 15/24] drm-uapi/xe: Align with documentation updates Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 16/24] drm-uapi/xe: Align with Crystal Reference Clock updates Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 17/24] drm-uapi/xe: Align with extension of drm_xe_vm_bind_op Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 18/24] drm-uapi/xe: Align with uAPI to query micro-controler firmware version Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 19/24] drm-uapi/xe: Align with DRM_XE_DEVICE_QUERY_HWCONFIG documentation Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 20/24] drm-uapi/xe: Align with uAPI to pad to drm_xe_engine_class_instance Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 21/24] drm-uapi/xe: Align with uAPI update query HuC micro-controler firmware version Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 22/24] drm-uapi/xe: Align with uAPI update for query config num_params Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 23/24] drm-uapi/xe: Align with uAPI update to add DRM_ prefix in uAPI constants Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 24/24] drm-uapi/xe: Align with uAPI update to add _FLAG to constants usable for flags Francois Dugast
2023-09-26 15:03 ` [igt-dev] ✓ Fi.CI.BAT: success for uAPI Alignment - take 1 (rev2) Patchwork
2023-09-26 15:14 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-09-27 2:20 ` [igt-dev] ✗ Fi.CI.IGT: 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=a1869644-f02a-c57d-403f-482d5f5b0605@linux.intel.com \
--to=aravind.iddamsetty@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.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