mbox series

[0/8] Enable triggered perf query for Xe_HP

Message ID 20210803201349.31031-1-umesh.nerlige.ramappa@intel.com (mailing list archive)
Headers show
Series Enable triggered perf query for Xe_HP | expand

Message

Umesh Nerlige Ramappa Aug. 3, 2021, 8:13 p.m. UTC
This is a revival of the patch series to support triggered perf query reports
from here - https://patchwork.freedesktop.org/series/83831/

The patches were not pushed earlier because corresponding UMD changes were
missing. This revival addresses UMD changes in GPUvis for this series. GPUvis
uses the perf library in igt-gpu-tools. Changes to the library are here -
https://patchwork.freedesktop.org/series/93355/

GPUvis changes will be posted as a PR once the above library and kernel changes
are pushed.

Summary of the feature:

Current platforms provide MI_REPORT_PERF_COUNT to query a snapshot of perf
counters from a batch. This mechanism does not have consistent support on all
engines for newer platforms. To support perf query, all new platforms use a
mechanism to trigger OA report snapshots into the OA buffer by writing to a HW
register from a batch. To lookup this report in the OA buffer quickly, the OA
buffer is mmapped into the user space.

This series implements the new query mechanism.

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

Chris Wilson (3):
  drm/i915/gt: Refactor _wa_add to reuse wa_index and wa_list_grow
  drm/i915/gt: Check for conflicting RING_NONPRIV
  drm/i915/gt: Enable dynamic adjustment of RING_NONPRIV

Piotr Maciejewski (1):
  drm/i915/perf: Ensure observation logic is not clock gated

Umesh Nerlige Ramappa (4):
  drm/i915/gt: Lock intel_engine_apply_whitelist with uncore->lock
  drm/i915/perf: Whitelist OA report trigger registers
  drm/i915/perf: Whitelist OA counter and buffer registers
  drm/i915/perf: Map OA buffer to user space for gen12 performance query

 drivers/gpu/drm/i915/gem/i915_gem_mman.c      |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_mman.h      |   2 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c   | 269 +++++++++++++-----
 drivers/gpu/drm/i915/gt/intel_workarounds.h   |   7 +
 .../gpu/drm/i915/gt/selftest_workarounds.c    | 237 +++++++++++++++
 drivers/gpu/drm/i915/i915_perf.c              | 228 ++++++++++++++-
 drivers/gpu/drm/i915/i915_perf_types.h        |   8 +
 drivers/gpu/drm/i915/i915_reg.h               |  30 +-
 include/uapi/drm/i915_drm.h                   |  33 +++
 9 files changed, 728 insertions(+), 88 deletions(-)

Comments

Umesh Nerlige Ramappa Aug. 3, 2021, 8:18 p.m. UTC | #1
+ Joonas

On Tue, Aug 03, 2021 at 01:13:41PM -0700, Umesh Nerlige Ramappa wrote:
>This is a revival of the patch series to support triggered perf query reports
>from here - https://patchwork.freedesktop.org/series/83831/
>
>The patches were not pushed earlier because corresponding UMD changes were
>missing. This revival addresses UMD changes in GPUvis for this series. GPUvis
>uses the perf library in igt-gpu-tools. Changes to the library are here -
>https://patchwork.freedesktop.org/series/93355/
>
>GPUvis changes will be posted as a PR once the above library and kernel changes
>are pushed.
>
>Summary of the feature:
>
>Current platforms provide MI_REPORT_PERF_COUNT to query a snapshot of perf
>counters from a batch. This mechanism does not have consistent support on all
>engines for newer platforms. To support perf query, all new platforms use a
>mechanism to trigger OA report snapshots into the OA buffer by writing to a HW
>register from a batch. To lookup this report in the OA buffer quickly, the OA
>buffer is mmapped into the user space.
>
>This series implements the new query mechanism.
>
>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>
>Chris Wilson (3):
>  drm/i915/gt: Refactor _wa_add to reuse wa_index and wa_list_grow
>  drm/i915/gt: Check for conflicting RING_NONPRIV
>  drm/i915/gt: Enable dynamic adjustment of RING_NONPRIV
>
>Piotr Maciejewski (1):
>  drm/i915/perf: Ensure observation logic is not clock gated
>
>Umesh Nerlige Ramappa (4):
>  drm/i915/gt: Lock intel_engine_apply_whitelist with uncore->lock
>  drm/i915/perf: Whitelist OA report trigger registers
>  drm/i915/perf: Whitelist OA counter and buffer registers
>  drm/i915/perf: Map OA buffer to user space for gen12 performance query
>
> drivers/gpu/drm/i915/gem/i915_gem_mman.c      |   2 +-
> drivers/gpu/drm/i915/gem/i915_gem_mman.h      |   2 +
> drivers/gpu/drm/i915/gt/intel_workarounds.c   | 269 +++++++++++++-----
> drivers/gpu/drm/i915/gt/intel_workarounds.h   |   7 +
> .../gpu/drm/i915/gt/selftest_workarounds.c    | 237 +++++++++++++++
> drivers/gpu/drm/i915/i915_perf.c              | 228 ++++++++++++++-
> drivers/gpu/drm/i915/i915_perf_types.h        |   8 +
> drivers/gpu/drm/i915/i915_reg.h               |  30 +-
> include/uapi/drm/i915_drm.h                   |  33 +++
> 9 files changed, 728 insertions(+), 88 deletions(-)
>
>-- 
>2.20.1
>
Umesh Nerlige Ramappa Aug. 3, 2021, 8:27 p.m. UTC | #2
On Tue, Aug 03, 2021 at 01:18:38PM -0700, Umesh Nerlige Ramappa wrote:
>+ Joonas
>
>On Tue, Aug 03, 2021 at 01:13:41PM -0700, Umesh Nerlige Ramappa wrote:
>>This is a revival of the patch series to support triggered perf query reports
>>from here - https://patchwork.freedesktop.org/series/83831/
>>
>>The patches were not pushed earlier because corresponding UMD changes were
>>missing. This revival addresses UMD changes in GPUvis for this series. GPUvis
>>uses the perf library in igt-gpu-tools. Changes to the library are here -
>>https://patchwork.freedesktop.org/series/93355/
>>
>>GPUvis changes will be posted as a PR once the above library and kernel changes
>>are pushed.

GPUvis changes:
https://github.com/unerlige/gpuvis/commit/1c19c134a64564f7b8d7ca3b46449324040a40be

>>
>>Summary of the feature:
>>
>>Current platforms provide MI_REPORT_PERF_COUNT to query a snapshot of perf
>>counters from a batch. This mechanism does not have consistent support on all
>>engines for newer platforms. To support perf query, all new platforms use a
>>mechanism to trigger OA report snapshots into the OA buffer by writing to a HW
>>register from a batch. To lookup this report in the OA buffer quickly, the OA
>>buffer is mmapped into the user space.
>>
>>This series implements the new query mechanism.
>>
>>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>>
>>Chris Wilson (3):
>> drm/i915/gt: Refactor _wa_add to reuse wa_index and wa_list_grow
>> drm/i915/gt: Check for conflicting RING_NONPRIV
>> drm/i915/gt: Enable dynamic adjustment of RING_NONPRIV
>>
>>Piotr Maciejewski (1):
>> drm/i915/perf: Ensure observation logic is not clock gated
>>
>>Umesh Nerlige Ramappa (4):
>> drm/i915/gt: Lock intel_engine_apply_whitelist with uncore->lock
>> drm/i915/perf: Whitelist OA report trigger registers
>> drm/i915/perf: Whitelist OA counter and buffer registers
>> drm/i915/perf: Map OA buffer to user space for gen12 performance query
>>
>>drivers/gpu/drm/i915/gem/i915_gem_mman.c      |   2 +-
>>drivers/gpu/drm/i915/gem/i915_gem_mman.h      |   2 +
>>drivers/gpu/drm/i915/gt/intel_workarounds.c   | 269 +++++++++++++-----
>>drivers/gpu/drm/i915/gt/intel_workarounds.h   |   7 +
>>.../gpu/drm/i915/gt/selftest_workarounds.c    | 237 +++++++++++++++
>>drivers/gpu/drm/i915/i915_perf.c              | 228 ++++++++++++++-
>>drivers/gpu/drm/i915/i915_perf_types.h        |   8 +
>>drivers/gpu/drm/i915/i915_reg.h               |  30 +-
>>include/uapi/drm/i915_drm.h                   |  33 +++
>>9 files changed, 728 insertions(+), 88 deletions(-)
>>
>>-- 
>>2.20.1
>>