summaryrefslogtreecommitdiff
path: root/tests/testdisplay.c
AgeCommit message (Collapse)Author
2014-02-13testdisplay: Allow to specify the dpms levelDaniel Vetter
aka the jbarnes-me-harder mode Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13testdisplay: implement dpms testDaniel Vetter
For those who wonder about the -j switch ... all the good ones have been taken, so this is the Jesse-flag. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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-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: 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-10-11testdisplay: Allow getopt to print error messagesThomas Wood
By not assigning opterr, getopt will print its own error message that includes information about whether an option is unknown or just requires an additional argument. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2013-09-30testdisplay: Print the stereo mode being testedDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Make -o and -3 work togetherDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Remove mode resetting now that we don't adjust the timingsDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Respect specified_disp_id in the stereo loopDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Remove printing out the eyes geometryDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Use DRM_MODE_FLAG_3D_MASKDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Remove the timing adjustements now that the kernel does itDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Test the stereo 3D modesDamien Lespiau
Now that modes have flags to describe which 3d formats the sink supports, it's time to test them. The new test cycles through the supported 3D formats and paint 3D stereoscopic images taken from publicly available samples: http://www.quantumdata.com/apps/3D/sample_BMP.asp Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Provide a full path when opening pngsDamien Lespiau
This way one doesn't have to be in tests/ for testsdisplay to be able to open pass.png. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Free the array of connectorsDamien Lespiau
That's an array we allocated earlier in this function. Let's be symetric and free it once done. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Untangle dump_info() from the main testing loopDamien Lespiau
-i is just supposed to show some information about the DRM resources. Right now it works in a quite convoluted way. Untangle this to call dump_info() when -i is given, exit the program and be done with it. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Fix CRTS typoDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Properly handle the life cycle of framebuffersDamien Lespiau
When cycling through the modes, let's make sure to free the previous framebuffers. This is the perfect occasion to use kmstest_remove_fb(). Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Map the fb inside paint_color_key()Damien Lespiau
So the code for this is self-contained. This goes along the way of reducing the number of global variables in testdisplay. Take the opportunity to unmap the fb after use as well. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Move the code sanitizing depth into main()Damien Lespiau
It'll be shared by the set_mode() and set_3d_mode() functions. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-03lib/drmtest: include sys/mman.h from drmtest.hDaniel Vetter
We need it for mmapping to get at PROT_READ|WRITE anyway. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13tests: s/assert/igt_assertDaniel Vetter
Just a wholesale rollout for now, we can refine later on. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12s/drmtest_/igt_/Daniel Vetter
Requested-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12tests: use drmtest_skip to check for ringsDaniel Vetter
To simplify things add a set of gem_check_<ring> functions which take care of this. Since I've opted for static inlines drmtest.h grew a few more header includes which was a neat opportunity to dump a few redundant #defines. This kills all the skipped_all hand-rolled logic we have. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-18tests: Black list tests we don't want to run on simulationDamien Lespiau
Let's start by a small set of tests, to eventually consider running more. The current list should then be: gem_mmap gem_pread_after_blit gem_ring_sync_loop gem_ctx_basic gem_pipe_control_store_loop gem_storedw_loop_render gem_storedw_loop_blt gem_storedw_loop_bsd gem_render_linear_blits gem_tiled_blits gem_cpu_reloc gem_exec_nop gem_mmap_gtt v2 add (Daniel Vetter) gem_exec_bad_domains gem_exec_faulting_reloc gem_flink gem_reg_read gem_reloc_overflow gem_tiling_max_stride prime_* Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-06-06lib: refactor kmstest_create_fbImre Deak
Factor out parts that will be used by an upcoming patch adding kmstest_create_fb2. Also call the fb paint functions directly, there is not much point in passing a function pointer for that. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06lib: add kmstest_get_connector_configImre Deak
This is used by multiple test cases, so make it shared. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06lib: add kmstest_cairo_printf_lineImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> [v3: fix mode printing in paint_output_info() botched by debugging leftover :/ ]
2013-06-06lib: move connector_type_str and co to drmtestImre Deak
These are used by multiple test cases, so make them shared. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-05-08testdisplay: set VT graphics modeImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-04build: Guard the inclusions of config.h with HAVE_CONFIG_HDamien Lespiau
autoconf can be configured to not generate a config.h but to give the defines with command line arguments instead. In this case, there's no config.h to include. To work in both cases autoconf adds a HAVE_CONFIG_H define on the command line to signal there's a config.h to include. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-02-13tests/testdisplay.c: Remove the variable only_one_mode.Yi Sun
That variable is useless, instead the variables specified_mode_num and specified_disp_id can cover all the situation. For parameter -o, all three instances should work: ./testdisplay -o 21,4 only test the 4th mode on the connector with id 21. ./testdisplay -o 21 test all the mode lines on the connector wiht id 21. ./testdisplay -o ,4 the -o is ignored, just like -a. Signed-off-by: Yi Sun <yi.sun@intel.com>
2013-01-14tests/testdisplay.c: Fix the issue which don't display anything until '-o' ↵Yi Sun
given. Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-27tests/testdisplay: Specify the display.Yi Sun
It can specify the display by the connector id which list as the first column of ./testdisplay -i. E.g. command "./testdiplay -o 1,4" means setting number 4 mode line on the display with connector id 1. v2. Specify the display by id which can be got from option '-i' Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-11-28testdisplay: Use the fb stride when painting the color keyDamien Lespiau
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55901 Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10fix warn in testdisplay: ignoring return value of 'chdir'Imre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-26Add option -o <number>, which can test only one specified mode.Yi Sun
Each mode line has a number just like '[i]'. So we can only test the specified mode with giving the number of mode to '-o' parameter. Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-30clang: Fix warnings found through clang.Ben Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-08tests/testdisplay.c Remove an uncomfortable error outputYi Sun
Signed-off-by: Yi Sun <yi.sun@intel.com>
2012-07-26tests/testdisplay.c: Add a option '-r'.Yi Sun
With the option '-r', the testdisplay could paint a 2-D bar code(QR bar code) on the screen. The word "pass" is hiden in the bar code image. Further more, with this option, testdisplay will wait until a system signal 'SIGUSR1' coming after each mode setting. This function is for another program to control testdisplay. danvet: Fix up the missing static. Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23shut up the compiler a bitDaniel Vetter
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22lib: extract kmstest_dump_modeDaniel Vetter
2012-05-22lib: extract kmstest_create_fbDaniel Vetter
We should get more kms tests soon, and not needing to copy-paste a nice test pattern should be useful. That establishes a firm depency of i-g-t on cairo over everything, but I don't care so much about that. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22tests: use drm_open_any moreDaniel Vetter
And fix it up to not leak open fds, which kills all the master only stuff.
2012-02-27testdisplay: remove unnecessary passing of width, height, stride, depthJesse Barnes
These are globals, no need to shadow them everywhere.
2012-02-27testdisplay: remove plane test supportJesse Barnes
This is better done in intel_sprite_on and was broken anyway.
2012-02-06tests/testdisplay.c: rewite function dump_connectors and dump_crtcs.Yi Sun
Replace the globe variable drm_fd with local variable passed from parameter. Signed-off-by: Yi Sun <yi.sun@intel.com> [danvet: fixup whitespace] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-06tests/testdisplay.c: Fix the black screen issue while force mode.Yi Sun
Replace the 8 globe force mode variables with a struct drmModeInfo variable. Next step, we could reduce the number of globe veriables, to be convenient to call the functions. Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24testdisplay: extract hotplug codeDaniel Vetter
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>