14 Commits

Author SHA1 Message Date
David Herrmann
7402e5e753 console: correctly resize lines
When resizing lines we shouldn't drop all information. Instead we only
initialize new cells.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-21 16:07:40 +01:00
David Herrmann
c762375c92 test_buffer: add buffer playground
This test app is used to stress test the buffer implementation and finding bugs
of the scrollback-buffer rotations etc.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-21 15:44:24 +01:00
Ran Benita
dfd880881e vt: add support for automatic VT switching
Add two functions to enter/leave our VT object. This allows to
implement to expected behavior of automatically switching to the kmscon
when it is running on a new tty, and switching back to the tty we came
from when the program finishes. Presumably this behavior will be
controlled by a config variable or command line argument later on (like
Xorg's -novtswitch).

There's a bit of a subtlety in this because of VT_PROCESS. We need
permission from ourselves to switch in/out of out VT; this is done when
processing SIGUSR[12] in the eloop. We therefore must dispatch the loop
at least once after switching out. The usual case is demonstrated in
test_vt.c.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-14 16:33:35 +01:00
David Herrmann
20beb30357 test_console: Use new eloop and VT subsystem
The test_console application now supports VT-switching and monitor-hotplug. New
monitors are detected when switching VTs. Full hotplug-support will be added
later.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-03 16:49:44 +01:00
David Herrmann
ae54604784 Add VT test
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-03 15:14:18 +01:00
David Herrmann
9d2fe62bd9 test_output: Use log API
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-02 15:33:52 +01:00
David Herrmann
9b88fe87e2 test_output: Use new log API
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-02 15:16:14 +01:00
David Herrmann
9093189f2f test_output: Catch SIGINT and SIGTERM
Correctly handle SIGINT and SIGTERM. This will also reset the crtc so it won't
stay black if the application is killed.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-02 15:10:07 +01:00
David Herrmann
41c56410ee test_console: React on SIGINT
Correctly terminate the application on SIGINT so the CRTC gets reset.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-02 14:35:33 +01:00
David Herrmann
0d1acc526f Change license to MIT license
Further commits will need a Signed-off-by line, otherwise I cannot accept them.
MIT license is compatible with GPL so we still can switch to GPL in the future
if we want.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-02 13:23:22 +01:00
David Herrmann
e5de20a22a Fix test_console
Correctly set locale on startup and sleep for one second after each redraw to
reduce CPU consumption.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-26 16:55:25 +01:00
David Herrmann
bfc6975baf Add console test
This test application prints a console on all connected outputs. It does not
emulate any terminal but instead just prints the test-console.

It can be used to test the console subsystem in connection with the DRM/KMS
output subsystem.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 17:55:57 +01:00
David Herrmann
6c19c352bc Avoid refreshing twice in output test
Waking up the compositor automatically refreshed the output list. Therefore,
avoid refreshing it manually again.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 15:46:22 +01:00
David Herrmann
9847437735 Add output test-script
The test_output application is an example how to use the output subsystem. It
lists all connected monitors/DRM-outputs and draws with OpenGL on the selected
framebuffers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 00:16:27 +01:00