summaryrefslogtreecommitdiff
path: root/lib/igt_gt.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-04-13 19:04:13 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-04-26 12:18:15 +0100
commitfb950bc17ff8dfa3235535a12f0c4dcde281b2e3 (patch)
tree568e754927fbf31838c9b39163b576755b77bf9e /lib/igt_gt.c
parent10f903aa23932e8bce383ee56db8aaefd73dfb28 (diff)
lib: Cache static queries
We frequently check for device capabilities, for which we can safely assume that there is but one on a system and so cache the first query value and return it for all future queries. The benefit is to reduce dmesg debug spam which helps when either bringing up a test or trying to track down why a test fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_gt.c')
-rw-r--r--lib/igt_gt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 84aa5d37..deb55606 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -59,7 +59,7 @@
*/
void igt_require_hang_ring(int fd, int ring)
{
- gem_context_require_param(fd, LOCAL_CONTEXT_PARAM_BAN_PERIOD);
+ gem_context_require_ban_period(fd);
igt_require(intel_gen(intel_get_drm_devid(fd)) >= 5);
}