* [PATCH] drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info
@ 2017-02-18 11:27 Chris Wilson
2017-02-18 11:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-20 11:02 ` [PATCH] " Szwichtenberg, Radoslaw
0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2017-02-18 11:27 UTC (permalink / raw)
To: intel-gfx
Either by chance, or by misread, the current evaluation interval may be
zero. If that is the case, don't divide by it!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 124213a36b4f..c0bc922fe497 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2367,10 +2367,10 @@ static int i915_rps_boost_info(struct seq_file *m, void *data)
seq_printf(m, "\nRPS Autotuning (current \"%s\" window):\n",
rps_power_to_str(dev_priv->rps.power));
seq_printf(m, " Avg. up: %d%% [above threshold? %d%%]\n",
- 100 * rpup / rpupei,
+ rpup && rpupei ? 100 * rpup / rpupei : 0,
dev_priv->rps.up_threshold);
seq_printf(m, " Avg. down: %d%% [below threshold? %d%%]\n",
- 100 * rpdown / rpdownei,
+ rpdown && rpdownei ? 100 * rpdown / rpdownei : 0,
dev_priv->rps.down_threshold);
} else {
seq_puts(m, "\nRPS Autotuning inactive\n");
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info
2017-02-18 11:27 [PATCH] drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info Chris Wilson
@ 2017-02-18 11:52 ` Patchwork
2017-02-20 11:02 ` [PATCH] " Szwichtenberg, Radoslaw
1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-02-18 11:52 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info
URL : https://patchwork.freedesktop.org/series/19888/
State : success
== Summary ==
Series 19888v1 drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info
https://patchwork.freedesktop.org/api/1.0/series/19888/revisions/1/mbox/
fi-bdw-5557u total:252 pass:241 dwarn:0 dfail:0 fail:0 skip:11
fi-bsw-n3050 total:252 pass:213 dwarn:0 dfail:0 fail:0 skip:39
fi-bxt-j4205 total:252 pass:233 dwarn:0 dfail:0 fail:0 skip:19
fi-bxt-t5700 total:83 pass:70 dwarn:0 dfail:0 fail:0 skip:12
fi-byt-j1900 total:252 pass:225 dwarn:0 dfail:0 fail:0 skip:27
fi-byt-n2820 total:252 pass:221 dwarn:0 dfail:0 fail:0 skip:31
fi-hsw-4770 total:252 pass:236 dwarn:0 dfail:0 fail:0 skip:16
fi-hsw-4770r total:252 pass:236 dwarn:0 dfail:0 fail:0 skip:16
fi-ilk-650 total:252 pass:202 dwarn:0 dfail:0 fail:0 skip:50
fi-ivb-3520m total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18
fi-ivb-3770 total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18
fi-kbl-7500u total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18
fi-skl-6260u total:252 pass:242 dwarn:0 dfail:0 fail:0 skip:10
fi-skl-6700hq total:252 pass:235 dwarn:0 dfail:0 fail:0 skip:17
fi-skl-6700k total:252 pass:230 dwarn:4 dfail:0 fail:0 skip:18
fi-skl-6770hq total:252 pass:242 dwarn:0 dfail:0 fail:0 skip:10
fi-snb-2520m total:252 pass:224 dwarn:0 dfail:0 fail:0 skip:28
fi-snb-2600 total:252 pass:223 dwarn:0 dfail:0 fail:0 skip:29
d13370a042e9d05329bcac34eb43c64e4f6704e0 drm-tip: 2017y-02m-17d-21h-23m-28s UTC integration manifest
49072c9 drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3893/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info
2017-02-18 11:27 [PATCH] drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info Chris Wilson
2017-02-18 11:52 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-02-20 11:02 ` Szwichtenberg, Radoslaw
2017-02-20 11:06 ` chris
1 sibling, 1 reply; 4+ messages in thread
From: Szwichtenberg, Radoslaw @ 2017-02-20 11:02 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org, chris@chris-wilson.co.uk
On Sat, 2017-02-18 at 11:27 +0000, Chris Wilson wrote:
> Either by chance, or by misread, the current evaluation interval may be
> zero. If that is the case, don't divide by it!
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info
2017-02-20 11:02 ` [PATCH] " Szwichtenberg, Radoslaw
@ 2017-02-20 11:06 ` chris
0 siblings, 0 replies; 4+ messages in thread
From: chris @ 2017-02-20 11:06 UTC (permalink / raw)
To: Szwichtenberg, Radoslaw; +Cc: intel-gfx@lists.freedesktop.org
On Mon, Feb 20, 2017 at 11:02:10AM +0000, Szwichtenberg, Radoslaw wrote:
> On Sat, 2017-02-18 at 11:27 +0000, Chris Wilson wrote:
> > Either by chance, or by misread, the current evaluation interval may be
> > zero. If that is the case, don't divide by it!
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Thanks, pushed.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-20 11:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-18 11:27 [PATCH] drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info Chris Wilson
2017-02-18 11:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-20 11:02 ` [PATCH] " Szwichtenberg, Radoslaw
2017-02-20 11:06 ` chris
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.