drm/i915/gt: Update PMINTRMSK holding fw
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/54 drm/i915/gt: Update PMINTRMSK holding fw
From: Chris Wilson <[email protected]>
If we use a non-forcewaked write to PMINTRMSK, it does not take effect until much later, if at all, causing a loss of RPS interrupts and no GPU reclocking, leaving the GPU running at the wrong frequency for long periods of time.
--- drivers/gpu/drm/i915/gt/intel_rps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/intel_rps.c +4 -2
@@ -85,7 +85,8 @@ static void rps_enable_interrupts(struct intel_rps *rps)gen6_gt_pm_enable_irq (gt, rps->pm_events);spin_unlock_irq (>->irq_lock); -set (gt->uncore,GEN6_PMINTRMSK ,rps_pm_mask (rps, rps->cur_freq)); +intel_uncore_write (gt->uncore, +GEN6_PMINTRMSK ,rps_pm_mask (rps, rps->last_freq)); }static void gen6_rps_reset_interrupts (struct intel_rps *rps)
@@ -119,7 +120,8 @@ static void rps_disable_interrupts(struct intel_rps *rps) rps->pm_events =0 ; -set (gt->uncore,GEN6_PMINTRMSK ,rps_pm_sanitize_mask (rps, ~0u )); +intel_uncore_write (gt->uncore, +GEN6_PMINTRMSK ,rps_pm_sanitize_mask (rps, ~0u ));spin_lock_irq (>->irq_lock);gen6_gt_pm_disable_irq (gt,GEN6_PM_RPS_EVENTS );
PATCH 4/54 drm/i915/gt: Treat idling as a RPS downclock event
In reply to a message not in the archiveFrom: Chris Wilson <[email protected]>
If we park/unpark faster than we can respond to RPS events, we never will process a downclock event after expiring a waitboost, and thus we will forever restart the GPU at max clocks even if the workload switches and doesn't justify full power.
--- drivers/gpu/drm/i915/gt/intel_rps.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/i915/gt/intel_rps.c +13 -0
@@ -768,6 +768,19 @@ void intel_rps_park(struct intel_rps *rps)intel_uncore_forcewake_get (rps_to_uncore (rps),FORCEWAKE_MEDIA );rps_set (rps, rps->idle_freq, false);intel_uncore_forcewake_put (rps_to_uncore (rps),FORCEWAKE_MEDIA ); + +/* +* Since we will try and restart from the previously requested +* frequency on unparking, treat this idle point as a downclock +* interrupt and reduce the frequency for resume. If we park/unpark +* more frequently than the rps worker can run, we will not respond +* to any EI and never see a change in frequency. +* +* (Note we accommodate Cherryview's limitation of only using an +* even bin by applying it to all.) +*/ + rps->cur_freq = +max_t (int,round_down (rps->cur_freq -1 ,2 ), rps->min_freq); }void intel_rps_boost (struct i915_request *rq)