[igt-dev] [PATCH i-g-t 3/4] tests/kms_plane_lowres: Only test i915 features on i915

Nicholas Kazlauskas
2018-11-13T15:24:01Z

These subtests fail on non-i915 hardware because of the devid lookups
and tiling format requirements.

This patch guards the devid/gen checks for i915 only. It also skips
tests that are testing the i915 tiling formats for non i915 drivers.

The tests still won't fully run yet because they'll skip during calls to
igt_assert_plane_visible - those require an i915 extension to get the
CRTC for a pipe.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
tests/kms_plane_lowres.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 0824ef8f..3a89f341 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -251,11 +251,14 @@ static void
test_plane_position(data_t *data, enum pipe pipe, uint64_t modifier)
{
igt_output_t *output;
- const int gen = intel_gen(intel_get_drm_devid(data->drm_fd));

- if (modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
- modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED)
- igt_skip_on(gen < 9);
+ if (is_i915_device(data->drm_fd)) {
+ if (modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
+ modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED)
+ igt_skip_on(intel_gen(intel_get_drm_devid(data->drm_fd)) < 9);
+ } else {
+ igt_skip_on(modifier != LOCAL_DRM_FORMAT_MOD_NONE);
+ }

for_each_valid_output_on_pipe(&data->display, pipe, output)
test_plane_position_with_output(data, pipe, output, modifier);
--
2.17.1