diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-10-19 23:22:48 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-10-19 23:24:17 +0100 |
commit | f7408bfa7a2255080ad70916b6643886c863acc5 (patch) | |
tree | fb7df006e1182e9e492b2297fc2092ba0136b09b /tests | |
parent | 9261e1d61f81e868a1de820fbd118bfef332c132 (diff) |
igt/kms_frontbuffer_tracking: Don't fail if there is no hw overlay
Not all hw or kernels supply an overlay plane, so don't assert it's
presence and just skip the test instead in its absence.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_frontbuffer_tracking.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 3a8b4583..bc42701a 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -385,21 +385,23 @@ static void init_mode_params(struct modeset_params *params, uint32_t crtc_id, drmModeConnectorPtr connector, drmModeModeInfoPtr mode) { - uint32_t plane_id = 0; + uint32_t overlay_plane_id = 0; int crtc_idx = kmstest_get_crtc_idx(drm.res, crtc_id); int i; - for (i = 0; i < drm.plane_res->count_planes && plane_id == 0; i++) + for (i = 0; i < drm.plane_res->count_planes; i++) if ((drm.planes[i]->possible_crtcs & (1 << crtc_idx)) && - drm.plane_types[i] == DRM_PLANE_TYPE_OVERLAY) - plane_id = drm.planes[i]->plane_id; + drm.plane_types[i] == DRM_PLANE_TYPE_OVERLAY) { + overlay_plane_id = drm.planes[i]->plane_id; + break; + } - igt_assert(plane_id); + igt_require(overlay_plane_id); params->crtc_id = crtc_id; params->connector_id = connector->connector_id; params->mode = mode; - params->sprite_id = plane_id; + params->sprite_id = overlay_plane_id; params->fb.fb = NULL; params->fb.w = mode->hdisplay; @@ -520,7 +522,7 @@ static bool init_modeset_cached_params(void) return true; } - igt_assert(drm.res->count_crtcs >= 2); + igt_require(drm.res->count_crtcs >= 2); scnd_crtc_id = kmstest_find_crtc_for_connector(drm.fd, drm.res, scnd_connector, 1 << kmstest_get_crtc_idx(drm.res, prim_crtc_id)); |