diff options
author | Alex Hung <alex.hung@amd.com> | 2022-11-29 15:03:09 -0700 |
---|---|---|
committer | Kamil Konieczny <kamil.konieczny@linux.intel.com> | 2022-12-02 12:48:36 +0100 |
commit | 272354f8e1bbeb56df1663c42a9958f2ff9b8f54 (patch) | |
tree | 287e01a30dd563d9c12c46462c5563912dcb8cd4 | |
parent | 71bce31c26998d5d53cff3138049261fd6c4fbaf (diff) |
tests/kms_plane: check before calling i915 libraries
for_each_memory_region calls functions in lib/i915/ and let's
check is_i915_device first.
Fixes: db2bdd3a (tests/kms_plane: skip memory demanding modes in test_plane_panning)
Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
-rw-r--r-- | tests/kms_plane.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/kms_plane.c b/tests/kms_plane.c index fc530d2cf..164dacf40 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -391,9 +391,12 @@ test_plane_panning(data_t *data, enum pipe pipe) test_init(data, pipe); - for_each_memory_region(r, data->drm_fd) - if (r->ci.memory_class == I915_MEMORY_CLASS_DEVICE) - mem_size = r->cpu_size; + if (is_i915_device(data->drm_fd)) { + for_each_memory_region(r, data->drm_fd) + if (r->ci.memory_class == I915_MEMORY_CLASS_DEVICE) + mem_size = r->cpu_size; + + } for_each_connector_mode(output) { drmModeModeInfo *m = &output->config.connector->modes[j__]; |