63 Commits

Author SHA1 Message Date
Damien Lespiau
2043e6b265 lib: Fix igt_ouput_get_plane() typo (output)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 17:45:48 +00:00
Damien Lespiau
fb146aa782 lib/display: Wait for a vblank after SetPlane()
Let's be testing friendly and gently wait for the next vblank before
returning from commit() when needed.

After igt_display_commit() one can safely look at the CRC.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
1d2c9d5e57 lib: Include drm_fourcc.h from igt_kms.h
This include is needed for the DRM_FORMAT* defines used in the fb
creation helpers.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
a1df2f4363 lib: Introduce a new helper kmstest_create_color_fb()
We need to create fbs of a single color in a few places. Time to
abstract that out to a helper function.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
f0e0b2ae65 lib/display: Add support for DRM planes
We can now extend our plane support beyond primary and cursor planes.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
09faa45f52 lib/display: Add a way to specify we don't care about the pipe to use
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
5ec399b4a6 lib/display: Add support for the cursor plane
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
72e9a6c8d5 lib/display: Add an accessor to retrieve the number of pipes
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
992bd5d62a lib: Introduce a for_each_connected_output() macro
So we can easily cycle through them in tests without knowing too many
internal details about how igt_display_t organize its data.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
09e84cee8b lib: Introduce symbolic names for display planes
It'd be nice to have symbolic names for planes instead of using an index
in igt_output_get_plane().

We also namespace the enum to not conflict with anyone.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Damien Lespiau
3670d6dbff lib: Introduce a modeset API
The goals here are:
  - Reduce duplicated code in each KMS test
  - Provide an API that looks more like what we want for atomic
    modesets. The hope is then that it'll be easy to switch, at
    run-time, between the "legacy" path and atomic modesets, keeping
    the same API for tests.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11 13:50:16 +00:00
Chris Wilson
164d9d26ac kmstest: Fix up lifetimes of cairo objects
cairo_t is the short lived drawing context, whereas cairo_surface_t is
the heavyweight object that persists and is also tied to underlying GEM
objects. So make the kmstest API reflect the different weights and fix
the lifetime and underlying object reference leaks.

Based on the fix by Paulo Zanoni.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-31 12:30:30 +00:00
Oscar Mateo
37f26d17b1 lib: Move kms stuff from drmtest.c over to igt_kms.c
This makes cairo dependencies easier to handle. Otherwise, we
would have to litter drmtest all over with "#ifndef ANDROID"

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
[danvet: Add missing _GNU_SOURCE to igt_kms.c and missing include to
intel_sprite_on.c]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:04:12 +01:00