17 Commits

Author SHA1 Message Date
Daniel Vetter
a4d3a6c013 lib: make igt_pipe_crc_start never fail
It's what callers expect - pipe_crc_new is the function where
we pass a potential failure back to callers.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06 14:51:14 +01:00
Daniel Vetter
c1b7e722da lib: add igt_pipe_crc_check
No need to duplicate this all over the place.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06 14:51:14 +01:00
Ville Syrjälä
e1e5856b3c lib: Fix pipe_crc->ctl_fd assert
Use the correct fd in the assert().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27 16:18:04 +02:00
Daniel Vetter
af9d1b5cdb lib: drop return value from igt_drop_caches
No one actually cares, everyone expects it to just work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 18:11:29 +01:00
Oscar Mateo
5f0ab94c3f lib: Add igt_drop_caches_set()
This is basically a "drop cache" interface to the igt_debugfs
facilities. Also, update existing users.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 18:05:37 +01:00
Daniel Vetter
223a61e12e lib: make igt_install_exit_handler never fail
Most callers didn't bother checking, so just move the asserts into
the function itself.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
0369fe19b8 lib: consolidate pipe crc exit handler
No need to sprinkle this all over:
- exit handlers will only be registered once
- they're always called when exiting, so no need to explictly call
  them.

This allows us to hide all the pipe crc cleanup in the library.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
842007154d tests: use "auto" pipe CRC source
Makes stuff work on DP ports on gmch platforms automatically.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 20:43:15 +01:00
Damien Lespiau
9e21c255e7 lib: Don't forget to close the pipe ctl fd in igt_pipe_crc_reset()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-01 16:25:52 +00:00
Ville Syrjälä
0786d5cc8f lib: Check pipe source validity in igt_pipe_crc_new()
Have igt_pipe_crc_new() check whether the selected source is actually
supported.

v2: Make debugfs_pipe_crc.c not crash

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21 20:00:32 +03:00
Ville Syrjälä
987bcd9a5b lib: Allow pipe_crc_free(NULL)
Prevent pipe_crc_free() from segfaulting on NULL ptr.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21 20:00:32 +03:00
Damien Lespiau
768e32a3ab lib: Don't wait for a vblank when enabling the CRCs
This was a previous attempt to solve the first CRC being bogus. We know
wait for it and discard it at the end of the function.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-18 14:30:53 +01:00
Daniel Vetter
173a4cf1da tests/debugfs_pipe_crc: fall back to PIPE source
With PLANE1 and PIPE CRC sources the test will work on all currently
shipping (and planed fwiw) platforms.

Also add all the other new sources for non-ivb/hsw chips.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-17 13:35:51 +02:00
Damien Lespiau
4ba97ddf96 debugfs_pipe_crc: Let's check CRCs!
Let's add a new test that sets a mode, wait for a few vblanks (3) and
then make sure we read 3 identical CRCs.

Some subtests check for various parsing errors.

In the process, improve the debugfs helpers to deal with CRCs.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15 19:40:07 +01:00
Damien Lespiau
d4e7ddf15d lib: Make igt_debugfs_open() take the mode as argument
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15 19:32:09 +01:00
Damien Lespiau
ffa2107abc lib: Add igt_debugfs_fopen()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15 19:02:08 +01:00
Damien Lespiau
51b63e334c lib: Add a small helper to open debugfs files
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15 19:02:08 +01:00