Xe GT Frequency Management

This component is responsible for the raw GT frequency management, includingthe sysfs API.

Underneath, Xe enables GuC SLPC automated frequency management. GuC is thenallowed to request PCODE any frequency between the Minimum and the Maximumselected by this component. Furthermore, it is important to highlight thatPCODE is the ultimate decision maker of the actual running frequency, basedon thermal and other running conditions.

Xe’s Freq provides a sysfs API for frequency management under<device>/tile#/gt#/freq0/ directory.

Read-only attributes:

  • act_freq: The actual resolved frequency decided by PCODE.

  • cur_freq: The current one requested by GuC PC to the PCODE.

  • rpn_freq: The Render Performance (RP) N level, which is the minimal one.

  • rpa_freq: The Render Performance (RP) A level, which is the achievable one.

    Calculated by PCODE at runtime based on multiple running conditions

  • rpe_freq: The Render Performance (RP) E level, which is the efficient one.

    Calculated by PCODE at runtime based on multiple running conditions

  • rp0_freq: The Render Performance (RP) 0 level, which is the maximum one.

Read-write attributes:

  • min_freq: Min frequency request.

  • max_freq: Max frequency request.

    If max <= min, then freq_min becomes a fixed frequencyrequest.

The GT frequency may be throttled by hardware/firmware for various reasonsthat are provided through attributes under thefreq0/throttle/ directory.Their availability depend on the platform and some may not be visible if thatreason is not available.

Thereasons attribute can be used by sysadmin to monitor all possiblereasons for throttling and report them. It’s preferred over monitoringstatus and then reading the reason from individual attributes since thatis racy. If there’s no throttling happening, “none” is returned.

The following attributes are available on Crescent Island platform:

  • status: Overall throttle status (0: no throttling, 1: throttling)

  • reasons: Array of reasons causing throttling separated by space

  • reason_pl1: package PL1

  • reason_pl2: package PL2

  • reason_pl4: package PL4

  • reason_prochot: prochot

  • reason_soc_thermal: SoC thermal

  • reason_mem_thermal: Memory thermal

  • reason_vr_thermal: VR thermal

  • reason_iccmax: ICCMAX

  • reason_ratl: RATL thermal algorithm

  • reason_soc_avg_thermal: SoC average temp

  • reason_fastvmode: VR is hitting FastVMode

  • reason_psys_pl1: PSYS PL1

  • reason_psys_pl2: PSYS PL2

  • reason_p0_freq: P0 frequency

  • reason_psys_crit: PSYS critical

Other platforms support the following reasons:

  • status: Overall throttle status (0: no throttling, 1: throttling)

  • reasons: Array of reasons causing throttling separated by space

  • reason_pl1: package PL1

  • reason_pl2: package PL2

  • reason_pl4: package PL4, Iccmax etc.

  • reason_thermal: thermal

  • reason_prochot: prochot

  • reason_ratl: RATL hermal algorithm

  • reason_vr_thermalert: VR THERMALERT

  • reason_vr_tdc: VR TDC

Internal API

intxe_gt_freq_init(structxe_gt*gt)

Initialize Xe Freq component

Parameters

structxe_gt*gt

Xe GT object

Description

It needs to be initialized after GT Sysfs and GuC PC components are ready.

Return

Returns error value for failure and 0 for success.