[Intel-gfx] [PATCH v6 00/23] Add support for GuC-based SLPC

Sagar Arun Kamble sagar.a.kamble at intel.com
Thu Mar 16 18:28:04 UTC 2017


SLPC (Single Loop Power Controller) is a replacement for some host-based
power management features. The SLPC implementation runs in firmware on GuC.
This series has been tested with SKL/APL/KBL GuC firmware v9.

The graphics power management features in SLPC in this version are called
GTPERF, BALANCER, and DCC.

GTPERF is a combination of DFPS (Dynamic FPS) and Turbo. DFPS adjusts
requested graphics frequency to maintain target framerate. Turbo adjusts
requested graphics frequency to maintain target GT busyness.

BALANCER adjusts balance between power budgets for IA and GT in power
limited scenarios.

DCC (Duty Cycle Control) adjusts requested graphics frequency and stalls
guc-scheduler to maintain actual graphics frequency in efficient range.

This patch series activates only GTPERF Turbo in GuC SLPC.

v2: Addressed review comments on v1. Removed patch to enable SLPC by
    default.

v3: Addressed WARNING in igt at drv_module_reload_basic flagged by trybot BAT.
    Added change for sanitizing GT PM during reset. Added separate patch
    for sysfs interface to know HW requested frequency. Also, earlier
    patches did not go as series hence were not correctly picked up by BAT.

v4: Changes to multiple patches. CI BAT is passing. Performance run on SKL
    GT2 done and shows perf at parity with Host Turbo. For BXT, SLPC
    improves performance when GuC is enabled compared to Host Turbo.
    This series keeps only support of 9.18 firmware for better readability.
    If needed, other SLPC interfaces for different GuC version will be
    added later.

v5: This series incorporates feedback from code reviews on earlier series
    and adds following new changes:
	1. More changes for separation of RPS and RC6 handling for Gen9.
	2. Tied up SLPC enabling with GuC load/GuC submission sequence.
	3. SLPC structures are defined explicitly for event input/output.
	4. Definition of SLPC parameter control and task control functions
	   agnostic to the underlying param definitions as they might
	   change with GuC versions and prepared helpers for common tasks.
	5. Transition of i915 overrides done through host to guc events
	   to shared data and single reset event.
	6. Handling SLPC status post reset through shared memory.
	7. Derived helpers for setting frequency limits.
	8. Removed sysfs interface to know RPNSWREQ as it is available in
	   debugfs interface i915_frequency_info.
	9. Simple igt test to verify SLPC configuration by i915 in various
	   driver scenarios is prepared.

v6: This series adds following new changes:
	1. Updated intel_guc_send for SLPC to receive output data from GuC.
	2. Added task overrides and min frequency overrides in intel_slpc_init.
	   min frequency is set to Rpe.
	3. New debugfs interface added to set/unset/read SLPC parameters
	   other than tasks and frequencies. SLPC reset post parameter update
	   added.
	4. SLPC parameters persist as part of i915-GuC shared data hence not
	   overriding frequency limits while re-enabling SLPC.
	5. Other minor fixes to clear pm_rps_events, clflush the shared data.
	   
VIZ-6889, VIZ-6890

Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter at intel.com>
Cc: Beuchat, Marc <marc.beuchat at intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg at intel.com>
Cc: Jeff McGee <jeff.mcgee at intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Oscar Mateo <oscar.mateo at intel.com>
Cc: Michał Winiarski <michal.winiarski at intel.com>

Sagar Arun Kamble (12):
  drm/i915/debugfs: Create generic string tokenize function and update
    CRC control parsing
  drm/i915/gen9: Separate RPS and RC6 handling
  drm/i915/slpc: Use intel_slpc_* functions if supported
  drm/i915/slpc: Allocate/Release/Initialize SLPC shared data
  drm/i915/slpc: Add SLPC banner to RPS debugfs interfaces.
  drm/i915/slpc: Add SLPC communication interfaces
  drm/i915/slpc: Send RESET event to enable SLPC
  drm/i915/slpc: Add parameter set/unset/get functions
  drm/i915/slpc: Add debugfs support to read/write/revert the parameters
  drm/i915/slpc: Add support for min/max frequency control
  drm/i915/slpc: Set default values for tasks and min frequency
    parameters
  drm/i915/slpc: Add Kabylake SLPC support

Tom O'Rourke (11):
  drm/i915/slpc: Add has_slpc capability flag
  drm/i915/slpc: Add enable_slpc module parameter
  drm/i915/slpc: Sanitize GuC version
  drm/i915/slpc: Enable SLPC in GuC if supported
  drm/i915/slpc: If using SLPC, do not set frequency
  drm/i915/slpc: Send SHUTDOWN event
  drm/i915/slpc: Add enable/disable controls for SLPC tasks
  drm/i915/slpc: Add i915_slpc_info to debugfs
  drm/i915/slpc: Add SKL SLPC Support
  drm/i915/slpc: Add Broxton SLPC support
  drm/i915/slpc: Enable SLPC, where supported

 drivers/gpu/drm/i915/Makefile              |   3 +-
 drivers/gpu/drm/i915/i915_debugfs.c        | 240 ++++++-
 drivers/gpu/drm/i915/i915_drv.c            |   8 +-
 drivers/gpu/drm/i915/i915_drv.h            |   8 +
 drivers/gpu/drm/i915/i915_gem.c            |   8 +
 drivers/gpu/drm/i915/i915_guc_submission.c |   3 +
 drivers/gpu/drm/i915/i915_params.c         |   6 +
 drivers/gpu/drm/i915/i915_params.h         |   1 +
 drivers/gpu/drm/i915/i915_pci.c            |   5 +
 drivers/gpu/drm/i915/i915_sysfs.c          |  36 +-
 drivers/gpu/drm/i915/intel_drv.h           |   1 +
 drivers/gpu/drm/i915/intel_guc_loader.c    |   3 +
 drivers/gpu/drm/i915/intel_pipe_crc.c      |  88 +--
 drivers/gpu/drm/i915/intel_pm.c            | 109 +++-
 drivers/gpu/drm/i915/intel_slpc.c          | 962 +++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_slpc.h          | 268 ++++++++
 drivers/gpu/drm/i915/intel_uc.c            |  65 +-
 drivers/gpu/drm/i915/intel_uc.h            |   5 +
 18 files changed, 1746 insertions(+), 73 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_slpc.c
 create mode 100644 drivers/gpu/drm/i915/intel_slpc.h

-- 
1.9.1



More information about the Intel-gfx mailing list