3 Commits

Author SHA1 Message Date
Daniel Vetter
282482db70 tests: Run igt.cocci
New stuff caught.

Plus manually simplify the massive igt_fail_on_f(file == NULL, ...) to
a simple igt_assert(file). We already print the errno (if
applicapable) and the condition, which is equally informative.

Cc: Yi Sun <yi.sun@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-10 20:06:54 +02:00
Damien Lespiau
838f321b9f kms_universal_plane: Don't assert outside of fixtures/subtests
Doing otherwise breaks listing the subtests. The test was throwing an
error out when universal planes were disabled as well because of that.

Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-04 12:04:27 +01:00
Matt Roper
075d9eafdb tests/kms_universal_plane: Universal plane testing (v6)
Add a simple test to exercise universal plane support.

v6:
 - Update to new universal plane interface (commit parameter rather than
   state-changing function).  It should now be a lot more explicit which
   steps are being taken with legacy API's vs universal API's now.
v5:
 - Check that we don't have more than one primary or cursor.  This will
   catch accidental calls to drm_plane_init() in the kernel where
   drm_universal_plane_init() was intended (these don't cause a compile
   warning due to type compatibility between enum and bool).
v4:
 - Test disabling the primary plane explicitly when it has previously
   been implicitly disabled due to clipping.
 - Skip test if igt_pipe_crc_new() fails
v3:
 - For testing while crtc is off, switch between several different
   primary plane fb's before reenabling the crtc.  This will help
   catch pin/unpin mistakes.
v2:
 - Test that pageflips error out gracefully when the primary plane
   is disabled before the ioctl, or between ioctl and pageflip
   execution.
 - Test that nothing blows up if we try to disable the primary plane
   immediately after a pageflip (presumably before the pageflip actually
   completes).
 - Test that we can setup primary + sprite planes with the CRTC off and
   then have them show up properly when we enable the CRTC
   (drmModeSetCrtc with fb = -1).
 - Test that we can modeset properly after having disabled the primary
   plane
 - Test that proper error codes are returned for invalid plane
   programming attempts.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-04 12:04:20 +01:00