Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Iddamsetty, Aravind" <aravind.iddamsetty@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: Bommu Krishnaiah <krishnaiah.bommu@intel.com>,
	intel-xe@lists.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [Intel-xe] [PATCH v3 2/2] drm/xe/pmu: Enable PMU interface
Date: Wed, 9 Aug 2023 17:09:58 +0530	[thread overview]
Message-ID: <714a0c1f-cf09-b102-045e-ef6ffbc29d66@intel.com> (raw)
In-Reply-To: <b557820a-39b8-edc7-844d-900c3a9eb7df@intel.com>



On 09-08-2023 13:16, Iddamsetty, Aravind wrote:
> 
> 
> On 09-08-2023 12:58, Dixit, Ashutosh wrote:
> 
> Hi Ashutosh,
> 
>> On Tue, 08 Aug 2023 04:54:36 -0700, Aravind Iddamsetty wrote:
>>>
>>
>> Hi Aravind,
>>
>> Spotted a few remaining things. See if it's possible to fix these up and
>> send another version.
>>
>>> diff --git a/drivers/gpu/drm/xe/xe_pmu.c b/drivers/gpu/drm/xe/xe_pmu.c
>>> new file mode 100644
>>> index 000000000000..9637f8283641
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/xe/xe_pmu.c
>>> @@ -0,0 +1,673 @@
>>> +// SPDX-License-Identifier: MIT
>>> +/*
>>> + * Copyright © 2023 Intel Corporation
>>> + */
>>> +

<snip>
>>> diff --git a/drivers/gpu/drm/xe/xe_pmu_types.h b/drivers/gpu/drm/xe/xe_pmu_types.h
>>> new file mode 100644
>>> index 000000000000..a950c892e364
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/xe/xe_pmu_types.h
>>> @@ -0,0 +1,76 @@
>>> +/* SPDX-License-Identifier: MIT */
>>> +/*
>>> + * Copyright © 2023 Intel Corporation
>>> + */
>>> +
>>> +#ifndef _XE_PMU_TYPES_H_
>>> +#define _XE_PMU_TYPES_H_
>>> +
>>> +#include <linux/perf_event.h>
>>> +#include <linux/spinlock_types.h>
>>> +#include <uapi/drm/xe_drm.h>
>>> +
>>> +enum {
>>> +	__XE_SAMPLE_RENDER_GROUP_BUSY,
>>> +	__XE_SAMPLE_COPY_GROUP_BUSY,
>>> +	__XE_SAMPLE_MEDIA_GROUP_BUSY,
>>> +	__XE_SAMPLE_ANY_ENGINE_GROUP_BUSY,
>>> +	__XE_NUM_PMU_SAMPLERS
>>> +};
>>> +
>>> +#define XE_MAX_GT_PER_TILE 2
>>> +
>>> +struct xe_pmu {
>>> +	/**
>>> +	 * @cpuhp: Struct used for CPU hotplug handling.
>>> +	 */
>>> +	struct {
>>> +		struct hlist_node node;
>>> +		unsigned int cpu;
>>> +	} cpuhp;
>>> +	/**
>>> +	 * @base: PMU base.
>>> +	 */
>>> +	struct pmu base;
>>> +	/**
>>> +	 * @closed: xe is unregistering.
>>> +	 */
>>> +	bool closed;
>>> +	/**
>>> +	 * @name: Name as registered with perf core.
>>> +	 */
>>> +	const char *name;
>>> +	/**
>>> +	 * @lock: Lock protecting enable mask and ref count handling.
>>> +	 */
>>> +	spinlock_t lock;
>>> +	/**
>>> +	 * @sample: Current and previous (raw) counters.
>>> +	 *
>>> +	 * These counters are updated when the device is awake.
>>> +	 *
>>> +	 */
>>> +	u64 sample[XE_MAX_GT_PER_TILE][__XE_NUM_PMU_SAMPLERS];
>>
>> s/XE_MAX_GT_PER_TILE/XE_MAX_GT/ since the PMU is for the entire device not
>> per tile, as I mentioned earlier.
> 
> right, so for a device this shall be sample[XE_MAX_TILES_PER_DEVICE *
> XE_MAX_GT_PER_TILE][__XE_NUM_PMU_SAMPLERS]

on further checking based on (d714e2b698d8 drm/xe: Introduce xe_tile)
the XE_MAX_TILES_PER_DEVICE is being considered as MAX_GT as well so
will use similar to that here.

Thanks,
Aravind.
> 
> Thanks,
> Aravind.
> 
>>
>> Thanks.
>> --
>> Ashutosh

  reply	other threads:[~2023-08-09 11:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 11:54 [Intel-xe] [PATCH v3 0/2] drm/xe/pmu: Enable PMU interface Aravind Iddamsetty
2023-08-08 11:54 ` [Intel-xe] [PATCH v3 1/2] drm/xe: Get GT clock to nanosecs Aravind Iddamsetty
2023-08-09  5:08   ` Dixit, Ashutosh
2023-08-09 11:07     ` Iddamsetty, Aravind
2023-08-08 11:54 ` [Intel-xe] [PATCH v3 2/2] drm/xe/pmu: Enable PMU interface Aravind Iddamsetty
2023-08-09  7:28   ` Dixit, Ashutosh
2023-08-09  7:46     ` Iddamsetty, Aravind
2023-08-09 11:39       ` Iddamsetty, Aravind [this message]
2023-08-10  2:17         ` Dixit, Ashutosh
2023-08-10  2:06       ` Dixit, Ashutosh
2023-08-09  9:55     ` Iddamsetty, Aravind
2023-08-09 11:57       ` Iddamsetty, Aravind
2023-08-09 13:11         ` Iddamsetty, Aravind
2023-08-10  2:40           ` Dixit, Ashutosh
2023-08-10  8:10             ` Iddamsetty, Aravind
2023-08-10 21:55               ` Rodrigo Vivi
2023-08-11  3:38                 ` Dixit, Ashutosh
2023-08-11  6:17                   ` Iddamsetty, Aravind
2023-08-11 19:17                     ` Dixit, Ashutosh
2023-08-14  2:02                       ` Dixit, Ashutosh
2023-08-14  4:19                         ` Iddamsetty, Aravind
2023-08-08 12:08 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/pmu: Enable PMU interface (rev3) Patchwork
2023-08-08 12:09 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-08 12:10 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-08 12:14 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-08 12:14 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-08 12:14 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-08-08 12:51 ` [Intel-xe] ✗ CI.BAT: 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=714a0c1f-cf09-b102-045e-ef6ffbc29d66@intel.com \
    --to=aravind.iddamsetty@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=krishnaiah.bommu@intel.com \
    --cc=tvrtko.ursulin@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