summaryrefslogtreecommitdiff
path: root/tests/kms_pipe_crc_basic.c
AgeCommit message (Collapse)Author
2015-10-23tests/kms_pipe_crc_basic: Skip invalid pipe/port combosVille Syrjälä
Don't try to test invaliud pipe/port combos. Fixes the test on VLV w/ DSI since the pipe<->DSI port mapping is fixed. Should also fix other platforms with similar restrictions. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-23tests: Remove usage of igt_crc_equal and _non_nullDaniel Vetter
Tests should positively check for crc matches, not for mismatches. Enforce this by only exposing and igt_assert function for comparing crcs. For the few tests which didn't just do this as consistency checks but to do functional tests add FIXME comments that some reference crc values are missing. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23lib/debugfs: Add igt_assert_crc_equalDaniel Vetter
Because of hash collisions tests should only ever compare crc checksums for equality. Checking for inequality can result in random failures. To ensure this only expose and igt_assert function and use that. Follow-up patches will rework the code for tests which don't follow this requirement and try to compare for CRC inequality. v2: Rebase on top of Matt's kms_plane changes. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-12tiling: Convert framebuffer helpers to use fb modifiersTvrtko Ursulin
This converts the IGT API only, underneath legacy set_tiling is still used. v2: One got away in kms_flip. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-02-13lib/igt_gt: Document and consolidateDaniel Vetter
Also move forcewake and stop_rings code from igt_debugfs to igt_gt since it fits better. And move the hang injection fork helpers from igt_aux to igt_gt, too. Also push the intel_gen call into igt_hang_ring while at it. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-24lib/igt_debugfs: Don't setup crc in _newDaniel Vetter
The problem is that this causes writes to registers, and if the pipe is off they might go nowhere (e.g. when runtime pm is enabled). Furthermore we can only really check once the modeset setup is done, but again most tests set up the CRC structure before calling igt_commit and friends. We could add crc restore support to the kernel's rpm code, but that will end up being rather invasive and fragile hard-to-test code. Now originally this was needed back when CRC support wasn't available everywhere. But that's fixed now. So given all this just drop that sanity check and make sure that we only touch the debugfs file (and so the hw state) when we know the pipe is running in the desired configuration. A complementary kernel patch will try to catch offenders by returning -EIO if the pipe is off. v2: Forgot to git add one hunk. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-30test/kms, pm: use drm_open_any_masterImre Deak
These tests require DRM master right, so make sure they have it from the beginning. This gives an early indication if another DRM master is running and makes the given test skip (with a proper explanation of the reason) instead of exiting with error. Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-08-29igt: Prettify igt_assert_eq() failure messagesChris Wilson
This just improves the language about the exact failure to reduce confusion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-21kms_pipe_crc_basic: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-12lib/igt_kms: set_vt_graphics_mode is a low-level helperDaniel Vetter
So give it a kmstest_ prefix and shuffle it around a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12lib/igt_kms: Unify pipe name helpersDaniel Vetter
And add api doc while at it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-11tests: enable extra connectors in kms_flip and kms_pipe_crc_basicThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-07kms_pipe_crc_basic: Add a bit a debugging outputDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-07kms_pipe_crc_basic: Make the number of CRCs a parameterDamien Lespiau
Let's make the test a bit more generic and have the number of CRCs we're collecting a define so it can be changed easily. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-07kms_pipe_crc_basic: Cycle between 2 differently colored bufferDamien Lespiau
Instead of just testing if the CRCs are stable, we also test 2 different fbs to make sure that the CRC is actually changing. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-07kms_pipe_crc_basic: Split the main test function a bit moreDamien Lespiau
Let's put the per-output test in its own function to get rid of 1 level of indentation. We'll need it to cycle through 2 different framebuffers to make sure we compute different CRCs if the fbs are different. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-05-22tests/kms_pipe_crc_basic: Add gpu hang testsDaniel Vetter
Currently pipe CRC support is broken after gpu hangs. This tests for this bug. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-22tests/kms_pipe_crc_basic: Add suspend testsDaniel Vetter
Currently broken ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14tests: sprinkle igt loggingDaniel Vetter
All the cases that simply dump some debug information and couldn't be converted to some of the fancier macros. Some information output removed when it's redundant with the subtest status. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: switch to igt_ prefix from kmstest_Daniel Vetter
Shorter and more in line with our general igt_ prefix for everything which isn't somehow intel or i915-gem or otherwise hw specific - these helpers here are all fully generic framebuffer handling functions based on kms + cairo. Well, the actual buffer alloc is done with i915 gem, but meh ;-) Two special cases: - bpp_depth_to_drm_format and drm_format_to_bpp completely lacked prefixes, so just add igt_. - write_fb was a bit misleading given that we have gem_write for uploading to buffers. Rename that to write_fb_to_png to make it crystal clear what this thing does even without looking at docs. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib: remove kmstest_create_fbDaniel Vetter
Use the new-style function using drm fourcc codes instead everywhere. To easily use thew fourcc based interface also expose bpp_depth_to_drm_format from the library. Finally include drm_fourcc.h from the igt_kms.h header since pretty much everyone needs this now. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: more unecessary header removalDaniel Vetter
This time big with media_fill.h Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: s/igt_pipe_crc_check/igt_require_pipe_crc/Daniel Vetter
Functions which provide feature checks through igt_skip should be of the form <prefix>_require_<feature>. Otoh feature checks which return in a boolean whether the feature is available should be of the form <prefix>_has_<feature>, e.g. gem_has_blt. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: Remove debugfs from pipe crc functionsDaniel Vetter
All tests have now lost explicit references to igt_debugfs_t! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: Remove debugfs from igt_debugfs_fopenDaniel Vetter
Also add a missing igt_assert to kms_fbc_crc and again add the missing Returns: section to the api doc. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13test/kms_pipe_crc_basic: Fix up igt_kms conversion breakageDaniel Vetter
Apparently the framework doesn't ignore disabled pipes correctly, so help it out a bit. Again an awesome track record for our QA and bug scrubbers :( Oh and while I rant: Docs for this stuff, please ;-) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/igt_debugfs: drop drm_fd argument from igt_pipe_crc_newDaniel Vetter
It's nowhere used and removing it gives us a cleaner, more orthogonal interface. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-18kms_pipe_crc_basic: Remove spurious inclusion of glib.hDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11kms_pipe_crc_basic: Remove igt_display_get_n_pipes() usage in mainDamien Lespiau
The fixture won't be run when listing the subtests and thus we can't use igt_display_get_n_pipes() in the list of tests. The alternative here is to list the subtests with the maximum values and skip when not supported on the platform. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11lib: Fix igt_ouput_get_plane() typo (output)Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11kms_pipe_crc_basic: Use kmstest_create_color_fb()Damien Lespiau
Reducing again the per-test number of lines. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11kms_pipe_crc_basic: Use igt_display_get_n_pipes() instead of hardcoding 3Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11kms_pipe_crc_basic: Use for_each_connected_output()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11kms_pipe_crc_basic: Port to the new modeset APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-31kmstest: Fix up lifetimes of cairo objectsChris Wilson
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-06lib: make igt_pipe_crc_start never failDaniel Vetter
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-06lib: add igt_pipe_crc_checkDaniel Vetter
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-06tests: drm_open_any doesn't failDaniel Vetter
Or more precisely: It already has an igt_require. So we cant ditch it from tests. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12lib: Move kms stuff from drmtest.c over to igt_kms.cOscar Mateo
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-04tests: Use kms_ prefix a bit moreDaniel Vetter
I was a bit on the fence about the basic pipe CRC test since that doesn't really test kms, but debug infrastructure in debugfs. Otoh running this one for a full kms testrun is always good, to make sure that all the other (real) CRC based tests work sanely. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>