* [CI 1/2] drm/i915: Kick the rps worker when changing the boost frequency
@ 2018-03-08 14:26 Chris Wilson
2018-03-08 14:26 ` [CI 2/2] drm/i915: Index the ring frequency table by HW frequency range Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2018-03-08 14:26 UTC (permalink / raw)
To: intel-gfx
The boost frequency is only applied from the RPS worker while someone is
waiting on a request and requested a boost. As such, when the user
wishes to change the frequency, we have to kick the worker in order to
re-evaluate whether to apply the boost frequency.
v2: Check num_waiters to decide if we should kick the worker to handle
boosting.
Fixes: 29ecd78d3b79 ("drm/i915: Define a separate variable and control for RPS waitboost frequency")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/i915_sysfs.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index b33d2158c234..e5e6f6bb2b05 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -304,8 +304,9 @@ static ssize_t gt_boost_freq_mhz_store(struct device *kdev,
{
struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
struct intel_rps *rps = &dev_priv->gt_pm.rps;
- u32 val;
+ bool boost = false;
ssize_t ret;
+ u32 val;
ret = kstrtou32(buf, 0, &val);
if (ret)
@@ -317,8 +318,13 @@ static ssize_t gt_boost_freq_mhz_store(struct device *kdev,
return -EINVAL;
mutex_lock(&dev_priv->pcu_lock);
- rps->boost_freq = val;
+ if (val != rps->boost_freq) {
+ rps->boost_freq = val;
+ boost = atomic_read(&rps->num_waiters);
+ }
mutex_unlock(&dev_priv->pcu_lock);
+ if (boost)
+ schedule_work(&rps->work);
return count;
}
--
2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [CI 2/2] drm/i915: Index the ring frequency table by HW frequency range
2018-03-08 14:26 [CI 1/2] drm/i915: Kick the rps worker when changing the boost frequency Chris Wilson
@ 2018-03-08 14:26 ` Chris Wilson
2018-03-08 15:04 ` ✓ Fi.CI.BAT: success for series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency Patchwork
2018-03-08 19:32 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-03-08 14:26 UTC (permalink / raw)
To: intel-gfx
When reporting the frequency table stored in the punit, report the full
range and not just the user restricted frequency range. In the process
keep the code to set the frequency table and read it the same.
v3: As we haven't separated the sb_lock from the pcu_lock yet, there's a
cycle between the pcu_lock and intel_runtime_pm_get.
References: f936ec34dea8 ("drm/i915/skl: Updated the i915_ring_freq_table debugfs function")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> #v1
---
drivers/gpu/drm/i915/i915_debugfs.c | 13 ++++++-------
drivers/gpu/drm/i915/intel_pm.c | 9 ++++-----
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 89f7ff2c652e..d8bc1bb30cb4 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1796,9 +1796,9 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)
{
struct drm_i915_private *dev_priv = node_to_i915(m->private);
struct intel_rps *rps = &dev_priv->gt_pm.rps;
- int ret = 0;
- int gpu_freq, ia_freq;
unsigned int max_gpu_freq, min_gpu_freq;
+ int gpu_freq, ia_freq;
+ int ret;
if (!HAS_LLC(dev_priv))
return -ENODEV;
@@ -1809,13 +1809,12 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)
if (ret)
goto out;
+ min_gpu_freq = rps->min_freq;
+ max_gpu_freq = rps->max_freq;
if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv)) {
/* Convert GT frequency to 50 HZ units */
- min_gpu_freq = rps->min_freq_softlimit / GEN9_FREQ_SCALER;
- max_gpu_freq = rps->max_freq_softlimit / GEN9_FREQ_SCALER;
- } else {
- min_gpu_freq = rps->min_freq_softlimit;
- max_gpu_freq = rps->max_freq_softlimit;
+ min_gpu_freq /= GEN9_FREQ_SCALER;
+ max_gpu_freq /= GEN9_FREQ_SCALER;
}
seq_puts(m, "GPU freq (MHz)\tEffective CPU freq (MHz)\tEffective Ring freq (MHz)\n");
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index b8da4dcdd584..dd5ddb77b306 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -6918,13 +6918,12 @@ static void gen6_update_ring_freq(struct drm_i915_private *dev_priv)
/* convert DDR frequency from units of 266.6MHz to bandwidth */
min_ring_freq = mult_frac(min_ring_freq, 8, 3);
+ min_gpu_freq = rps->min_freq;
+ max_gpu_freq = rps->max_freq;
if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv)) {
/* Convert GT frequency to 50 HZ units */
- min_gpu_freq = rps->min_freq / GEN9_FREQ_SCALER;
- max_gpu_freq = rps->max_freq / GEN9_FREQ_SCALER;
- } else {
- min_gpu_freq = rps->min_freq;
- max_gpu_freq = rps->max_freq;
+ min_gpu_freq /= GEN9_FREQ_SCALER;
+ max_gpu_freq /= GEN9_FREQ_SCALER;
}
/*
--
2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency
2018-03-08 14:26 [CI 1/2] drm/i915: Kick the rps worker when changing the boost frequency Chris Wilson
2018-03-08 14:26 ` [CI 2/2] drm/i915: Index the ring frequency table by HW frequency range Chris Wilson
@ 2018-03-08 15:04 ` Patchwork
2018-03-08 19:32 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-03-08 15:04 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency
URL : https://patchwork.freedesktop.org/series/39607/
State : success
== Summary ==
Series 39607v1 series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency
https://patchwork.freedesktop.org/api/1.0/series/39607/revisions/1/mbox/
---- Known issues:
Test debugfs_test:
Subgroup read_all_entries:
incomplete -> PASS (fi-snb-2520m) fdo#103713
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> FAIL (fi-cfl-s2) fdo#100368
Test kms_frontbuffer_tracking:
Subgroup basic:
fail -> PASS (fi-cnl-y3) fdo#103167
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:421s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:420s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:370s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:500s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:277s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:491s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:493s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:479s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:469s
fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:405s
fi-cfl-s2 total:288 pass:261 dwarn:0 dfail:0 fail:1 skip:26 time:581s
fi-cfl-u total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:507s
fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:581s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:420s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:290s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:517s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:397s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:406s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:470s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:419s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:467s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:461s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:513s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:583s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:436s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:526s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:531s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:493s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:480s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:424s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:427s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:527s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:389s
da319f89899feb1b6206d7092b10189a926a893c drm-tip: 2018y-03m-08d-12h-49m-27s UTC integration manifest
d4b2580b39b2 drm/i915: Index the ring frequency table by HW frequency range
8457b47e04ec drm/i915: Kick the rps worker when changing the boost frequency
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8274/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency
2018-03-08 14:26 [CI 1/2] drm/i915: Kick the rps worker when changing the boost frequency Chris Wilson
2018-03-08 14:26 ` [CI 2/2] drm/i915: Index the ring frequency table by HW frequency range Chris Wilson
2018-03-08 15:04 ` ✓ Fi.CI.BAT: success for series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency Patchwork
@ 2018-03-08 19:32 ` Patchwork
2018-03-08 19:41 ` Chris Wilson
2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2018-03-08 19:32 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency
URL : https://patchwork.freedesktop.org/series/39607/
State : success
== Summary ==
---- Possible new issues:
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-spr-indfb-draw-render:
fail -> PASS (shard-apl)
---- Known issues:
Test gem_eio:
Subgroup in-flight-contexts:
pass -> INCOMPLETE (shard-apl) fdo#105341 +1
Test kms_flip:
Subgroup flip-vs-expired-vblank:
pass -> FAIL (shard-hsw) fdo#102887 +2
Subgroup plain-flip-fb-recreate-interruptible:
pass -> FAIL (shard-hsw) fdo#100368
Test kms_rotation_crc:
Subgroup primary-rotation-180:
fail -> PASS (shard-snb) fdo#103925
Subgroup sprite-rotation-90-pos-100-0:
fail -> PASS (shard-apl) fdo#105185 +3
Test pm_lpsp:
Subgroup screens-disabled:
fail -> PASS (shard-hsw) fdo#104941
fdo#105341 https://bugs.freedesktop.org/show_bug.cgi?id=105341
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#104941 https://bugs.freedesktop.org/show_bug.cgi?id=104941
shard-apl total:3308 pass:1739 dwarn:1 dfail:0 fail:9 skip:1556 time:11399s
shard-hsw total:3467 pass:1769 dwarn:1 dfail:0 fail:5 skip:1691 time:11820s
shard-snb total:3380 pass:1325 dwarn:2 dfail:0 fail:1 skip:2051 time:6805s
Blacklisted hosts:
shard-kbl total:3308 pass:1829 dwarn:28 dfail:2 fail:9 skip:1438 time:8525s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8274/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ✓ Fi.CI.IGT: success for series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency
2018-03-08 19:32 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-03-08 19:41 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-03-08 19:41 UTC (permalink / raw)
To: Patchwork; +Cc: intel-gfx
Quoting Patchwork (2018-03-08 19:32:29)
> == Series Details ==
>
> Series: series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency
> URL : https://patchwork.freedesktop.org/series/39607/
> State : success
>
> == Summary ==
>
> ---- Possible new issues:
>
> Test kms_frontbuffer_tracking:
> Subgroup fbc-1p-primscrn-spr-indfb-draw-render:
> fail -> PASS (shard-apl)
>
> ---- Known issues:
>
> Test gem_eio:
> Subgroup in-flight-contexts:
> pass -> INCOMPLETE (shard-apl) fdo#105341 +1
> Test kms_flip:
> Subgroup flip-vs-expired-vblank:
> pass -> FAIL (shard-hsw) fdo#102887 +2
> Subgroup plain-flip-fb-recreate-interruptible:
> pass -> FAIL (shard-hsw) fdo#100368
> Test kms_rotation_crc:
> Subgroup primary-rotation-180:
> fail -> PASS (shard-snb) fdo#103925
> Subgroup sprite-rotation-90-pos-100-0:
> fail -> PASS (shard-apl) fdo#105185 +3
> Test pm_lpsp:
> Subgroup screens-disabled:
> fail -> PASS (shard-hsw) fdo#104941
Much better. Thanks for the review, pushed and back to the main series.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-03-08 19:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 14:26 [CI 1/2] drm/i915: Kick the rps worker when changing the boost frequency Chris Wilson
2018-03-08 14:26 ` [CI 2/2] drm/i915: Index the ring frequency table by HW frequency range Chris Wilson
2018-03-08 15:04 ` ✓ Fi.CI.BAT: success for series starting with [CI,1/2] drm/i915: Kick the rps worker when changing the boost frequency Patchwork
2018-03-08 19:32 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-08 19:41 ` Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.