128 Commits

Author SHA1 Message Date
Jesse Barnes
3afb7b22d6 testdisplay: update to new addfb2 definition 2011-11-03 17:38:55 -07:00
Daniel Vetter
5b8bbc950d testdisplay: compile fix for !DRM_PLANES
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-30 20:45:42 +01:00
Jesse Barnes
1f4c37a6e9 testdisplay: allow overlay plane to be moved & scaled at runtime
For additional testing.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-10-28 18:06:23 +02:00
Jesse Barnes
234b5c40b1 testdisplay: add stub disable_planes() function
To fix the compile with non-plane libdrms.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-10-27 17:47:58 -07:00
Jesse Barnes
24e60385fe testdisplay: add sprite scaling and location support
Allow testdisplay to locate the sprite on the screen and potentially
scale it using different crtc width/height vs the source width/height
(determined by the resolution on the target pipe).

Also fix exit, making sure we properly disable all the planes.

Signed-off-by: Jesse Barnes <jbarnes@virtuougseek.org>
2011-10-24 17:18:42 +02:00
Paulo Zanoni
17ceccedbf testdisplay: return 0 when successful
We use the "ret" variable to check function return values, and these
values are not necessarily 0 on the successful cases, so we need to
reset "ret" after we finish using it.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-16 22:21:52 +02:00
Paulo Zanoni
3ba12bbb2f testdisplay: remove wrong return statement
It seems that the kernel patches required by the TEST_PLANES feature are
still not upstream, so I didn't test this patch.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-15 19:38:29 +02:00
Paulo Zanoni
7ead7ba3e6 testdisplay: don't enter the main loop if dump_info or test_all_modes
If calls inside update_display fail, the function returns and we don't
quit the program if dump_info or test_all_modes. So we enter the main
loop and keep waiting for user input, even on cases where we are not
supposed to require user input. To fix this, we move the check to
outside the update_display function.  As a side effect, we also do
cleanup instead of just exit(0) and we return 1 in case update_display
failed.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-15 19:38:21 +02:00
Paulo Zanoni
9fe1148c4b testdisplay: test all modes if no option is provided
Previously, when called without any arguments, the application required
user input to finish.  However, testdisplay is ran by "make check", and
it is not a good idea to run a program that requires user input in "make
check". So we change the default behavior to something that doesn't
require user input. You can still access the previous behavior using the
"-m" argument.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-15 19:38:18 +02:00
Paulo Zanoni
19fef544eb testdisplay: fix compiler warnings
testdisplay.c:117:1: warning: comparison between signed and unsigned
integer expressions
testdisplay.c:125:1: warning: comparison between signed and unsigned
integer expressions
testdisplay.c:145:1: warning: comparison between signed and unsigned
integer expressions
testdisplay.c:1060:16: warning: comparison between signed and unsigned
integer expressions

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-15 19:38:04 +02:00
Hai Lan
6857a1af81 testdisplay: for tiled mode test, the height should be aligned
Signed-off-by: Hai Lan <hai.lan@intel.com>
2011-08-12 11:44:03 -07:00
Hai Lan
6cc92bcbc5 testdisplay: Test the first mode if there is no preferred mode.
For a TV device, there  might be no preferred mode. In this case,
we can test the first mode.

Signed-off-by: Hai Lan <hai.lan@intel.com>
2011-07-13 14:05:54 +08:00
Jesse Barnes
e235f93288 testdisplay: automatically enable TEST_PLANES if possible
Just look for the ADDFB2 ioctl and enable the new code if it exists.
2011-06-07 13:32:37 -07:00
Jesse Barnes
8969b839b5 testdisplay: fix error output if test pattern draw fails 2011-06-07 13:29:01 -07:00
Jesse Barnes
b707feb9d5 testdisplay: add tiled buffer test support
Useful for testing tiled vs linear framebuffers.
2011-06-07 13:29:01 -07:00
Jesse Barnes
7230c01421 testdisplay: add overlay plane test option
Enumerate available extra planes and try to use one on each CRTC we enable.
2011-06-07 13:29:01 -07:00
Lan, Hai
3ddc799fbf testdisplay: fix possible_crtcs check so LVDS works
When using testdisplay on GM965 and Pineview with LVDS, it will fail to
set a mode because the first unused crtc can't be used for LVDS.  So
check the possible_crtcs to make sure the crtc can be used.

Signed-off-by: Hai Lan <hai.lan@intel.com>
2011-06-07 08:55:25 -07:00
Sun Yi
91f609741d testdisplay: print pixel clock in mode debug output
Print the pixel clock of each mode.
2011-05-31 11:50:38 -07:00
Jesse Barnes
a825173a5f testdisplay: add 30bpp support (#ifdef'd out until the next cairo release) 2011-05-12 17:50:20 -07:00
Jesse Barnes
12de60a5e8 testdisplay: don't read hotplug events from buffer before libudev
Otherwise we'll just block rather than trying to update the display.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-05-04 14:57:06 -07:00
Hai Lan
9bfda1a809 Fix a bug of testing preferred mode
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-26 07:47:12 +01:00
Jesse Barnes
c56cd106f9 testdisplay: add non-24 bit depth support
Testing 16bpp is useful, and 30bpp will be added once cairo supports it.
2011-04-19 11:50:16 -07:00
Jesse Barnes
0d3043f5f3 testdisplay: paint color gradients
Helps identify dithering problems.
2011-04-18 16:49:17 -07:00
Hai Lan
dac602b7b3 correct a mistyping for testdisplay
For testing all mode, the sleep time should be sleep_between_modes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-11 15:35:05 +00:00
Chris Wilson
28032382bc testdisplay: Remove deprecated GIO functions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-11 11:22:53 +00:00
Chris Wilson
5534cb1c75 testdisplay: Clarify
Move the loop operations around for test_all_modes so that it is clearly
split up into the desired phases.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-11 11:22:53 +00:00
Hai Lan
62d516813a Add a test case into intel-gpu-tools for intel display driver validation.
We have not a unified tool to check Intel display driver and we plan to use
intel-gpu-tools/testdisplay to check Intel display driver even though some
function tests can be found in libdrm/test. 3 new features are added:test
all supported modes, force mode and dump mode info(dump mode info is based on
libdrm/tests/modetest).

[ickle: attack the whitespacing!]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-11 11:02:07 +00:00
Jesse Barnes
5406c633a0 tests: add display testing program
Just a simple program to light up all detected outputs at their native
mode and respond to hotplug events.
2010-12-21 09:39:07 -08:00