Commit 39ac6b89 authored by Chris Wilson's avatar Chris Wilson

igt/pm_sseu: Mark requirements with igt_require

Not all platforms have a readily defined media routines, so don't assert
but require they exist.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104003Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen's avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent e5ca5dc0
......@@ -253,12 +253,17 @@ static void
gem_init(void)
{
gem.drm_fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(gem.drm_fd);
gem.init = 1;
gem.devid = intel_get_drm_devid(gem.drm_fd);
gem.gen = intel_gen(gem.devid);
igt_require_f(gem.gen >= 8,
"SSEU power gating only relevant for Gen8+");
gem.spinfunc = igt_get_media_spinfunc(gem.devid);
igt_require(gem.spinfunc);
gem.has_ppgtt = gem_uses_ppgtt(gem.drm_fd);
gem.bufmgr = drm_intel_bufmgr_gem_init(gem.drm_fd, 4096);
......@@ -271,9 +276,6 @@ gem_init(void)
igt_assert(gem.batch);
gem.init = 3;
gem.spinfunc = igt_get_media_spinfunc(gem.devid);
igt_assert(gem.spinfunc);
gem.buf.stride = sizeof(uint32_t);
gem.buf.tiling = I915_TILING_NONE;
gem.buf.size = gem.buf.stride;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment