summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_crc.c
AgeCommit message (Collapse)Author
2014-04-25kms_cursor_crc: Add random cursor placement testAntti Koskipaa
Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Add moving cursor testAntti Koskipaa
Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Add reference software renderingAntti Koskipaa
This patch first render the cursor with hardware rendering and then with software, acquiring the CRC in both cases so they can be properly compared. Say goodbye to crc_must_match variable. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Separate onscreen and offscreen testsAntti Koskipaa
Also remove onscreen boolean from parameter list. All test-related data should be put into test_data from now. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Use a function pointer to call testAntti Koskipaa
More tests are coming, and this allows us to not repeat the boilerplate code in run_test() for each subtest. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Move cursor enable and disable calls where they belongAntti Koskipaa
We can't have the hw cursor enabled during software render tests. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com> [vsyrjala: collect the crc before disalbing the cursor] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Remove some test cases and change cursor to colorAntti Koskipaa
Currently this test is quite useless, since it only checks for valid CRCs when the correct output from a test is a completely black screen (invisible or visible but black cursor, or cursor is offscreen) and disables the check when anything visible is onscreen. This patch changes the cursor to a colorful one and removes the test cases that become redundant because of this change. The cursor is designed to be asymmetrical such that future tests involving rotation, mirroring, etc. produce different CRCs and failures can be detected. This (temporarily) disables CRC testing until the next patch which will add software rendering of the cursor and the CRC generation. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
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/igt_kms: s/kmstest_create_fb2/kmstest_create_fb/Daniel Vetter
Simplify the name since the old _fb function is now gone. 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-22tests/kms_cursor_crc: Fix up breakageDaniel Vetter
I've accidentally broken the new cursor size extensions, but it wasn't quite correct before already: Variables which are set in igt_fixtures _must_ be outside of the stackframe of the igt_fixture block. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-20tests/kms_cursor_crc: Review from Imre for Sagar's patchDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-20kms_cursor_crc: Enabling this test for all cursor sizesSagar Kamble
v1: Added 128x128 and 256x256 cursor size support. v2: Refined the test to use igt_subtest_f and automate enumeration. v3: Restructuring test enumeration using drmGetCap. [Daniel's review comments] Signed-off-by: Sagar Kamble <sagar.a.kamble@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> 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-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-11lib: Fix igt_ouput_get_plane() typo (output)Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11lib: Include drm_fourcc.h from igt_kms.hDamien Lespiau
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-11kms_cursor_crc: Use kmstest_create_color_fb()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11tests/kms_cursor_crc: Use igt_pipe_crc_collect_crc()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11kms_cursor_crc: Port the test to the new modeset APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-11tests/kms_cursor_crc: Move the array of cursor fb_ids to the stackDamien Lespiau
This array is not used outside ouf create_cursor_fb(). A stack allocated array is enough. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-13tests: Drop glib.h include from kms_cursor_crc and kms_fbc_crcVille Syrjälä
kms_cursor_crc and kms_fbc_crc don't need glib.h. This was just some copy-paste error on my part. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.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: 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-27kms_cursor_crc: Fix crc readout after a subtest failureVille Syrjälä
If a subtest fails, it'll leave the pipe CRC file open, which will prevent subsequent subtests from opening the file. Make sure the file is cloesed before trying to open it again. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
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-01lib: add igt_main macroDaniel Vetter
In the past new testcases with subtest often forgot to add the call to igt_exit at the end of their main() function. That is now caught with a bit more obnoxious asserts, but it's still a nuissance. This little igt_main macro takes care of that (and also of calling the subtest machinery initialization code correctly). If no one objects I'll roll this out for all the simple cases (i.e. those tests that don't have additional argv parsing on top of the subtest machinery). v2: Roll it out across the board. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: make igt_set_vt_graphics_mode never failDaniel Vetter
All tests agree that this is a letal failure, so no point to pass it back to callers. Also add some igt_require calls for the drm_fd where I've noticed that it's missing. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: consolidate pipe crc exit handlerDaniel Vetter
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-01tests/kms_cursor_crc: rework to auto-skip connectorsDaniel Vetter
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01tests: use "auto" pipe CRC sourceDaniel Vetter
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-10-29tests/kms_cursor_crc: Use igt_exitDaniel Vetter
Otherwise the exit codes are all bogus. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-21kms_cursor_crc: Add a cursor test using CRCsVille Syrjälä
Use the display CRC support to validate cursor plane functionality. The test will position the cursor plane either fully onscreen, partially onscreen, or fully offscreen, using either a fully opaque or fully transparent surface. In each case it then reads the PF CRC and compares it with the CRC value obtained when the cursor plane was disabled. v2: Loop over all connectors and crtcs Use igt_wait_for_vblank Test more corner cases Add some progress indication ala. kms_flip Make it work for pf and pipe sources Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>