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>
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>
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>
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>
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>
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>
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>
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>
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>