drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
Subsystems (3)
PATCH 1/1 drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
From: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks I915_PMU_LAST as deprecated and stops the internal implementation using it for sizing the event status bitmask and array.
New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
--- drivers/gpu/drm/i915/i915_pmu.c | 64 +++++++++++++++++++++++++++------ drivers/gpu/drm/i915/i915_pmu.h | 35 ++++++++++++------ include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 78 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +53 -11
@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;
@@ -57,12 +55,39 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int is_tracked_config (const u64 config) { -if (is_engine_config (config)) +unsigned int val; + +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +return 0 ; + } + +return val +1 ; +} + +static unsigned int config_enabled_bit (const u64 config) +{ +if (is_engine_config (config)) {return engine_config_sample (config); -else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); + }else { +unsigned int bit =is_tracked_config (config); + +if (bit) +return I915_ENGINE_SAMPLE_COUNT + bit -1 ; +else +return -1 ; + } }static u64 config_enabled_mask (u64 config)
@@ -80,10 +105,15 @@ static unsigned int event_enabled_bit(struct perf_event *event)return config_enabled_bit (event->attr.config); } +static bool event_read_needs_wakeref (const struct perf_event *event) +{ +return event->attr.config ==I915_PMU_RC6_RESIDENCY ; +} +static bool pmu_needs_timer (struct i915_pmu *pmu,bool gpu_active) {struct drm_i915_private *i915 =container_of (pmu,typeof (*i915), pmu); -u64 enable; +u32 enable;/* * Only some counters need the sampling timer.
@@ -627,12 +657,19 @@ static void i915_pmu_enable(struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +bool need_wakeref =event_read_needs_wakeref (event);struct i915_pmu *pmu = &i915->pmu; -intel_wakeref_t wakeref; +intel_wakeref_t wakeref =0 ;unsigned long flags; +unsigned int bit; + +if (need_wakeref) + wakeref =intel_runtime_pm_get (&i915->runtime_pm); + + bit =event_enabled_bit (event); +if (bit ==-1 ) + goto update; - wakeref =intel_runtime_pm_get (&i915->runtime_pm);spin_lock_irqsave (&pmu->lock, flags);/*
@@ -684,6 +721,7 @@ static void i915_pmu_enable(struct perf_event *event)spin_unlock_irqrestore (&pmu->lock, flags); +update:/* * Store the current counter value so we can report the correct delta * for all listeners. Even when the event was already enabled and has
@@ -691,7 +729,8 @@ static void i915_pmu_enable(struct perf_event *event)*/ local64_set (&event->hw.prev_count,__i915_pmu_event_read (event)); -intel_runtime_pm_put (&i915->runtime_pm, wakeref); +if (wakeref) +intel_runtime_pm_put (&i915->runtime_pm, wakeref); }static void i915_pmu_disable (struct perf_event *event)
@@ -702,6 +741,9 @@ static void i915_pmu_disable(struct perf_event *event)struct i915_pmu *pmu = &i915->pmu;unsigned long flags; +if (bit ==-1 ) +return ; +spin_lock_irqsave (&pmu->lock, flags);if (is_engine_event (event)) {
drivers/gpu/drm/i915/i915_pmu.h +24 -11
@@ -14,6 +14,21 @@struct drm_i915_private ; +/** +* Non-engine events that we need to track enabled-disabled transition and +* current state. +*/ +enum i915_pmu_tracked_events { + __I915_PMU_ACTUAL_FREQUENCY_ENABLED =0 , + __I915_PMU_REQUESTED_FREQUENCY_ENABLED, + __I915_PMU_RC6_RESIDENCY_ENABLED, + __I915_PMU_TRACKED_EVENT_COUNT,/* count marker */ +}; + +/** +* Slots used from the sampling timer (non-engine events) with some extras for +* convenience. +*/ enum { __I915_SAMPLE_FREQ_ACT =0 , __I915_SAMPLE_FREQ_REQ,
@@ -28,8 +43,7 @@ enum {* It is also used to know to needed number of event reference counters. */ #define I915_PMU_MASK_BITS \ - ((1 << I915_PMU_SAMPLE_BITS) + \ - (I915_PMU_LAST + 1 - __I915_PMU_OTHER(0))) + (I915_ENGINE_SAMPLE_COUNT + __I915_PMU_TRACKED_EVENT_COUNT)#define I915_ENGINE_SAMPLE_COUNT (I915_SAMPLE_SEMA + 1)
@@ -66,18 +80,17 @@ struct i915_pmu {*/ struct hrtimer timer;/** -* @enable: Bitmask of all currently enabled events. +* @enable: Bitmask of specific enabled events. +* +* For some events we need to track their state and do some internal +* house keeping. * -* Bits are derived from uAPI event numbers in a way that low 16 bits -* correspond to engine event _sample_ _type_ (I915_SAMPLE_QUEUED is -* bit 0), and higher bits correspond to other events (for instance -* I915_PMU_ACTUAL_FREQUENCY is bit 16 etc). +* Each engine event sampler type and event listed in enum +* i915_pmu_tracked_events gets a bit in this field. * -* In other words, low 16 bits are not per engine but per engine -* sampler type, while the upper bits are directly mapped to other -* event types. +* Low bits are engine samplers and other events continue from there. */ -u64 enable; +u32 enable;/** * @timer_last:
include/uapi/drm/i915_drm.h +1 -1
@@ -178,7 +178,7 @@ enum drm_i915_pmu_engine_sample {#define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2)#define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3) -#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY +#define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCY/* Each region is a minimum of 16k, and there are at most 255 of them. */
Signature · 6 lines
2.25.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2020-11-26 16:47:03)
drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config)
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +6
-2-static unsigned int config_enabled_bit (u64 config) +static unsigned int is_tracked_config (const u64 config) { -if (is_engine_config (config)) +unsigned int val; +/** +* Non-engine events that we need to track enabled-disabled transition and +* current state. +*/
I'm not understanding what is_tracked_config() actually means and how that becomes config_enabled_bit().
These look like the non-engine ones where we interact with HW during the sample.
How do the events we define a bit for here differ from the "untracked" events?
Quoted 23 lines
drivers/gpu/drm/i915/i915_pmu.c +21
-1+ +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +return 0 ; + } + +return val +1 ; +} + +static unsigned int config_enabled_bit (const u64 config) +{ +if (is_engine_config (config)) {return engine_config_sample (config); - else
drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config) · line 91
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +8
-1-return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); + }else { +unsigned int bit =is_tracked_config (config); + +if (bit) +return I915_ENGINE_SAMPLE_COUNT + bit -1 ; +else +return -1 ; + } }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Chris Wilson
Quoting Tvrtko Ursulin (2020-11-26 16:47:03)
drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config)
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +6
-2-static unsigned int config_enabled_bit (u64 config) +static unsigned int is_tracked_config (const u64 config) { -if (is_engine_config (config)) +unsigned int val; +/** +* Non-engine events that we need to track enabled-disabled transition and +* current state. +*/
Quoted 8 lines
I'm not understanding what
is_tracked_config()actually means and how that becomesconfig_enabled_bit().These look like the non-engine ones where we interact with HW during the sample.
How do the events we define a bit for here differ from the "untracked" events?
Tracked means i915 pmu needs to track enabled/disabled transitions and state.
So far frequency and rc6 needs that, due sampling timer decisions and park/unpark handling respectively.
Interrupts on the contrary don't need to do any of that. We can just read the count at any given time.
Is_tracked_config() for convenience returns a "bit + 1", so 0 means untracked.
Every tracked event needs a slot in pmu->enabled and pmu->enable_count. The rest don't. Before this patch I had too many bits/array elements reserved there.
Old state in terms of bit/slot allocation was:
0 - 15 engine samplers. (Only 3 used, 12 wasted bits/counts).
16 - 63 other counters. (Interrupts was using a slot for no purpose.)
New state:
0 - 2 engine samplers.
3 - 31 other counters. (Only 3 used so far, interrupts has no slot.)
It was a handy 1:1 mapping between non-engine events and bits/slots. Apart from wasting bits/slots, if I want to partition the u64 config space a bit more then 1:1 becomes a problem.
Note that engine bits/counts in top-level struct pmu are for all/any engine - just because a sampling timer decision is easy like that. (Set bit for any engine having an active sampler of a type, and respective enable_count incremented by each engine instance.)
Regards,
Tvrtko
Quoted 25 lines
Quoted 25 lines
drivers/gpu/drm/i915/i915_pmu.c +22
-2+ +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +return 0 ; + } + +return val +1 ; +} + +static unsigned int config_enabled_bit (const u64 config) +{ +if (is_engine_config (config)) {return engine_config_sample (config); - else - return ENGINE_SAMPLE_BITS + (config - __I915_PMU_OTHER(0)); + }else {
Quoted 8 lines
drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config) · line 91
Quoted 8 lines
drivers/gpu/drm/i915/i915_pmu.c +7
-0+unsigned int bit =is_tracked_config (config); + +if (bit) +return I915_ENGINE_SAMPLE_COUNT + bit -1 ; +else +return -1 ; + } }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2020-11-26 18:58:20)
Quoted 32 lines · Chris Wilson
Quoted 12 lines
Quoting Tvrtko Ursulin (2020-11-26 16:47:03)
drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config)
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +6
-2-static unsigned int config_enabled_bit (u64 config) +static unsigned int is_tracked_config (const u64 config) { -if (is_engine_config (config)) +unsigned int val; +/** +* Non-engine events that we need to track enabled-disabled transition and +* current state. +*/ Quoted 8 lines
I'm not understanding what
is_tracked_config()actually means and how that becomesconfig_enabled_bit().These look like the non-engine ones where we interact with HW during the sample.
How do the events we define a bit for here differ from the "untracked" events?
Tracked means i915 pmu needs to track enabled/disabled transitions and state.
So far frequency and rc6 needs that, due sampling timer decisions and park/unpark handling respectively.
Interrupts on the contrary don't need to do any of that. We can just read the count at any given time.
Quoted 6 lines
Is_tracked_config()for convenience returns a "bit + 1", so 0 means untracked.Every tracked event needs a slot in
pmu->enabledandpmu->enable_count. The rest don't. Before this patch I had too many bits/array elements reserved there.
So my confusion boils down to 'enabled' in config_enabled_bit. To me that makes it seem like it is a state, as opposed to the bit to be used to track that state. (I feel enabled <-> tracked is quite clunky.)
config_enable_bit() is better, but I think you can just drop the 'enabled' altogether to leave
static unsigned int config_bit(u64 config)
{
if (is_engine_config(config))
return engine_config_bit(config);
if (is_tracked_config(config))
return tracked_config_bit(config);
return -1;
}static u64 config_mask(u64 config)
{
return BIT_ULL(config_bit(config));
}static unsigned int event_bit(struct perf_event *event)
{
return config_bit(event->attr.config);
}unsigned int bit = event_bit(event);
Or if that is too much,
config_sample_bit()
config_sample_mask()
event_sample_bit()
?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
URL : https://patchwork.freedesktop.org/series/84305/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9395 -> Patchwork_18991
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/index.html
New tests
---------
New tests have been introduced between CI_DRM_9395 and Patchwork_18991:
### New CI tests (1) ###
* boot:
- Statuses : 39 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_18991 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@module-reload:
- fi-kbl-guc: [PASS][1] -> [FAIL][2] ([i915#579])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-kbl-guc/igt@[email protected]
- fi-kbl-7500u: [PASS][3] -> [DMESG-WARN][4] ([i915#203])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-kbl-7500u/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-u2: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-tgl-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-tgl-u2/igt@[email protected]
- fi-icl-u2: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-icl-u2/igt@[email protected]
- fi-bsw-kefka: [PASS][9] -> [DMESG-WARN][10] ([i915#1982])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-bsw-kefka/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-bsw-kefka/igt@[email protected]
* igt@vgem_basic@unload:
- fi-apl-guc: [PASS][11] -> [INCOMPLETE][12] ([i915#337])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-apl-guc/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-apl-guc/igt@[email protected]
#### Possible fixes ####
* igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-tgl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-tgl-u2/igt@[email protected]
- fi-kbl-7500u: [DMESG-WARN][15] -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-7500u/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-kbl-7500u/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: [DMESG-WARN][17] ([i915#1982]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-bsw-kefka/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-bsw-kefka/igt@[email protected]
* igt@i915_selftest@live@gt_pm:
- {fi-kbl-7560u}: [DMESG-FAIL][19] ([i915#2524]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-7560u/igt@i915_selftest@live@gt_pm.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-kbl-7560u/igt@i915_selftest@live@gt_pm.html
* igt@kms_busy@basic@flip:
- fi-kbl-soraka: [DMESG-WARN][21] ([i915#1982]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-soraka/igt@kms_busy@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-kbl-soraka/igt@kms_busy@[email protected]
* igt@kms_chamelium@hdmi-edid-read:
- fi-kbl-7500u: [DMESG-FAIL][23] ([i915#165]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-kbl-7500u/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-kbl-7500u/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-byt-j1900: [DMESG-WARN][25] ([i915#1982]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-byt-j1900/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-byt-j1900/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: [DMESG-WARN][27] ([i915#1982]) -> [PASS][28] +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/fi-icl-u2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/fi-icl-u2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#203]: https://gitlab.freedesktop.org/drm/intel/issues/203
[i915#2524]: https://gitlab.freedesktop.org/drm/intel/issues/2524
[i915#337]: https://gitlab.freedesktop.org/drm/intel/issues/337
[i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579
Participating hosts (44 -> 39)
------------------------------
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-tgl-y fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9395 -> Patchwork_18991
CI-20190529: 20190529
CI_DRM_9395: 83729b962cacdce11fe05033ad2493da61536ebf @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5871: ff519fd84618558c550bec07e7cc4b2c682f86ff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18991: 89bd4147fe2e4c9fd564c18fe44fcb8b7b6d7c5d @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
89bd4147fe2e drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
URL : https://patchwork.freedesktop.org/series/84305/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9395_full -> Patchwork_18991_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_18991_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_18991_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_18991_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_whisper@basic-fds-priority-all:
- shard-iclb: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-iclb6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-iclb1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@b-hdmi-a1:
- shard-hsw: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-hsw4/igt@kms_flip@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-hsw4/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@c-edp1:
- shard-skl: [PASS][5] -> [INCOMPLETE][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl2/igt@kms_flip@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl10/igt@kms_flip@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_9395_full and Patchwork_18991_full:
### New CI tests (1) ###
* boot:
- Statuses : 200 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_18991_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@preservation-s3@vcs0:
- shard-skl: [PASS][7] -> [INCOMPLETE][8] ([i915#198]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl10/igt@gem_ctx_isolation@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl6/igt@gem_ctx_isolation@[email protected]
* igt@gem_workarounds@suspend-resume-fd:
- shard-apl: [PASS][9] -> [INCOMPLETE][10] ([i915#2405])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-apl1/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-apl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-64x21-offscreen:
- shard-skl: [PASS][11] -> [FAIL][12] ([i915#54]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl1/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [PASS][13] -> [FAIL][14] ([i915#72])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk8/igt@[email protected]
* igt@kms_cursor_legacy@cursor-vs-flip-legacy:
- shard-skl: [PASS][15] -> [DMESG-WARN][16] ([i915#1982]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl6/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-skl: [PASS][17] -> [FAIL][18] ([i915#2346])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl5/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
* igt@kms_cursor_legacy@flip-vs-cursor-crc-legacy:
- shard-tglb: [PASS][19] -> [FAIL][20] ([i915#2346])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-tglb7/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-tglb3/igt@[email protected]
* igt@kms_cursor_legacy@short-flip-before-cursor-atomic-transitions:
- shard-kbl: [PASS][21] -> [DMESG-WARN][22] ([i915#1982])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-kbl2/igt@kms_cursor_legacy@short-flip-before-cursor-atomic-transitions.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-kbl6/igt@kms_cursor_legacy@short-flip-before-cursor-atomic-transitions.html
* igt@kms_draw_crc@draw-method-rgb565-pwrite-ytiled:
- shard-glk: [PASS][23] -> [DMESG-WARN][24] ([i915#1982]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk5/igt@[email protected]
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][25] -> [FAIL][26] ([i915#79])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk1/igt@kms_flip@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk7/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
- shard-skl: [PASS][27] -> [FAIL][28] ([i915#49]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl6/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-mmap-wc:
- shard-tglb: [PASS][29] -> [DMESG-WARN][30] ([i915#1982]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-tglb7/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-tglb3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [PASS][31] -> [FAIL][32] ([fdo#108145] / [i915#265]) +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl4/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl6/igt@[email protected]
* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109441]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-iclb8/igt@kms_psr@psr2_cursor_mmap_cpu.html
* igt@perf@polling-parameterized:
- shard-skl: [PASS][35] -> [FAIL][36] ([i915#1542])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl6/igt@[email protected]
#### Possible fixes ####
* igt@feature_discovery@psr2:
- shard-iclb: [SKIP][37] ([i915#658]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-iclb4/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-iclb2/igt@[email protected]
* igt@gem_exec_whisper@basic-contexts-forked:
- shard-glk: [DMESG-WARN][39] ([i915#118] / [i915#95]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk8/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk1/igt@[email protected]
* igt@gem_softpin@noreloc-s3:
- shard-skl: [INCOMPLETE][41] ([i915#198] / [i915#2405]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl3/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl8/igt@[email protected]
* igt@i915_module_load@reload:
- shard-skl: [DMESG-WARN][43] ([i915#1982]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl4/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl8/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-128x128-offscreen:
- shard-skl: [FAIL][45] ([i915#54]) -> [PASS][46] +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl9/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl5/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-b-256x256-left-edge:
- shard-glk: [DMESG-WARN][47] ([i915#1982]) -> [PASS][48] +2 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk2/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- shard-kbl: [DMESG-WARN][49] ([i915#1982]) -> [PASS][50] +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-kbl3/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-kbl1/igt@[email protected]
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][51] ([i915#2122]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk1/igt@kms_flip@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk7/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-expired-vblank@a-hdmi-a1:
- shard-glk: [FAIL][53] ([i915#79]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk4/igt@kms_flip@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk4/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-badstride:
- shard-apl: [DMESG-WARN][55] ([i915#1982]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-apl4/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-apl2/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-move:
- shard-iclb: [DMESG-WARN][57] ([i915#1982]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-iclb7/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-iclb8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [FAIL][59] ([fdo#108145] / [i915#265]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl8/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl9/igt@[email protected]
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][61] ([fdo#109441]) -> [PASS][62] +1 similar issue
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-iclb4/igt@kms_psr@psr2_primary_page_flip.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
* igt@kms_universal_plane@disable-primary-vs-flip-pipe-c:
- shard-tglb: [DMESG-WARN][63] ([i915#1982]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-tglb1/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-tglb6/igt@[email protected]
* igt@prime_vgem@sync@rcs0:
- shard-snb: [INCOMPLETE][65] -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-snb6/igt@prime_vgem@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-snb4/igt@prime_vgem@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: [WARN][67] ([i915#2681] / [i915#2684]) -> [WARN][68] ([i915#1804] / [i915#2684])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-iclb1/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-iclb4/igt@[email protected]
* igt@kms_color@pipe-c-ctm-0-5:
- shard-skl: [DMESG-WARN][69] ([i915#1982]) -> [DMESG-FAIL][70] ([i915#1982])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl5/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl3/igt@[email protected]
* igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
- shard-tglb: [INCOMPLETE][71] ([i915#1436] / [i915#1602] / [i915#1887] / [i915#2411] / [i915#456]) -> [DMESG-WARN][72] ([i915#1436] / [i915#1602] / [i915#1887] / [i915#2411])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-tglb6/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-tglb2/igt@[email protected]
* igt@runner@aborted:
- shard-kbl: [FAIL][73] ([i915#2295]) -> ([FAIL][74], [FAIL][75]) ([i915#1814] / [i915#2295] / [i915#483] / [i915#602])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-kbl7/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-kbl2/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-kbl3/igt@[email protected]
- shard-glk: ([FAIL][76], [FAIL][77], [FAIL][78]) ([i915#1814] / [i915#2295] / [i915#483] / [k.org#202321]) -> ([FAIL][79], [FAIL][80]) ([i915#1814] / [i915#2295] / [k.org#202321])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk7/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk8/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-glk4/igt@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk8/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-glk4/igt@[email protected]
- shard-skl: ([FAIL][81], [FAIL][82]) ([i915#1436] / [i915#2295]) -> [FAIL][83] ([i915#2295] / [i915#483])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl4/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9395/shard-skl8/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/shard-skl7/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
[i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#1887]: https://gitlab.freedesktop.org/drm/intel/issues/1887
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2597]: https://gitlab.freedesktop.org/drm/intel/issues/2597
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#483]: https://gitlab.freedesktop.org/drm/intel/issues/483
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#602]: https://gitlab.freedesktop.org/drm/intel/issues/602
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321
Participating hosts (10 -> 9)
------------------------------
Missing (1): pig-glk-j5005
Build changes
-------------
* Linux: CI_DRM_9395 -> Patchwork_18991
CI-20190529: 20190529
CI_DRM_9395: 83729b962cacdce11fe05033ad2493da61536ebf @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5871: ff519fd84618558c550bec07e7cc4b2c682f86ff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18991: 89bd4147fe2e4c9fd564c18fe44fcb8b7b6d7c5d @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18991/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
In reply to Tvrtko UrsulinFrom: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks I915_PMU_LAST as deprecated and stops the internal implementation using it for sizing the event status bitmask and array.
New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
v2:
* Streamline helper names. (Chris)
--- drivers/gpu/drm/i915/i915_pmu.c | 80 ++++++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_pmu.h | 35 ++++++++++----- include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 83 insertions(+), 34 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +58 -22
@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;
@@ -57,17 +55,38 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int other_bit (const u64 config) +{ +unsigned int val; + +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +return -1 ; + } + +return I915_ENGINE_SAMPLE_COUNT + val; +} + +static unsigned int config_bit (const u64 config) {if (is_engine_config (config))return engine_config_sample (config);else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); +return other_bit (config); } -static u64 config_enabled_mask (u64 config) +static u64 config_mask (u64 config) { -return BIT_ULL (config_enabled_bit (config)); +return BIT_ULL (config_bit (config)); }static bool is_engine_event (struct perf_event *event)
@@ -75,15 +94,20 @@ static bool is_engine_event(struct perf_event *event)return is_engine_config (event->attr.config); } -static unsigned int event_enabled_bit (struct perf_event *event) +static unsigned int event_bit (struct perf_event *event) { -return config_enabled_bit (event->attr.config); +return config_bit (event->attr.config); +} + +static bool event_read_needs_wakeref (const struct perf_event *event) +{ +return event->attr.config ==I915_PMU_RC6_RESIDENCY ; }static bool pmu_needs_timer (struct i915_pmu *pmu,bool gpu_active) {struct drm_i915_private *i915 =container_of (pmu,typeof (*i915), pmu); -u64 enable; +u32 enable;/* * Only some counters need the sampling timer.
@@ -96,8 +120,8 @@ static bool pmu_needs_timer(struct i915_pmu *pmu, bool gpu_active)* Mask out all the ones which do not need the timer, or in * other words keep all the ones that could need the timer. */ - enable &=config_enabled_mask (I915_PMU_ACTUAL_FREQUENCY ) | -config_enabled_mask (I915_PMU_REQUESTED_FREQUENCY ) | + enable &=config_mask (I915_PMU_ACTUAL_FREQUENCY ) | +config_mask (I915_PMU_REQUESTED_FREQUENCY ) |ENGINE_SAMPLE_MASK ;/*
@@ -189,7 +213,7 @@ static void park_rc6(struct drm_i915_private *i915) {struct i915_pmu *pmu = &i915->pmu; -if (pmu->enable &config_enabled_mask (I915_PMU_RC6_RESIDENCY )) +if (pmu->enable &config_mask (I915_PMU_RC6_RESIDENCY )) pmu->sample[__I915_SAMPLE_RC6].cur =__get_rc6 (&i915->gt); pmu->sleep_last =ktime_get ();
@@ -344,8 +368,8 @@ add_sample_mult(struct i915_pmu_sample *sample, u32 val, u32 mul)static bool frequency_sampling_enabled (struct i915_pmu *pmu) {return pmu->enable & - (config_enabled_mask (I915_PMU_ACTUAL_FREQUENCY ) | -config_enabled_mask (I915_PMU_REQUESTED_FREQUENCY )); + (config_mask (I915_PMU_ACTUAL_FREQUENCY ) | +config_mask (I915_PMU_REQUESTED_FREQUENCY )); } static void
@@ -363,7 +387,7 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns)if (!intel_gt_pm_get_if_awake (gt))return ; -if (pmu->enable &config_enabled_mask (I915_PMU_ACTUAL_FREQUENCY )) { +if (pmu->enable &config_mask (I915_PMU_ACTUAL_FREQUENCY )) {u32 val;/*
@@ -385,7 +409,7 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns) intel_gpu_freq(rps, val), period_ns / 1000); } -if (pmu->enable &config_enabled_mask (I915_PMU_REQUESTED_FREQUENCY )) { +if (pmu->enable &config_mask (I915_PMU_REQUESTED_FREQUENCY )) {add_sample_mult (&pmu->sample[__I915_SAMPLE_FREQ_REQ],intel_gpu_freq (rps, rps->cur_freq), period_ns /1000 );
@@ -627,12 +651,19 @@ static void i915_pmu_enable(struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +bool need_wakeref =event_read_needs_wakeref (event);struct i915_pmu *pmu = &i915->pmu; -intel_wakeref_t wakeref; +intel_wakeref_t wakeref =0 ;unsigned long flags; +unsigned int bit; + +if (need_wakeref) + wakeref =intel_runtime_pm_get (&i915->runtime_pm); + + bit =event_bit (event); +if (bit ==-1 ) + goto update; - wakeref =intel_runtime_pm_get (&i915->runtime_pm);spin_lock_irqsave (&pmu->lock, flags);/*
@@ -644,7 +675,7 @@ static void i915_pmu_enable(struct perf_event *event)GEM_BUG_ON (pmu->enable_count[bit] == ~0 );if (pmu->enable_count[bit] ==0 && -config_enabled_mask (I915_PMU_RC6_RESIDENCY ) &BIT_ULL (bit)) { +config_mask (I915_PMU_RC6_RESIDENCY ) &BIT_ULL (bit)) { pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur =0 ; pmu->sample[__I915_SAMPLE_RC6].cur =__get_rc6 (&i915->gt); pmu->sleep_last =ktime_get ();
@@ -684,6 +715,7 @@ static void i915_pmu_enable(struct perf_event *event)spin_unlock_irqrestore (&pmu->lock, flags); +update:/* * Store the current counter value so we can report the correct delta * for all listeners. Even when the event was already enabled and has
@@ -691,17 +723,21 @@ static void i915_pmu_enable(struct perf_event *event)*/ local64_set (&event->hw.prev_count,__i915_pmu_event_read (event)); -intel_runtime_pm_put (&i915->runtime_pm, wakeref); +if (wakeref) +intel_runtime_pm_put (&i915->runtime_pm, wakeref); }static void i915_pmu_disable (struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +unsigned int bit =event_bit (event);struct i915_pmu *pmu = &i915->pmu;unsigned long flags; +if (bit ==-1 ) +return ; +spin_lock_irqsave (&pmu->lock, flags);if (is_engine_event (event)) {
drivers/gpu/drm/i915/i915_pmu.h +24 -11
@@ -14,6 +14,21 @@struct drm_i915_private ; +/** +* Non-engine events that we need to track enabled-disabled transition and +* current state. +*/ +enum i915_pmu_tracked_events { + __I915_PMU_ACTUAL_FREQUENCY_ENABLED =0 , + __I915_PMU_REQUESTED_FREQUENCY_ENABLED, + __I915_PMU_RC6_RESIDENCY_ENABLED, + __I915_PMU_TRACKED_EVENT_COUNT,/* count marker */ +}; + +/** +* Slots used from the sampling timer (non-engine events) with some extras for +* convenience. +*/ enum { __I915_SAMPLE_FREQ_ACT =0 , __I915_SAMPLE_FREQ_REQ,
@@ -28,8 +43,7 @@ enum {* It is also used to know to needed number of event reference counters. */ #define I915_PMU_MASK_BITS \ - ((1 << I915_PMU_SAMPLE_BITS) + \ - (I915_PMU_LAST + 1 - __I915_PMU_OTHER(0))) + (I915_ENGINE_SAMPLE_COUNT + __I915_PMU_TRACKED_EVENT_COUNT)#define I915_ENGINE_SAMPLE_COUNT (I915_SAMPLE_SEMA + 1)
@@ -66,18 +80,17 @@ struct i915_pmu {*/ struct hrtimer timer;/** -* @enable: Bitmask of all currently enabled events. +* @enable: Bitmask of specific enabled events. +* +* For some events we need to track their state and do some internal +* house keeping. * -* Bits are derived from uAPI event numbers in a way that low 16 bits -* correspond to engine event _sample_ _type_ (I915_SAMPLE_QUEUED is -* bit 0), and higher bits correspond to other events (for instance -* I915_PMU_ACTUAL_FREQUENCY is bit 16 etc). +* Each engine event sampler type and event listed in enum +* i915_pmu_tracked_events gets a bit in this field. * -* In other words, low 16 bits are not per engine but per engine -* sampler type, while the upper bits are directly mapped to other -* event types. +* Low bits are engine samplers and other events continue from there. */ -u64 enable; +u32 enable;/** * @timer_last:
include/uapi/drm/i915_drm.h +1 -1
@@ -178,7 +178,7 @@ enum drm_i915_pmu_engine_sample {#define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2)#define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3) -#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY +#define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCY/* Each region is a minimum of 16k, and there are at most 255 of them. */
Signature · 6 lines
2.25.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2020-11-27 10:01:09)
Quoted 52 lines
From: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks
I915_PMU_LASTas deprecated and stops the internal implementation using it for sizing the event status bitmask and array.New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
v2:
* Streamline helper names. (Chris)Signed-off-by Tvrtko Ursulin <[email protected]>Cc Chris Wilson <[email protected]>--- drivers/gpu/drm/i915/i915_pmu.c | 80 ++++++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_pmu.h | 35 ++++++++++----- include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 83 insertions(+), 34 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +5
-3@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;@@ -57,17 +55,38 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int other_bit (const u64 config) +{ +unsigned int val; + +switch (config) {
drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config) · line 72
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +10
-0+case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default :
Should we explicitly list the untracked events?
At least we should put a comment here to remind ourselves what takes the default path.
/* Anything that doesn't require event tracking can be ignored */
Quoted 4 lines
drivers/gpu/drm/i915/i915_pmu.c +4
-0+return -1 ; + } + +return I915_ENGINE_SAMPLE_COUNT + val;
drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config) · line 85
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +4
-1+} + +static unsigned int config_bit (const u64 config) {if (is_engine_config (config))return engine_config_sample (config);else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); +return other_bit (config); }
Thanks, that reads so much more clearly to me, and complements it use well.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 66 lines · Chris Wilson
Quoting Tvrtko Ursulin (2020-11-27 10:01:09)
Quoted 52 lines
From: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks
I915_PMU_LASTas deprecated and stops the internal implementation using it for sizing the event status bitmask and array.New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
v2:
* Streamline helper names. (Chris)Signed-off-by Tvrtko Ursulin <[email protected]>Cc Chris Wilson <[email protected]>--- drivers/gpu/drm/i915/i915_pmu.c | 80 ++++++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_pmu.h | 35 ++++++++++----- include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 83 insertions(+), 34 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +5
-3@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;@@ -57,17 +55,38 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int other_bit (const u64 config) +{ +unsigned int val; + +switch (config) {drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config) · line 72
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +10
-0+case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default :Should we explicitly list the untracked events?
Quoted 4 lines
At least we should put a comment here to remind ourselves what takes the default path.
/* Anything that doesn't require event tracking can be ignored */
Comment is I think enough, I wouldn't want to list all events because that partially defeats the purpose of the simplification. If something will be forgotten here IGTs would tell us.
Quoted 18 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_pmu.c +4
-0+return -1 ; + } + +return I915_ENGINE_SAMPLE_COUNT + val;drivers/gpu/drm/i915/i915_pmu.c static bool is_engine_config(u64 config) · line 85
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +4
-1+} + +static unsigned int config_bit (const u64 config) {if (is_engine_config (config))return engine_config_sample (config);else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); +return other_bit (config); }Thanks, that reads so much more clearly to me, and complements it use well.
Quoted 1 line
Reviewed-by Chris Wilson <[email protected]>
Thanks!
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 1/1 drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
In reply to Tvrtko UrsulinFrom: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks I915_PMU_LAST as deprecated and stops the internal implementation using it for sizing the event status bitmask and array.
New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
v2:
* Streamline helper names. (Chris)
v3:
* Comment which events need tracking. (Chris)
--- drivers/gpu/drm/i915/i915_pmu.c | 84 ++++++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_pmu.h | 35 +++++++++----- include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 87 insertions(+), 34 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +62 -22
@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;
@@ -57,17 +55,42 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int other_bit (const u64 config) +{ +unsigned int val; + +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +/* +* Events that do not require sampling, or tracking state +* transitions between enabled and disabled can be ignored. +*/ +return -1 ; + } + +return I915_ENGINE_SAMPLE_COUNT + val; +} + +static unsigned int config_bit (const u64 config) {if (is_engine_config (config))return engine_config_sample (config);else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); +return other_bit (config); } -static u64 config_enabled_mask (u64 config) +static u64 config_mask (u64 config) { -return BIT_ULL (config_enabled_bit (config)); +return BIT_ULL (config_bit (config)); }static bool is_engine_event (struct perf_event *event)
@@ -75,15 +98,20 @@ static bool is_engine_event(struct perf_event *event)return is_engine_config (event->attr.config); } -static unsigned int event_enabled_bit (struct perf_event *event) +static unsigned int event_bit (struct perf_event *event) +{ +return config_bit (event->attr.config); +} + +static bool event_read_needs_wakeref (const struct perf_event *event) { -return config_enabled_bit (event->attr.config); +return event->attr.config ==I915_PMU_RC6_RESIDENCY ; }static bool pmu_needs_timer (struct i915_pmu *pmu,bool gpu_active) {struct drm_i915_private *i915 =container_of (pmu,typeof (*i915), pmu); -u64 enable; +u32 enable;/* * Only some counters need the sampling timer.
@@ -96,8 +124,8 @@ static bool pmu_needs_timer(struct i915_pmu *pmu, bool gpu_active)* Mask out all the ones which do not need the timer, or in * other words keep all the ones that could need the timer. */ - enable &=config_enabled_mask (I915_PMU_ACTUAL_FREQUENCY ) | -config_enabled_mask (I915_PMU_REQUESTED_FREQUENCY ) | + enable &=config_mask (I915_PMU_ACTUAL_FREQUENCY ) | +config_mask (I915_PMU_REQUESTED_FREQUENCY ) |ENGINE_SAMPLE_MASK ;/*
@@ -189,7 +217,7 @@ static void park_rc6(struct drm_i915_private *i915) {struct i915_pmu *pmu = &i915->pmu; -if (pmu->enable &config_enabled_mask (I915_PMU_RC6_RESIDENCY )) +if (pmu->enable &config_mask (I915_PMU_RC6_RESIDENCY )) pmu->sample[__I915_SAMPLE_RC6].cur =__get_rc6 (&i915->gt); pmu->sleep_last =ktime_get ();
@@ -344,8 +372,8 @@ add_sample_mult(struct i915_pmu_sample *sample, u32 val, u32 mul)static bool frequency_sampling_enabled (struct i915_pmu *pmu) {return pmu->enable & - (config_enabled_mask (I915_PMU_ACTUAL_FREQUENCY ) | -config_enabled_mask (I915_PMU_REQUESTED_FREQUENCY )); + (config_mask (I915_PMU_ACTUAL_FREQUENCY ) | +config_mask (I915_PMU_REQUESTED_FREQUENCY )); } static void
@@ -363,7 +391,7 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns)if (!intel_gt_pm_get_if_awake (gt))return ; -if (pmu->enable &config_enabled_mask (I915_PMU_ACTUAL_FREQUENCY )) { +if (pmu->enable &config_mask (I915_PMU_ACTUAL_FREQUENCY )) {u32 val;/*
@@ -385,7 +413,7 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns) intel_gpu_freq(rps, val), period_ns / 1000); } -if (pmu->enable &config_enabled_mask (I915_PMU_REQUESTED_FREQUENCY )) { +if (pmu->enable &config_mask (I915_PMU_REQUESTED_FREQUENCY )) {add_sample_mult (&pmu->sample[__I915_SAMPLE_FREQ_REQ],intel_gpu_freq (rps, rps->cur_freq), period_ns /1000 );
@@ -627,12 +655,19 @@ static void i915_pmu_enable(struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +bool need_wakeref =event_read_needs_wakeref (event);struct i915_pmu *pmu = &i915->pmu; -intel_wakeref_t wakeref; +intel_wakeref_t wakeref =0 ;unsigned long flags; +unsigned int bit; + +if (need_wakeref) + wakeref =intel_runtime_pm_get (&i915->runtime_pm); + + bit =event_bit (event); +if (bit ==-1 ) + goto update; - wakeref =intel_runtime_pm_get (&i915->runtime_pm);spin_lock_irqsave (&pmu->lock, flags);/*
@@ -644,7 +679,7 @@ static void i915_pmu_enable(struct perf_event *event)GEM_BUG_ON (pmu->enable_count[bit] == ~0 );if (pmu->enable_count[bit] ==0 && -config_enabled_mask (I915_PMU_RC6_RESIDENCY ) &BIT_ULL (bit)) { +config_mask (I915_PMU_RC6_RESIDENCY ) &BIT_ULL (bit)) { pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur =0 ; pmu->sample[__I915_SAMPLE_RC6].cur =__get_rc6 (&i915->gt); pmu->sleep_last =ktime_get ();
@@ -684,6 +719,7 @@ static void i915_pmu_enable(struct perf_event *event)spin_unlock_irqrestore (&pmu->lock, flags); +update:/* * Store the current counter value so we can report the correct delta * for all listeners. Even when the event was already enabled and has
@@ -691,17 +727,21 @@ static void i915_pmu_enable(struct perf_event *event)*/ local64_set (&event->hw.prev_count,__i915_pmu_event_read (event)); -intel_runtime_pm_put (&i915->runtime_pm, wakeref); +if (wakeref) +intel_runtime_pm_put (&i915->runtime_pm, wakeref); }static void i915_pmu_disable (struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +unsigned int bit =event_bit (event);struct i915_pmu *pmu = &i915->pmu;unsigned long flags; +if (bit ==-1 ) +return ; +spin_lock_irqsave (&pmu->lock, flags);if (is_engine_event (event)) {
drivers/gpu/drm/i915/i915_pmu.h +24 -11
@@ -14,6 +14,21 @@struct drm_i915_private ; +/** +* Non-engine events that we need to track enabled-disabled transition and +* current state. +*/ +enum i915_pmu_tracked_events { + __I915_PMU_ACTUAL_FREQUENCY_ENABLED =0 , + __I915_PMU_REQUESTED_FREQUENCY_ENABLED, + __I915_PMU_RC6_RESIDENCY_ENABLED, + __I915_PMU_TRACKED_EVENT_COUNT,/* count marker */ +}; + +/** +* Slots used from the sampling timer (non-engine events) with some extras for +* convenience. +*/ enum { __I915_SAMPLE_FREQ_ACT =0 , __I915_SAMPLE_FREQ_REQ,
@@ -28,8 +43,7 @@ enum {* It is also used to know to needed number of event reference counters. */ #define I915_PMU_MASK_BITS \ - ((1 << I915_PMU_SAMPLE_BITS) + \ - (I915_PMU_LAST + 1 - __I915_PMU_OTHER(0))) + (I915_ENGINE_SAMPLE_COUNT + __I915_PMU_TRACKED_EVENT_COUNT)#define I915_ENGINE_SAMPLE_COUNT (I915_SAMPLE_SEMA + 1)
@@ -66,18 +80,17 @@ struct i915_pmu {*/ struct hrtimer timer;/** -* @enable: Bitmask of all currently enabled events. +* @enable: Bitmask of specific enabled events. +* +* For some events we need to track their state and do some internal +* house keeping. * -* Bits are derived from uAPI event numbers in a way that low 16 bits -* correspond to engine event _sample_ _type_ (I915_SAMPLE_QUEUED is -* bit 0), and higher bits correspond to other events (for instance -* I915_PMU_ACTUAL_FREQUENCY is bit 16 etc). +* Each engine event sampler type and event listed in enum +* i915_pmu_tracked_events gets a bit in this field. * -* In other words, low 16 bits are not per engine but per engine -* sampler type, while the upper bits are directly mapped to other -* event types. +* Low bits are engine samplers and other events continue from there. */ -u64 enable; +u32 enable;/** * @timer_last:
include/uapi/drm/i915_drm.h +1 -1
@@ -178,7 +178,7 @@ enum drm_i915_pmu_engine_sample {#define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2)#define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3) -#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY +#define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCY/* Each region is a minimum of 16k, and there are at most 255 of them. */
Signature · 6 lines
2.25.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2020-12-01 13:17:57)
include/uapi/drm/i915_drm.h enum drm_i915_pmu_engine_sample { · line 181
Quoted 10 lines
include/uapi/drm/i915_drm.h +1
-1@@ -178,7 +178,7 @@ enum drm_i915_pmu_engine_sample {#define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2)#define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3) -#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY +#define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCY
Do we still update the value, or let it rot?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Chris Wilson
Quoting Tvrtko Ursulin (2020-12-01 13:17:57)
Quoted 8 lines
include/uapi/drm/i915_drm.h +0
-0@@ -178,7 +178,7 @@ enum drm_i915_pmu_engine_sample {#define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2)#define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3)
Quoted 4 lines
include/uapi/drm/i915_drm.h enum drm_i915_pmu_engine_sample { · line 181
Quoted 2 lines
include/uapi/drm/i915_drm.h +1
-1-#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY +#define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCYDo we still update the value, or let it rot?
Rot for a while and then zap was my plan. As soon as I wean perf_pmu of it. Too bold and reckless?
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2020-12-01 13:52:57)
Quoted 11 lines · Chris Wilson
Quoted 9 lines
Quoting Tvrtko Ursulin (2020-12-01 13:17:57)
Quoted 8 lines
include/uapi/drm/i915_drm.h +0
-0@@ -178,7 +178,7 @@ enum drm_i915_pmu_engine_sample {#define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2)#define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3)
Quoted 7 lines
Quoted 4 lines
include/uapi/drm/i915_drm.h enum drm_i915_pmu_engine_sample { · line 181
Quoted 2 lines
include/uapi/drm/i915_drm.h +1
-1-#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY +#define I915_PMU_LAST /* Deprecated - do not use */ I915_PMU_RC6_RESIDENCYDo we still update the value, or let it rot?
Rot for a while and then zap was my plan. As soon as I wean
perf_pmuof it. Too bold and reckless?
Immediate rot is fine, surely no one will complain that the token has the same value forevermore.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking (rev2)
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking (rev2)
URL : https://patchwork.freedesktop.org/series/84305/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9397 -> Patchwork_18995
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_18995 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_18995, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_18995:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@requests:
- fi-ivb-3770: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-ivb-3770/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-ivb-3770/igt@i915_selftest@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_9397 and Patchwork_18995:
### New CI tests (1) ###
* boot:
- Statuses : 40 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_18995 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-tgl-u2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-tgl-u2/igt@[email protected]
* igt@i915_module_load@reload:
- fi-byt-j1900: [PASS][5] -> [DMESG-WARN][6] ([i915#1982]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-byt-j1900/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-byt-j1900/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-bsw-kefka/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-bsw-kefka/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-icl-y: [PASS][9] -> [INCOMPLETE][10] ([i915#189] / [i915#2405])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-icl-y/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-icl-y/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: [PASS][11] -> [DMESG-WARN][12] ([i915#1982])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-icl-u2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-icl-u2/igt@[email protected]
* igt@prime_self_import@basic-with_two_bos:
- fi-tgl-y: [PASS][13] -> [DMESG-WARN][14] ([i915#402])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html
#### Possible fixes ####
* igt@i915_module_load@reload:
- fi-icl-u2: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-icl-u2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-icl-u2/igt@[email protected]
- fi-tgl-u2: [DMESG-WARN][17] ([i915#1982] / [k.org#205379]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-tgl-u2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-tgl-u2/igt@[email protected]
* igt@i915_selftest@live@active:
- fi-icl-u2: [DMESG-FAIL][19] -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-icl-u2/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-icl-u2/igt@i915_selftest@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-bsw-kefka: [DMESG-WARN][21] ([i915#1982]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-bsw-kefka/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-bsw-kefka/igt@[email protected]
* igt@prime_vgem@basic-gtt:
- fi-tgl-y: [DMESG-WARN][23] ([i915#402]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9397/fi-tgl-y/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/fi-tgl-y/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#189]: https://gitlab.freedesktop.org/drm/intel/issues/189
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[k.org#205379]: https://bugzilla.kernel.org/show_bug.cgi?id=205379
Participating hosts (44 -> 40)
------------------------------
Missing (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u
Build changes
-------------
* Linux: CI_DRM_9397 -> Patchwork_18995
CI-20190529: 20190529
CI_DRM_9397: 17a8f6e3b3c8daf242a4bd422147eaf03e9dcea7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5872: d8ebb937c76184d5e526c59a2c18abca1c7a03c1 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18995: f5f22b59fa26baa294c9158e71169dfb4980778a @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
f5f22b59fa26 drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18995/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking (rev3)
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking (rev3)
URL : https://patchwork.freedesktop.org/series/84305/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9412 -> Patchwork_19025
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/index.html
New tests
---------
New tests have been introduced between CI_DRM_9412 and Patchwork_19025:
### New CI tests (1) ###
* boot:
- Statuses : 1 fail(s) 39 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_19025 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_getparams_basic@basic-subslice-total:
- fi-tgl-y: [PASS][1] -> [DMESG-WARN][2] ([i915#402]) +2 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-y/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-tgl-y/igt@[email protected]
* igt@i915_module_load@reload:
- fi-icl-y: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-icl-y/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-icl-y/igt@[email protected]
* igt@kms_busy@basic@flip:
- fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-y/igt@kms_busy@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-tgl-y/igt@kms_busy@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-byt-j1900: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-byt-j1900/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-byt-j1900/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: [PASS][9] -> [DMESG-WARN][10] ([i915#1982]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-icl-u2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-icl-u2/igt@[email protected]
#### Possible fixes ####
* igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2: [DMESG-WARN][11] ([i915#1982]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-u2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-tgl-u2/igt@[email protected]
* igt@i915_module_load@reload:
- fi-byt-j1900: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-byt-j1900/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-byt-j1900/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-n3050: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-bsw-n3050/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-bsw-n3050/igt@[email protected]
- fi-tgl-y: [DMESG-WARN][17] ([i915#1982] / [i915#2411]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-y/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-tgl-y/igt@[email protected]
- fi-bsw-kefka: [DMESG-WARN][19] ([i915#1982]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-bsw-kefka/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-bsw-kefka/igt@[email protected]
* igt@i915_selftest@live@client:
- fi-glk-dsi: [INCOMPLETE][21] ([i915#2295]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-glk-dsi/igt@i915_selftest@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-glk-dsi/igt@i915_selftest@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-snb-2520m: [DMESG-WARN][23] ([i915#1982]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-snb-2520m/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-snb-2520m/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- fi-icl-u2: [DMESG-WARN][25] ([i915#1982]) -> [PASS][26] +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-icl-u2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-icl-u2/igt@[email protected]
* igt@vgem_basic@dmabuf-export:
- fi-tgl-y: [DMESG-WARN][27] ([i915#402]) -> [PASS][28] +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-y/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/fi-tgl-y/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2417]: https://gitlab.freedesktop.org/drm/intel/issues/2417
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
Participating hosts (45 -> 40)
------------------------------
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9412 -> Patchwork_19025
CI-20190529: 20190529
CI_DRM_9412: 62a57fc697819341ffabadc2b734f2288fdf19ce @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5877: c36f7973d1ee7886ec65fa16c7b1fd8dc5a33caa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19025: 0bd3c6703a32f3429fb1bea02d3826348b3eb0c8 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
0bd3c6703a32 drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking (rev3)
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking (rev3)
URL : https://patchwork.freedesktop.org/series/84305/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9412_full -> Patchwork_19025_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
New tests
---------
New tests have been introduced between CI_DRM_9412_full and Patchwork_19025_full:
### New CI tests (1) ###
* boot:
- Statuses : 175 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_19025_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_whisper@basic-fds-forked-all:
- shard-glk: [PASS][1] -> [DMESG-WARN][2] ([i915#118] / [i915#95])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-glk6/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- shard-tglb: [PASS][3] -> [SKIP][4] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-tglb6/igt@[email protected]
* igt@gen9_exec_parse@allowed-all:
- shard-skl: [PASS][5] -> [DMESG-WARN][6] ([i915#1436] / [i915#716])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl2/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- shard-apl: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-apl6/igt@[email protected]
* igt@i915_selftest@live@client:
- shard-skl: [PASS][9] -> [INCOMPLETE][10] ([i915#2295])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl1/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl5/igt@i915_selftest@[email protected]
* igt@i915_suspend@forcewake:
- shard-skl: [PASS][11] -> [INCOMPLETE][12] ([i915#636])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl2/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
- shard-skl: [PASS][13] -> [FAIL][14] ([i915#54]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl5/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl1/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding:
- shard-apl: [PASS][15] -> [FAIL][16] ([i915#54])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl7/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-apl7/igt@[email protected]
- shard-kbl: [PASS][17] -> [FAIL][18] ([i915#54])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-kbl3/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- shard-skl: [PASS][19] -> [DMESG-WARN][20] ([i915#1982]) +5 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl5/igt@[email protected]
* igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible@a-dp1:
- shard-kbl: [PASS][21] -> [DMESG-WARN][22] ([i915#1982]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl4/igt@kms_flip@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-kbl6/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1:
- shard-skl: [PASS][23] -> [FAIL][24] ([i915#79])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl6/igt@kms_flip@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl2/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-cpu:
- shard-tglb: [PASS][25] -> [DMESG-WARN][26] ([i915#1982])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-cpu.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-tglb8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-cpu.html
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [PASS][27] -> [FAIL][28] ([i915#1188])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl10/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl6/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][29] -> [FAIL][30] ([fdo#108145] / [i915#265])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl10/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl6/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][31] -> [SKIP][32] ([fdo#109642] / [fdo#111068])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb2/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-iclb8/igt@[email protected]
* igt@kms_psr@psr2_sprite_mmap_cpu:
- shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109441]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-iclb1/igt@kms_psr@psr2_sprite_mmap_cpu.html
* igt@kms_vblank@pipe-b-wait-idle:
- shard-snb: [PASS][35] -> [SKIP][36] ([fdo#109271]) +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-snb4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-snb6/igt@[email protected]
#### Possible fixes ####
* igt@i915_module_load@reload:
- shard-skl: [DMESG-WARN][37] ([i915#1982]) -> [PASS][38] +5 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl9/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl1/igt@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- shard-glk: [DMESG-FAIL][39] ([i915#2291]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk4/igt@i915_selftest@live@gt_heartbeat.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-glk2/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_suspend@debugfs-reader:
- shard-kbl: [DMESG-WARN][41] ([i915#180]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl3/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-kbl3/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-128x128-random:
- shard-skl: [FAIL][43] ([i915#54]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl8/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl9/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- shard-apl: [DMESG-WARN][45] ([i915#1982]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-apl1/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
- shard-kbl: [DMESG-WARN][47] ([i915#1982]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-kbl1/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic:
- shard-glk: [FAIL][49] ([i915#2346]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk5/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-glk8/igt@[email protected]
* igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions:
- shard-glk: [DMESG-WARN][51] ([i915#1982]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk4/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-glk2/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html
- shard-iclb: [DMESG-WARN][53] ([i915#1982]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb7/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-iclb1/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1:
- shard-tglb: [FAIL][55] ([i915#2598]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb7/igt@kms_flip@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-tglb1/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt:
- shard-tglb: [DMESG-WARN][57] ([i915#1982]) -> [PASS][58] +1 similar issue
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb5/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-tglb2/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][59] ([i915#1188]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl8/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl3/igt@[email protected]
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][61] ([fdo#109441]) -> [PASS][62] +2 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb7/igt@kms_psr@psr2_cursor_render.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
* igt@perf_pmu@module-unload:
- shard-skl: [DMESG-WARN][63] ([i915#1982] / [i915#262]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl9/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl2/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: [WARN][65] ([i915#2681] / [i915#2684]) -> [WARN][66] ([i915#2684])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb8/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-iclb5/igt@[email protected]
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][67] ([i915#2684]) -> [WARN][68] ([i915#2681] / [i915#2684])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb2/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-iclb1/igt@[email protected]
* igt@runner@aborted:
- shard-skl: [FAIL][69] ([i915#2295] / [i915#2722]) -> ([FAIL][70], [FAIL][71], [FAIL][72], [FAIL][73]) ([i915#1436] / [i915#2295] / [i915#2426] / [i915#2722])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl1/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl4/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl2/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl8/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/shard-skl5/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
[i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2598]: https://gitlab.freedesktop.org/drm/intel/issues/2598
[i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#636]: https://gitlab.freedesktop.org/drm/intel/issues/636
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_9412 -> Patchwork_19025
CI-20190529: 20190529
CI_DRM_9412: 62a57fc697819341ffabadc2b734f2288fdf19ce @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5877: c36f7973d1ee7886ec65fa16c7b1fd8dc5a33caa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19025: 0bd3c6703a32f3429fb1bea02d3826348b3eb0c8 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19025/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2020-11-26 16:47:03)
Quoted 110 lines
From: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks
I915_PMU_LASTas deprecated and stops the internal implementation using it for sizing the event status bitmask and array.New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
Signed-off-by Tvrtko Ursulin <[email protected]>--- drivers/gpu/drm/i915/i915_pmu.c | 64 +++++++++++++++++++++++++++------ drivers/gpu/drm/i915/i915_pmu.h | 35 ++++++++++++------ include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 78 insertions(+), 23 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +40
-9@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;@@ -57,12 +55,39 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int is_tracked_config (const u64 config) { -if (is_engine_config (config)) +unsigned int val; + +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +return 0 ; + } + +return val +1 ; +} + +static unsigned int config_enabled_bit (const u64 config) +{ +if (is_engine_config (config)) {return engine_config_sample (config); -else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); + }else { +unsigned int bit =is_tracked_config (config); + +if (bit) +return I915_ENGINE_SAMPLE_COUNT + bit -1 ; +else +return -1 ; + } }static u64 config_enabled_mask (u64 config)@@ -80,10 +105,15 @@ static unsigned int event_enabled_bit(struct perf_event *event)return config_enabled_bit (event->attr.config); } +static bool event_read_needs_wakeref (const struct perf_event *event) +{ +return event->attr.config ==I915_PMU_RC6_RESIDENCY ; +} +static bool pmu_needs_timer (struct i915_pmu *pmu,bool gpu_active) {struct drm_i915_private *i915 =container_of (pmu,typeof (*i915), pmu); -u64 enable; +u32 enable;/* * Only some counters need the sampling timer. @@ -627,12 +657,19 @@ static void i915_pmu_enable(struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +bool need_wakeref =event_read_needs_wakeref (event);struct i915_pmu *pmu = &i915->pmu; -intel_wakeref_t wakeref; +intel_wakeref_t wakeref =0 ;unsigned long flags; +unsigned int bit;
drivers/gpu/drm/i915/i915_pmu.c static void i915_pmu_enable(struct perf_event *event) · line 673
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +7
-1+ +if (need_wakeref) + wakeref =intel_runtime_pm_get (&i915->runtime_pm); + + bit =event_enabled_bit (event); +if (bit ==-1 ) + goto update; - wakeref =intel_runtime_pm_get (&i915->runtime_pm);spin_lock_irqsave (&pmu->lock, flags);
What are we taking a wakeref here for?
Looks just to be __get_rc6. Do we need to update the sample at all? -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 119 lines · Chris Wilson
Quoting Tvrtko Ursulin (2020-11-26 16:47:03)
Quoted 118 lines
From: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks
I915_PMU_LASTas deprecated and stops the internal implementation using it for sizing the event status bitmask and array.New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
Signed-off-by Tvrtko Ursulin <[email protected]>--- drivers/gpu/drm/i915/i915_pmu.c | 64 +++++++++++++++++++++++++++------ drivers/gpu/drm/i915/i915_pmu.h | 35 ++++++++++++------ include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 78 insertions(+), 23 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +47
-9@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;@@ -57,12 +55,39 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int is_tracked_config (const u64 config) { -if (is_engine_config (config)) +unsigned int val; + +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +return 0 ; + } + +return val +1 ; +} + +static unsigned int config_enabled_bit (const u64 config) +{ +if (is_engine_config (config)) {return engine_config_sample (config); -else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); + }else { +unsigned int bit =is_tracked_config (config); + +if (bit) +return I915_ENGINE_SAMPLE_COUNT + bit -1 ; +else +return -1 ; + } }static u64 config_enabled_mask (u64 config)@@ -80,10 +105,15 @@ static unsigned int event_enabled_bit(struct perf_event *event)return config_enabled_bit (event->attr.config); } +static bool event_read_needs_wakeref (const struct perf_event *event) +{ +return event->attr.config ==I915_PMU_RC6_RESIDENCY ; +} +static bool pmu_needs_timer (struct i915_pmu *pmu,bool gpu_active) {struct drm_i915_private *i915 =container_of (pmu,typeof (*i915), pmu); -u64 enable; +u32 enable;/* * Only some counters need the sampling timer. @@ -627,12 +657,19 @@ static void i915_pmu_enable(struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +bool need_wakeref =event_read_needs_wakeref (event);struct i915_pmu *pmu = &i915->pmu; -intel_wakeref_t wakeref; +intel_wakeref_t wakeref =0 ;unsigned long flags; +unsigned int bit; + +if (need_wakeref) + wakeref =intel_runtime_pm_get (&i915->runtime_pm); + + bit =event_enabled_bit (event); +if (bit ==-1 ) + goto update;
Quoted 6 lines
drivers/gpu/drm/i915/i915_pmu.c static void i915_pmu_enable(struct perf_event *event) · line 673
Quoted 2 lines
drivers/gpu/drm/i915/i915_pmu.c +0
-1- wakeref =intel_runtime_pm_get (&i915->runtime_pm);spin_lock_irqsave (&pmu->lock, flags);What are we taking a wakeref here for?
Looks just to be
__get_rc6. Do we need to update the sample at all?
Yes, so __get_rc6 can record the start state. But if you have seen it called from irq context then obviously it is not safe.. Just no idea why we haven't hit it so far. Does perf_pmu need a more evil subtest?
But the part of needing wakeref for read makes no sense, i915_pmu_event_read itself is not taking it.. nor does event disable. Looks like I need to re-visit this whole topic to remind myself what gets called from irq context and what does not.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2020-12-04 10:57:52)
Quoted 126 lines · Chris Wilson
Quoted 124 lines
Quoting Tvrtko Ursulin (2020-11-26 16:47:03)
Quoted 110 lines
From: Tvrtko Ursulin <[email protected]>
Adding any kinds of "last" abi markers is usually a mistake which I repeated when implementing the PMU because it felt convenient at the time.
This patch marks
I915_PMU_LASTas deprecated and stops the internal implementation using it for sizing the event status bitmask and array.New way of sizing the fields is a bit less elegant, but it omits reserving slots for tracking events we are not interested in, and as such saves some runtime space. Adding sampling events is likely to be a special event and the new plumbing needed will be easily detected in testing. Existing asserts against the bitfield and array sizes are keeping the code safe.
First event which gets the new treatment in this new scheme are the interrupts - which neither needs any tracking in i915 pmu nor needs waking up the GPU to read it.
Signed-off-by Tvrtko Ursulin <[email protected]>--- drivers/gpu/drm/i915/i915_pmu.c | 64 +++++++++++++++++++++++++++------ drivers/gpu/drm/i915/i915_pmu.h | 35 ++++++++++++------ include/uapi/drm/i915_drm.h | 2 +- 3 files changed, 78 insertions(+), 23 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +40
-9@@ -27,8 +27,6 @@ BIT(I915_SAMPLE_WAIT) | \ BIT(I915_SAMPLE_SEMA)) -#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask;static unsigned int i915_pmu_target_cpu =-1 ;@@ -57,12 +55,39 @@ static bool is_engine_config(u64 config)return config <__I915_PMU_OTHER (0 ); } -static unsigned int config_enabled_bit (u64 config) +static unsigned int is_tracked_config (const u64 config) { -if (is_engine_config (config)) +unsigned int val; + +switch (config) { +case I915_PMU_ACTUAL_FREQUENCY : + val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; +break ; +case I915_PMU_REQUESTED_FREQUENCY : + val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED; +break ; +case I915_PMU_RC6_RESIDENCY : + val = __I915_PMU_RC6_RESIDENCY_ENABLED; +break ; +default : +return 0 ; + } + +return val +1 ; +} + +static unsigned int config_enabled_bit (const u64 config) +{ +if (is_engine_config (config)) {return engine_config_sample (config); -else -return ENGINE_SAMPLE_BITS + (config -__I915_PMU_OTHER (0 )); + }else { +unsigned int bit =is_tracked_config (config); + +if (bit) +return I915_ENGINE_SAMPLE_COUNT + bit -1 ; +else +return -1 ; + } }static u64 config_enabled_mask (u64 config)@@ -80,10 +105,15 @@ static unsigned int event_enabled_bit(struct perf_event *event)return config_enabled_bit (event->attr.config); } +static bool event_read_needs_wakeref (const struct perf_event *event) +{ +return event->attr.config ==I915_PMU_RC6_RESIDENCY ; +} +static bool pmu_needs_timer (struct i915_pmu *pmu,bool gpu_active) {struct drm_i915_private *i915 =container_of (pmu,typeof (*i915), pmu); -u64 enable; +u32 enable;/* * Only some counters need the sampling timer. @@ -627,12 +657,19 @@ static void i915_pmu_enable(struct perf_event *event) {struct drm_i915_private *i915 =container_of (event->pmu,typeof (*i915), pmu.base); -unsigned int bit =event_enabled_bit (event); +bool need_wakeref =event_read_needs_wakeref (event);struct i915_pmu *pmu = &i915->pmu; -intel_wakeref_t wakeref; +intel_wakeref_t wakeref =0 ;unsigned long flags; +unsigned int bit;drivers/gpu/drm/i915/i915_pmu.c static void i915_pmu_enable(struct perf_event *event) · line 673
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +7
-1+ +if (need_wakeref) + wakeref =intel_runtime_pm_get (&i915->runtime_pm); + + bit =event_enabled_bit (event); +if (bit ==-1 ) + goto update; - wakeref =intel_runtime_pm_get (&i915->runtime_pm);spin_lock_irqsave (&pmu->lock, flags);What are we taking a wakeref here for?
Quoted 5 lines
Quoted 1 line
Looks just to be
__get_rc6. Do we need to update the sample at all?Yes, so
__get_rc6can record the start state. But if you have seen it called from irq context then obviously it is not safe.. Just no idea why we haven't hit it so far. Doesperf_pmuneed a more evil subtest?
I haven't figured out why CI hasn't picked it up yet, but dg1 does
<3> [134.304493] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1074 <3> [134.304638] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1117, name: dmesg <4> [134.304656] 4 locks held by dmesg/1117:
<4> [134.304664] #0: ffff88847cf375b0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x45/0x50
<4> [134.304691] #1: ffff8884a58c9430 (sb_writers#3){.+.+}-{0:0}, at: vfs_write+0x16a/0x230
<4> [134.304715] #2: ffff8884a5573358 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: ext4_buffered_write_iter+0x2e/0x140
<4> [134.304736] #3: ffffe8ffffa353d0 (&cpuctx_lock){-...}-{2:2}, at: __perf_install_in_context+0x41/0x2c0<4> [134.304758] irq event stamp: 18348534
<4> [134.304771] hardirqs last enabled at (18348533): [<ffffffff812b76d7>] __slab_alloc.isra.84.constprop.93+0x87/0x90 <4> [134.304785] hardirqs last disabled at (18348534): [<ffffffff81b5bd6d>] irqentry_enter+0x1d/0x50 <4> [134.304796] softirqs last enabled at (18343298): [<ffffffff81e0037f>] __do_softirq+0x37f/0x4cb <4> [134.304806] softirqs last disabled at (18343291): [<ffffffff81c00f72>] asm_call_irq_on_stack+0x12/0x20 <3> [134.304813] Preemption disabled at:
<3> [134.304821] [<ffffffff81113e97>] irq_enter_rcu+0x27/0x80
<4> [134.304847] CPU: 0 PID: 1117 Comm: dmesg Not tainted 5.9.0-gbd5b876be63e-DII_3243_dg1+ #1
<4> [134.304856] Hardware name: Gigabyte Technology Co., Ltd. GB-Z390 Garuda/GB-Z390 Garuda-CF, BIOS IG1c 11/19/2019 <4> [134.304863] Call Trace:
<4> [134.304872] <IRQ> <4> [134.304888] dump_stack+0x77/0xa0 <4> [134.304907] ___might_sleep.cold.107+0xf2/0x106 <4> [134.304930] __pm_runtime_resume+0x75/0x80 <4> [134.305073] __intel_runtime_pm_get+0x19/0x80 [i915] <4> [134.305227] i915_pmu_enable+0x1b7/0x280 [i915] <4> [134.305385] i915_pmu_event_add+0x21/0x40 [i915] <4> [134.305402] event_sched_in.isra.145+0xe0/0x270 <4> [134.305427] merge_sched_in+0x192/0x3e0 <4> [134.305458] visit_groups_merge.constprop.150+0x140/0x4d0 <4> [134.305471] ? sched_clock+0x5/0x10 <4> [134.305498] ctx_sched_in+0xf9/0x250 <4> [134.305526] ctx_resched+0x58/0x90 <4> [134.305546] __perf_install_in_context+0x21d/0x2c0 <4> [134.305570] remote_function+0x44/0x50 <4> [134.305589] flush_smp_call_function_queue+0x135/0x1c0 <4> [134.305608] __sysvec_call_function_single+0x3f/0x1e0 <4> [134.305620] asm_call_irq_on_stack+0x12/0x20 <4> [134.305631] </IRQ> <4> [134.305645] sysvec_call_function_single+0xc1/0xe0 <4> [134.305661] asm_sysvec_call_function_single+0x12/0x20
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx