diff options
author | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2021-06-25 18:24:15 +0530 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2021-08-10 21:02:50 +0200 |
commit | 8235c8e4abd633282915af6de73b509578769fba (patch) | |
tree | 3c02d8dbc04dead4a5217af582161fb41ed254c0 /tests/kms_vblank.c | |
parent | 0f75f873cf6b769089f675fccfda3ccae493f3b3 (diff) |
tests/kms_vblank: Adopt to use allocator
For newer gens kernel will reject relocations returning -EINVAL
so we should just provide the allocator handle to inject the hang.
V2:
* Drop is_i915_device() check
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/kms_vblank.c')
-rw-r--r-- | tests/kms_vblank.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c index 885b2e2c..f3a9875e 100644 --- a/tests/kms_vblank.c +++ b/tests/kms_vblank.c @@ -118,6 +118,7 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int)) igt_output_t *output = data->output; int fd = display->drm_fd; igt_hang_t hang; + uint64_t ahnd = 0; prepare_crtc(data, fd, output); @@ -128,8 +129,10 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int)) igt_subtest_name(), kmstest_pipe_name(data->pipe), igt_output_name(output)); - if (!(data->flags & NOHANG)) - hang = igt_hang_ring(fd, I915_EXEC_DEFAULT); + if (!(data->flags & NOHANG)) { + ahnd = get_reloc_ahnd(fd, 0); + hang = igt_hang_ring_with_ahnd(fd, I915_EXEC_DEFAULT, ahnd); + } if (data->flags & BUSY) { union drm_wait_vblank vbl; @@ -166,6 +169,8 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int)) igt_info("\n%s on pipe %s, connector %s: PASSED\n\n", igt_subtest_name(), kmstest_pipe_name(data->pipe), igt_output_name(output)); + put_ahnd(ahnd); + /* cleanup what prepare_crtc() has done */ cleanup_crtc(data, fd, output); } |