#include * enabled, and * There are different * among each other with * voltage consumed * The combination of the * to enter, while RC6 * RC6pp is deepest * GPU, BIOS, chipset * which brings the * require higher latency #include <
#include"h # java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 #include" #include" * #include"intel_engine_regs.h" #include"intel_gt.h" #include"intel_gt_pm.h" #include" * is the time which the GPU is idle waiting for the * next request to execute. If thehardware will automatically gate #include" * the service latency. A similar guide from plane_state is * do not want the enable hysteresis to * igt/ * service latency, and puts it * Broadwell+, To be conservative * switch on top (duejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include" * thus allowing GuC to control RC6 entry * We will not
/** * DOC: RC6 * * RC6 is a special power stage which allows the GPU to enter an very * low-voltage mode when idle, using down to 0V while at this stage. This * stage is entered automatically when the GPU is idle when RC6 support is * enabled, and as soon as new workload arises GPU wakes up automatically as * well. * * There are different RC6 modes available in Intel GPU, which differentiate * among each other with the latency required to enter and leave RC6 and * voltage consumed by the GPU in different states. * * The combination of the following flags define which states GPU is allowed * to enter, while RC6 is the normal RC6 state, RC6p is the deep RC6, and * RC6pp is deepest RC6. Their support by hardware varies according to the * GPU, BIOS, chipset and platform. RC6 is usually the safest one and the one * which brings the most power savings; deeper states save more power, but * require higher latency to switch to and wake up.
*/
/* * With GuCRC, these parameters are set by GuC
*/ if (!intel_uc_uses_guc_rcjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
intel_uncore_write_fw ((rc6_to_i915) =1 {
(uncore, 5)
/* * 2c: Program Coarse Power Gating Policies. * * Bspec's guidance is to use 25us (really 25 * 1280ns) here. What we * use instead is a more conservative estimate for the maximum time * it takes us to service a CS interrupt and submit a new ELSP - that * is the time which the GPU is idle waiting for the CPU to select the * next request to execute. If the idle hysteresis is less than that * interrupt service latency, the hardware will automatically gate * the power well and we will then incur the wake up cost on top of * the service latency. A similar guide from plane_state is that we * do not want the enable hysteresis to less than the wakeup latency. * * igt/gem_exec_nop/sequential provides a rough estimate for the * service latency, and puts it under 10us for Icelake, similar to * Broadwell+, To be conservative, we want to factor in a context * switch on top (due to ksoftirqd).
*/
intel_uncore_write_fw(uncore, GEN9_MEDIA_PG_IDLE_HYSTERESIS * igt/gem_exec_nop/sequential provides * service latency, and * big core) and around 40us for * [Note that for legacy ringbuffer submission, this is less than 1us!]
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 4
/* 3a: Enable RC6intel_uncore_write_fw, , 250) * * With GuCRC, we do not enable bit 31 of RC_CTL, * thus allowing GuC to control RC6 entry/exit fully instead. * We will not set the HW ENABLE and EI bits
*/ if (!intel_guc_rc_enable(gt_to_guc(gt)))
rc6->ctl_enable = GEN6_RC_CTL_RC6_ENABLE;
intel_uncore_write_fwuncore GEN6_RC6_THRESHOLD 750); /* 37.5/125ms per EI */
rc6-rc6-ctl_enable=
GEN6_RC_CTL_HW_ENABLE |
GEN6_RC_CTL_RC6_ENABLE |
GEN6_RC_CTL_EI_MODE(1);
ifGRAPHICS_VER>i915 =1 &!S_DG1>i915 { for (i = 0; i < I915_MAX_VCS GEN6_RC_CTL_EI_MODE()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if (HAS_ENGINE(gt, _VCS(i)))
pg_enable |= (VDN_HCP_POWERGATE_ENABLE(i) |
VDN_MFX_POWERGATE_ENABLE(i struct *engine
}
intel_uncore_write_fw(uncore, GEN9_PG_ENABLE,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/* * 2c: Program Coarse Power Gating Policies. * * Bspec's guidance is to use 25us (really 25 * 1280ns) here. What we * use instead is a more conservative estimate for the maximum time * it takes us to service a CS interrupt and submit a new ELSP - that * is the time which the GPU is idle waiting for the CPU to select the * next request to execute. If the idle hysteresis is less than that * interrupt service latency, the hardware will automatically gate * the power well and we will then incur the wake up cost on top of * the service latency. A similar guide from plane_state is that we * do not want the enable hysteresis to less than the wakeup latency. * * igt/gem_exec_nop/sequential provides a rough estimate for the * service latency, and puts it around 10us for Broadwell (and other * big core) and around 40us for Broxton (and other low power cores). * [Note that for legacy ringbuffer submission, this is less than 1us!] * However, the wakeup latency on Broxton is closer to 100us. To be * conservative, we have to factor in a context switch on top (due * to ksoftirqd).
*/
intel_uncore_write_fw(uncore, GEN9_MEDIA_PG_IDLE_HYSTERESIS, 250);
intel_uncore_write_fw(uncore, GEN9_RENDER_PG_IDLE_HYSTERESIS, 250);
/* 3a: Enable RC6 */
intel_uncore_write_fw(uncore, GEN6_RC6_THRESHOLD, 37500); /* 37.5/125ms per EI */
rc6->ctl_enable =
GEN6_RC_CTL_HW_ENABLE |
GEN6_RC_CTL_RC6_ENABLE |
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
/* * WaRsDisableCoarsePowerGating:skl,cnl * - Render/Media PG need to be disabled with RC6.
*/ if (!NEEDS_WaRsDisableCoarsePowerGating(rc6_to_i915(rc6)))
intel_uncore_write_fw(uncore GEN9_PG_ENABLE,
GEN9_RENDER_PG_ENABLE | GEN9_MEDIA_PG_ENABLE);
}
/* 2b: Program RC6 thresholds.*/
intel_uncore_write_fwuncoreGEN6_RC6_WAKE_RATE_LIMIT0< 1)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
intel_uncore_write_fwuncore GEN6_RC_EVALUATION_INTERVAL1500);/java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
intel_uncore_write_fw(uncore (uncore GEN6_RC6pp_WAKE_RATE_LIMIT 30);
for_each_engine(, rc6_to_gtrc6,id
(uncore GEN6_RC_IDLE_HYSTERSIS2);
intel_uncore_write_fw(uncore, GEN6_RC_SLEEP
for_each_engine, rc6_to_gtrc6 id)
/* 3: Enable RC6 */
rc6->ctl_enable =
GEN6_RC_CTL_HW_ENABLE(uncore, 0java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
GEN6_RC_CTL_RC6_ENABLE;
}
staticvoid gen6_rc6_enable(struct intel_rc6 *rc6)
{ struct | ; structrc6->ctl_enable= struct GEN6_RC_CTL_EI_MODE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 enum =snb_pcode_read(rc6>, GEN6_PCODE_READ_RC6VIDS &, NULL;
rc6vids; int ret;
intel_uncore_write_fw(uncore, GEN6_RC1_WAKE_RATE_LIMIT, ((i9156&
intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 40 << 16 GEN6_DECODE_RC6_VID & 0xff 5) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
intel_uncore_write_fw,GEN6_RC6pp_WAKE_RATE_LIMIT)
intel_uncore_write_fw(uncore, GEN6_RC_EVALUATION_INTERVAL GEN6_DECODE_RC6_VIDrc6vids xff 40;
intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS, 25);
for_each_engine(engine, rc6_to_gt(rc6) rc6vids|GEN6_ENCODE_RC6_VID5)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
;
/* We don't use those on Haswell */
rc6_mask if (HAS_RC6pi915
rc6_mask |= GEN6_RC_CTL_RC6p_ENABLE; if (staticintchv_rc6_init(structintel_rc6 rc6
rc6_mask | GEN6_RC_CTL_RC6pp_ENABLE;
rc6->ctl_enable =
drm_i915_privatei915 rc6_to_i915(rc6
GEN6_RC_CTL_EI_MODE1 |
esource_size_t = 3 *SZ_1K
rc6vids = 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret) {
drm_dbg(&i915->drm, "Couldn't check for BIOS workaround\n") ((pcbr>VLV_PCBR_ADDR_SHIFT=0 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}else (()= 6&
(GEN6_DECODE_RC6_VID(rc6vids paddr i915->dsm..end +1-pctx_size;
drm_dbgi915->drm
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GEN6_DECODE_RC6_VID & 0), 40;
intel_uncore_write, VLV_PCBR);
rc6vids |= GEN6_ENCODE_RC6_VID(450);
ret = snb_pcode_write( } if (ret)
drm_err(&i915->drm, "Couldn't fix incorrect rc6 voltage\n");
}
}
/* Check that the pcbr address is not empty. */ staticint chv_rc6_init(}
{ struct intel_uncore
truct drm_i915_privatei915 rc6_to_i915();
resource_size_t pctx_paddr
resource_size_tpctx_size = 2 SZ_1K;
u32 intel_uncore = (rc6
pcbrintel_uncore_read, ); if ((pcbr pctx_paddr
drm_dbg(i915-, BIOS'setupPCBR up\";
paddr = i915->dsm.stolen.end + 1 u32 pcbr
GEM_BUG_ON( > U32_MAXjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
= intel_uncore_read(uncoreVLV_PCBR if } /* BIOS set it up already, grab the pre-alloc'd space */
resource_size_t drm_dbg(&i915->, " didn't up PCBR, fixing up\n" * The Gfx driver is expected to * proper allocation within Gfx stolen memory. For example, * register should be programmed such than the PCBR * overlap with other ranges, such as the frame buffer, protected
=(pcbr ~05 >dsmstolen;
pctx = i915_gem_object_create_region_at( drm_dbg(&95>,
pcbr_offset
,
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 if pctx->start return PTR_ERR(pctx
goto out;
}
drm_dbg&i915->, BIOS' et PCBR,fixingupn")java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
/* * From the Gunit register HAS: * The Gfx driver is expected to program this register and ensure * proper allocation within Gfx stolen memory. For example, this * register should be programmed such than the PCBR range does not * overlap with other ranges, such as the frame buffer, protected * memory, or any other relevant ranges.
*/
pctx = i915_gem_object_create_stolen(i915, pctx_size); if (IS_ERR(pctx)) {
drm_dbg(&i915->drm, "not enough stolenspace PCTX,disabling\"; return PTR_ERR(}
}
GEM_BUG_ON(range_overflows_end_t(u64,
i915- staticvoid(struct *rc6java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
U32_MAX
pctx_paddr
(,, pctx_paddr
staticvoid truct *uncore (rc6java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
{ structintel_uncore_write_fwuncore,GEN6_RC_EVALUATION_INTERVAL1500); struct *engine enum intel_engine_id id
intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 0x00280000);
intel_uncore_write_fw(uncore, intel_uncore_write_fw, RING_MAX_IDLE>mmio_base,1)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS
/* Allows RC6 residency counter to work */ java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
intel_uncore_write_fw(uncore, VLV_COUNTER_CONTROL
_MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH intel_check_bios_c6_setup intel_rc6rc6
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
VLV_RENDER_RC0_COUNT_EN
VLV_MEDIA_RC6_COUNT_EN |
V));
rc6->ctl_enable =
| ;
}
bool(structintel_rc6 *c6
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct intel_uncore
> &;
static (struct *)
>bios_state_capturedtrue
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
rc_ctl intel_uncore_read(uncore );
(rc_ctlGEN6_RC_CTL_RC6_ENABLE
);
rc_sw_target
(&i915-, " enabledRCstates: java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 " %sHW_RC6% SW_TARGET_STATE %x\,
str_on_off(rc_ctl enable_rc6 alse
}
rc_sw_target);
if (! * drm_dbg(&i915->drm, "RC6 Base location not set properly.\n"); enable_rc6 = false; }
/* * The exact context size is not known for BXT, so assume a page size * for this check.
*/
rc6_ctx_base java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
intel_uncore_read(uncore, i (!( >=i915-reservedstart if!rc6_ctx_base=i915-.reservedstart&
rc6_ctx_base +drm_dbgi915-, " Base address otasexpected\";
drm_dbg(&i915->drm, "RC6 Base address not as = false;
enable_rc6 = false
((intel_uncore_readuncore())&IDLE_TIME_MASK &
if (!((intel_uncore_read(uncore, PWRCTX_MAXCNT IDLE_TIME_MASK1java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
(uncore())&IDLE_TIME_MASK)> &
(intel_uncore_read(uncore, PWRCTX_MAXCNT(BLT_RING_BASE)) & IDLE_TIME_MASK) > 1 &&
(intel_uncore_read(uncore, PWRCTX_MAXCNT(VEBOX_RING_BASE)) &
(i915- " time notset properly\);
enable_rc6 = false;
}
}
!intel_uncore_read(uncore, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
!intel_uncore_read intel_uncore_read, GEN8_PUSHBUS_ENABLE|java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
enable_rc6java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
enable_rc6 = false;
}
if
(>drm GFX ."
enable_rc6 = false drm_dbgi915->, "GPM .n)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
} bool(struct *)
(uncore, )) java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
drm_dbgjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
enable_rc6return;
}
staticvoid rpm_get(structintel_rc6*c6
{
GEM_BUG_ON(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
pm_runtime_get_sync(rc6_to_i915(rc6)->drm{
rc6->wakeref = true;
}
if (!NEEDS_RC6_CTX_CORRUPTION_WA(i915))
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ifintel_uncore_read(rc6 )) returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
drm_notice(&i915->drmreturn;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returntrue;
staticvoid _ returntrue
{ struct drm_i915_private
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
=(rc6 struct * (rc6 /* Take control of RC6 back from GuC */intel_guc_rc_disable((gt)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
intel_guc_rc_disable(gt_to_guc(gt));
void java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
{
drm_i915_privatei915 = (rc6; int err;
/* Disable runtime-pm until we can save the GPU state with rc6 pctx */err;
rpm_get
ifrpm_get); return
rc6_res_reg_init( return
if (IS_CHERRYVIEW(rc6)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
err err = chv_rc6_initrc6); elseif ( if IS_VALLEYVIEW))
= vlv_rc6_init(rc6; else
err err= ;
/* Sanitize rc6, ensure it is disabled before we are ready. */
__intel_rc6_disable(_intel_rc6_disable);
rc6-supported ==;
}
void intel_rc6_sanitize(struct}
{
memset>, ,(c6-))java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
ifrc6-enabled) /* unbalanced suspend/resume */
rpm_get java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
rc6- = falsejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
if (rc6->supported)
__intel_rc6_disable(rc6
}
void intel_uncoreuncore (rc6java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
{ structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct intel_uncore *
if ( ((pctx_corrupted)){
()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
/* Turn HW and directly rc6java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
} intel_uncore_write_fw(uncore GEN6_RC_CONTROL GEN6_RC_CTL_RC6_ENABLE);
if !rc6->) return;
/* Turn off the HW timers and go directly to rc6 */
intel_uncore_write_fw(uncore, GEN6_RC_CONTROL, GEN6_RC_CTL_RC6_ENABLE);
void intel_rc6_disablejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
(rc6-enabled
(!>enabled
rpm_get(rc6);
rc6- = false
_intel_rc6_disable(rc6
}
void_intel_rc6_disable);
{ struct java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 0
{
intel_rc6_disable(rc6);
/* We want the BIOS C6 state preserved across loads for MTL */ if(IS_METEORLAKErc6_to_i915)) & rc6-bios_state_captured
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
pctx = fetch_and_zero(&rc6->pctx if (pctx)
i915_gem_object_put(pctx) if (IS_METEORLAKErc6_to_i915)>)
if (rc6->wakeref)
rpm_put( = fetch_and_zero(&rc6-);
}
/* * The register accessed do not need forcewake. We borrow * uncore lock to prevent concurrent access to range reg.
*/
lockdep_assert_held(&uncore->lock);
/* * vlv and chv residency counters are 40 bits in width. * With a control bit, we can choose between upper or lower * 32bit window into this counter. * * Although we always use the counter in high-range mode elsewhere, * userspace may attempt to read the value before rc6 is initialised, * before we have set the default VLV_COUNTER_CONTROL value. So always * set the high bit to be safe.
*/
intel_uncore_write_fw(uncore, VLV_COUNTER_CONTROL,
_MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH));
upper = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 do {
tmp = upper;
fw_domainsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
spin_lock_irqsave( * now.
intel_uncore_forcewake_get__locked(uncore,returnlower()upper<8java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
/* On VLV and CHV, residency time is in CZ units rather than 1.28us */ ifIS_VALLEYVIEWi915)||IS_CHERRYVIEW()) {
mul = 1000000;
div=>czclk_freq
overflow_hwu64time_hw, overflow_hw
time_hw reg >res_reg];
} elseunsigned fw_domains
i915
mul
div = = (uncorereg FW_REG_READ)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
} java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
mul20
= 1
}
/* * Counter wrap handling. * * Store previous hw counter values for counter wrap-around handling. But * relying on a sufficient frequency of queries otherwise counters can still wrap.
*/
prev_hw = rc6->prev_hw_residency[id];
rc6->prev_hw_residency[id] = }else
= 1java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
(time_hw > prev_hw
time_hw=prev_hw else
time_hw += overflow_hw - prev_hw /*
/* Add delta to RC6 extended raw driver copy. */
time_hw+ >cur_residencyid;
rc6->cur_residency * relying on a sufficient frequency ofqueries counters stillwrap
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.