3 Commits

Author SHA1 Message Date
Paulo Zanoni
7ca55f433c tests/igt_fb: rename igt_get_all_formats to igt_get_all_cairo_formats
I recently had this discussion with Daniel where I didn't want to use
igt_drm_format_to_bpp() because it uses the format_desc array, and
igt_fb currently assumes that all the format_desc formats have a
matching valid Cairo format, so I wouldn't be able to easily add
formats such as ARGB2101010.

The function that has the assumption mentioned above is
igt_get_all_formats: its current users call igt_get_all_formats, and
then call cairo-dependent functions, such as igt_get_cairo_ctx on the
returned formats.

In order to document the current behavior and prevent any problems in
case we start adding new formats without matching Cairo versions to
format_desc, rename igt_get_all_formats to igt_get_all_cairo_formats
and make it explicitly check for CAIRO_FORMAT_INVALID.

Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-01-29 16:30:15 -02:00
Ville Syrjälä
5b113d323d lib: Extract some common fb create+fill methods into helpers
Several tests do one or more of the following:
* igt_create_fb() + igt_paint_test_pattern()
* igt_create_color_fb() + igt_paint_test_pattern()
* igt_create_fb() + igt_paint_image()

Extract them into new helpers: igt_create_pattern_fb(),
igt_create_color_pattern_fb(), igt_create_image_fb().

v2: Fix typos, and improve API docs (Thomas)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-01-08 15:01:59 +02:00
Daniel Stone
bc37e0297c kms_atomic: Add basic atomic modesetting tests
Add tests for KMS atomic modesetting, to exercise the basic interface
and test failure/corner cases. Should ensure coherency between the
legacy and atomic interfaces.

v2: New patch.
v3: Disable connector checking for now, as it was causing GPU hangs on
    newer kernels.
v4: Rebase.
v5: Use do_ioctl or do_ioctl_err consistently. Use igt_assert_*()
    helper macros rather than igt_assert() directly.
    Move assertions into helper/check functions. Define atomic commit
    helper.
v6: Use do_ioctl_err, and define macros to move errors to
    actual callsite, rather than helper functions.

Co-authored-by: Micah Fedke <micah.fedke@collabora.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-11-03 19:46:12 +00:00