David Herrmann [Sat, 14 Apr 2012 17:54:45 +0000 (19:54 +0200)]
test_output: always enable all outputs
Instead of accepting a list of outputs we now enable all outputs when
testing the video subsystem.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 14 Apr 2012 17:49:36 +0000 (19:49 +0200)]
test_output: run eloop for 5s instead of sleep()
The new eloop implementation allows to run the eloop for a fixed amount of
time. Use this instead of sleeping for 5s which would prevent us from
catching signals as the eloop blocks them in favor of signalfd.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 14 Apr 2012 17:45:11 +0000 (19:45 +0200)]
test_output: use new test_include.h header
The test_include.h header now provides the basic initialization that will
later be used in all other tests. This allows us to use the same
program-parameters that kmscon uses and makes sure everything is
initialized properly before we run the tests.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 14 Apr 2012 17:35:12 +0000 (19:35 +0200)]
test_output: remove signal handler
It will be replaced by the event loop signal handler.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 17:31:57 +0000 (19:31 +0200)]
console: remove old font-factory code
Remove the code that is no longer needed due to the new font renderer.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 17:25:54 +0000 (19:25 +0200)]
terminal: use new font backend
Instead of using the slow old font-factory we now use the new font_screen
object which allows faster software rendering with pango/cairo.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 16:17:45 +0000 (18:17 +0200)]
console: remove margin_bottom cache
margin_bottom was always the last index of the scroll-region, in contrast
to cells->mbottom_y which is the bottom margin size. However, this cache
is inconvenient so this replaces all calls to margin_bottom with a correct
immediate calculation of the bottom margin.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 14:12:02 +0000 (16:12 +0200)]
console: remove mtop cache
We can directly access the buffer now so no need to cache the value.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 13:00:47 +0000 (15:00 +0200)]
console: remove cells_x/y cache
We don't need this anymore as we now have direct access to the buffer
structure.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 11:08:27 +0000 (13:08 +0200)]
console: add "fixed_position" option
The fixed_position option allows to explicitely keep the scrollback-buffer
position instead of scrolling on new input. This was already the current
behavior but now we can also scroll on new input if this is set to false.
Also fix up the formatting of the comments and remove old information.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 10:52:54 +0000 (12:52 +0200)]
console: remove refcnt of buffer object
The buffer object is used internally only and should never be shared.
Hence, we can safely remove the refcnt.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 1 Apr 2012 10:50:17 +0000 (12:50 +0200)]
console: make buffer code private
The buffer should not be accessed from code outside of console.c so make
it private. This includes some code-moving but no bigger changes. The diff
might look scary, though.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 31 Mar 2012 20:45:12 +0000 (22:45 +0200)]
font: add new font renderer
The old font-renderer was horribly slow. There were several ideas to
speed it up but I decided to add the pango backend again. Pango allows us
to draw combined-characters and all other kinds of special characters. We
would have to rewrite pango if we wouldn't want this dependency so I
currently have no idea why we should make it optional.
However, some people might not care whether they can correctly display all
kind of Unicode text but instead want some shiny kmscon without any
dependencies. Therefore, I will keep the old freetype font-renderer even
though it is not used yet. However, we can convert it at any time.
The new font-renderer is not used yet. We need to cleanup the console
layer first before it can be hooked into the terminal.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 31 Mar 2012 20:44:37 +0000 (22:44 +0200)]
gl: add stride parameter to texture upload
Allow to specify the stride when uploading data into a texture.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 30 Mar 2012 16:49:04 +0000 (18:49 +0200)]
misc: replace all GHashTable with kmscon_hashtable
We use a new wrapper to move all glib deps to central points so we can
replace them easily.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 30 Mar 2012 16:30:55 +0000 (18:30 +0200)]
misc: hash-table wrapper
We want to move away from glib eventually. Until then, we use a simple
wrapper around the hash-table functions so we need to change a single
place only.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 30 Mar 2012 13:55:23 +0000 (15:55 +0200)]
console: fix log messages
Use LOG_SUBSYSTEM and remove trailing newlines.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 30 Mar 2012 13:51:33 +0000 (15:51 +0200)]
vte: fix log messages
Use LOG_SUBSYSTEM and remove trailing newlines.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 30 Mar 2012 13:49:28 +0000 (15:49 +0200)]
font_freetype2: fix log messages
Use LOG_SUBSYSTEM and remove newlines.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 29 Mar 2012 16:04:39 +0000 (18:04 +0200)]
conf: add --seat parameter
The --seat parameter specifies which seat is used for drm and input
devices. Default is seat0.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 29 Mar 2012 16:03:21 +0000 (18:03 +0200)]
conf: fix negative getopt_long parameters
I don't know the reason but negative values don't work here. We simply use
big integers now to avoid clashes with valid getopt() values.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 29 Mar 2012 14:06:56 +0000 (16:06 +0200)]
unicode: use static global symbol table
A symbol table should never be created twice therefore we can make it
static and global. We add locks so it is totally thread-safe, too.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 28 Mar 2012 15:20:13 +0000 (17:20 +0200)]
unicode: fix logging messages
Use new logging style in unicode layer.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Tue, 27 Mar 2012 14:48:27 +0000 (16:48 +0200)]
Update README
Fix some small typos and add TODOs.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Tue, 27 Mar 2012 14:42:31 +0000 (16:42 +0200)]
Bump version number to 1
We use a single version number. The current state seems to be pretty
stable and has all the important features regarding the DRM/input setup.
Only missing stuff is VTE and console.
This is no stable release but rather a first development release.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Tue, 27 Mar 2012 14:11:38 +0000 (16:11 +0200)]
terminal: rework API
We now use the new input/video hooks to avoid waking up the UI all the
time. This reduces the code in the generic UI subsystem and makes the
terminal handle all the stuff.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Tue, 27 Mar 2012 11:30:42 +0000 (13:30 +0200)]
pty: add kmscon_pty_signal()
Allow to send arbitrary signals to the foreground process group of the
pty. Linux supports the TIOCSIG ioctl so we actually do not need to
implement this on our own, yeah!
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 17:14:30 +0000 (19:14 +0200)]
pty: avoid calling callbacks twice
We shouldn't call the close-cb twice. Therefore, correctly free the FD on
first error, however, keep the signal-callback to get nice log-messages.
Only when the user calls *_close() we eventually stop everything.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 17:02:23 +0000 (19:02 +0200)]
eloop: wait for all childs
Move child-waiting into the eloop subsystem so all childs are always
correctly freed.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 16:50:30 +0000 (18:50 +0200)]
pty: fix using right fd
Use right fd when spawning child process.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 16:37:45 +0000 (18:37 +0200)]
pty: random fixes
Fix some random coding-style issues and adjust to new eloop-rules.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 16:16:05 +0000 (18:16 +0200)]
pty: correctly terminate when child_setup fails
We currently return "ret" when child setup fails, however, we should
rather call exit(). Also avoid cleaning up as this is impossible here
anyway.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 16:10:27 +0000 (18:10 +0200)]
pty: fix wrong fd check
FDs may be 0 so check for >= and not > for fds.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 16:06:33 +0000 (18:06 +0200)]
pty: fix race when starting child
We should do fork() as the last operation when starting the child.
Currently, if our eloop-add() fails, we have a started child but return
failure to the caller. Therefore, the child will stay alive but we do not
use it.
We now perform all startup correctly before fork()'ing so we are always
safe when starting the child.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 15:59:58 +0000 (17:59 +0200)]
eloop: remove old signal sources
Remove the old non-shared signal sources in favor of shared-signals.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 15:58:17 +0000 (17:58 +0200)]
vt: use new shared signals
Use the new shared-signal backend so we can finally remove the old
signals.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 15:53:16 +0000 (17:53 +0200)]
use pthread_sigmask instead of sigprocmask
pthread is already in our vmem due to our dependencies so link to it
explicitly and use pthread_sigmask to avoid buggy sigprocmask in
multi-threaded applications.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 15:44:58 +0000 (17:44 +0200)]
main: use new shared signals
Use the shared signal-implementation instead of the generic signals.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 15:34:49 +0000 (17:34 +0200)]
eloop: add shared signal callbacks
Our current signal source has the problem that a single signal event is
only delivered to one random registered source. This is the design of the
signalfd kernel feature. However, for signals like SIGCHLD it is often
desired to have multiple callbacks. Hence, while keeping the old
signal-source, we now also allow a shared signal source. It is registered
the same way as the old signal source but uses a shared hook.
We may remove the old source so we don't use it in the new implementation.
There are still problems when multiple eloops are used in a single
process and you register the same shared-signum in both eloops. However,
such a design is bad anyway, so we don't care.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 15:08:00 +0000 (17:08 +0200)]
hook: delete by callback *and* data argument
When deleting a hook we should not search for the callback only. Otherwise
we might remove the wrong callback. Therefore, we now search for callback
and data argument. If multiple callbacks are registered with the same data
and cb, then we don't care which one is removed as this wouldn't make any
difference. They behave the same way, anyway.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 14:45:39 +0000 (16:45 +0200)]
eloop: catch EINTR in epoll_wait()
epoll_wait() returns EINTR even if using SA_RESTART for signals.
Therefore, catch EINTR and set count to zero.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 14:22:27 +0000 (16:22 +0200)]
conf: fix local storage of default argv
We assigned stack-storage to a global pointer and therefore we got
seg-faults when using the default. Fix that.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 25 Mar 2012 14:18:03 +0000 (16:18 +0200)]
pty: use reentrant ptsname_r
Avoid static storage in pty subsystem and use the ptsname_r extension.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 17:15:50 +0000 (18:15 +0100)]
pty: introduce --term
Allow setting TERM to different values than the default with a
command-line switch.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 16:45:16 +0000 (17:45 +0100)]
pty: add --login option
Allow to specify a separate login-program that is executed instead of the
default. All arguments specified after --login are considered argv[] of
the new process and not parsed by the library.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 16:44:42 +0000 (17:44 +0100)]
pty: fix log statements
Remove new-lines and add LOG_SUBSYSTEM.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 16:04:42 +0000 (17:04 +0100)]
Fix some signed/unsigned warnings
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 15:44:33 +0000 (16:44 +0100)]
main: wait for child processes
Add SIGCHLD handler and wait for exiting child processes to avoid zombies.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 15:02:30 +0000 (16:02 +0100)]
uterm_video: set displays after waking up
Set CRTC state correctly after waking up. Otherwise the displays will keep
their previous state until the next redraw.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 15:01:13 +0000 (16:01 +0100)]
uterm_video: check online-state before swapping
Check whether the display is online before swapping buffers in DRM
backend.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 14:44:36 +0000 (15:44 +0100)]
main: use ui subsystem
Use the new UI subsystem in the main application. The kmscon application
provides now the same functionality as the test_terminal application.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 14:44:06 +0000 (15:44 +0100)]
ui: add user interface subsystem
The UI subsystem starts the terminals, switches between them and draws the
screen.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 14:22:23 +0000 (15:22 +0100)]
input: change callback logic
Allow multiple callbacks and notify all about new input.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 14:21:57 +0000 (15:21 +0100)]
uterm_video: add callback
Allow applications to register callback and notify them about new or gone
displays.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 13:46:09 +0000 (14:46 +0100)]
misc: add hook structure
The hook structure can be used to provide a central hook where other
subsystems can register callbacks.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 13:15:53 +0000 (14:15 +0100)]
uterm_video: fix drm debug messages
Print more verbose messages on DRM errors.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 12:54:27 +0000 (13:54 +0100)]
kbd_*: fix log messages
Remove new-lines again and set subsystem automatically.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 12:42:16 +0000 (13:42 +0100)]
xkb: use new API
libxkbcommon-git did some API changes
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 12:41:30 +0000 (13:41 +0100)]
test_terminal: parse command line arguments
Parse command line arguments so the input subsystem recognizes the XKB
values.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 12:20:52 +0000 (13:20 +0100)]
input: fix kmscon_input_device_wakeup protection
We cannot check for dev->fd as the fd is only set when the input device
has keys. Therefore check for rfd now.
Also remove the NULL check in *_sleep() as it is not needed. All public
APIs allow passing NULL.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 12:20:01 +0000 (13:20 +0100)]
input: remove refcnt in input-devices
Input-devices are used internally only so we do not need refcounts.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 12:19:02 +0000 (13:19 +0100)]
input: fix log-messages
Remove newline from log-messages and set LOG_SUBSYSTEM to "input". Also
fix some small indentation issues.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 12:02:48 +0000 (13:02 +0100)]
conf: add --xkb-XY options
Allow setting XKB options on the command line.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 24 Mar 2012 11:27:25 +0000 (12:27 +0100)]
input: do not wake up if we are not asleep
Check for state == INPUT_AWAKE before performing wakeup.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 17:38:24 +0000 (18:38 +0100)]
conf: add --silent
Suppress debug, info, notice and warning messages if --silent is given.
This is overwritten by --debug and --verbose.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 17:33:08 +0000 (18:33 +0100)]
main: print strerror() on failure
Print error-string if we cannot initialize kmscon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 17:29:21 +0000 (18:29 +0100)]
main: add proper main application
This is not finished and only implements the basic VT handling +
application initialization.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 17:29:01 +0000 (18:29 +0100)]
vt: fix log messages
Add new improved log messages to the VT subsystem.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 17:27:29 +0000 (18:27 +0100)]
Fix time calculations
eloop.c and log.c use struct timeval to calculate time-diffs but
incorrectly use "-" instead of "+" as the value is already negative.
They also use unsigned integers so fix both occurences.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 17:26:50 +0000 (18:26 +0100)]
build: add conf.c to build
conf.c was recently added so add it to the build-script now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 16:58:19 +0000 (17:58 +0100)]
eloop: correctly set ->exit
When exiting a child eloop we should forward the exit to the parent. Also,
we should reset ->exit on ev_eloop_run() otherwise we cannot run multiple
times.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 16:57:53 +0000 (17:57 +0100)]
eloop: add debug messages
Add two debug messages to track eloop behavior.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 16:42:39 +0000 (17:42 +0100)]
conf: add --switchvt
--switchvt enables kmscon to automatically switch to the new VT that was
opened by kmscon. If this is the current VT, then this has obviously no
effect.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 16:41:52 +0000 (17:41 +0100)]
conf: fix --help handling
Handle --help same way as -h.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 16:40:56 +0000 (17:40 +0100)]
conf: remove unneeded global initialization
Global variables are initialized to 0 automatically. So remove the
initialization.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 16:32:45 +0000 (17:32 +0100)]
eloop: add ev_eloop_run() function
ev_eloop_run() runs the eloop for a given fixed time. If the dispatcher
returns and the timeout isn't reached, then the dispatcher is called
again.
This also adds the *_exit() function which allows to exit the main-loop
and can be called from anywhere (including the callbacks).
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 16:13:01 +0000 (17:13 +0100)]
eloop: several fixes
Fix parameter validation, fix log_* statements, fix indentation and print
messages on HUP/ERR.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 15:59:42 +0000 (16:59 +0100)]
eloop: remove fd from epoll-set on HUP
If a handler does not correctly remove itself on HUP, the epoll-loop will
never sleep again because the fd will always be notified as HUP.
Therefore, remove the fd from the epoll-set directly on HUP. This doesn't
change application behavior so it is safe here.
This also allows other subsystems to ignore HUP/ERR events if they are not
fatal. The FD won't be readded but that may not bother.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 15:46:22 +0000 (16:46 +0100)]
eloop: remove ev_eloop_get_fd()
This function was never used so remove it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 15:42:04 +0000 (16:42 +0100)]
vt: fix callback enum type
We should use the enum type instead of plain "int" to be more verbose
here.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 15:13:50 +0000 (16:13 +0100)]
conf: add configuration subsystem
The conf-subsystem is used throughout the whole source and provides a
global static read-only configuration. The configuration is read on
startup from the command-line and filesystem and then provided to the
other subsystems.
This is no database, that is, the data is not written to a file on
shutdown!
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 15:10:53 +0000 (16:10 +0100)]
eloop: allow an eloop to be an event source
This allows to add one eloop object into another eloop. This is useful if
we want to run a single event source isolated (for instance VT on exit).
The internal epoll-descriptor allows polling so this is a fairly
straightforward implementation.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 13:34:55 +0000 (14:34 +0100)]
console: merge console_cell.c into console.c
We currently have too much layers in the console subsystem. This reduces
performance and produces ugly hacks like our "*_clear_region" function. We
now merge both files so we can directly access the buffer-structure.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 13:29:25 +0000 (14:29 +0100)]
Remove old output subsystem
This subsystem is no longer used so remove it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 13:18:50 +0000 (14:18 +0100)]
Move to new uterm infrastructure
This fixes all compositor/output/context/etc. uses and replaces them by
the new uterm API.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 13:18:28 +0000 (14:18 +0100)]
gl: add viewport helper
This helper correctly sets the viewport to the size of a screen.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 12:35:02 +0000 (13:35 +0100)]
test_output: use new uterm/log/etc. subsystems
Convert the test_output test to use the new subsystems.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 12:34:20 +0000 (13:34 +0100)]
uterm_video: add *_screen_height/width() helpers
A screen may have a different size than the displays so add these two
hooks.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 12:30:36 +0000 (13:30 +0100)]
build: define LOG_ENABLE_DEBUG if debugging
Define LOG_ENABLE_DEBUG if we enabled debugging. The log subsystem uses
this to enable the log_debug() statements.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 12:30:05 +0000 (13:30 +0100)]
gl: add debug statements
Add messages about new shader objects.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 11:53:59 +0000 (12:53 +0100)]
uterm_video: take ref-cnt of display in screen object
Inside a screen object we are independent of the lifetime of the displays
so we need to correctly keep references to them.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 11:50:35 +0000 (12:50 +0100)]
gl: add GL subsystem
The GL subsystem is copied from the old output_context subsystem and now
provides shader and GL-math. It will replace the old output_context subs
soon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 10:49:17 +0000 (11:49 +0100)]
uterm_video: include GLES2 headers instead of GL
We use GLES2 for drawing. There is currently no reason to provide full GL
inside kmscon as we use the basic operations only.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 10:46:39 +0000 (11:46 +0100)]
uterm_video: add dummy fbdev backend
The fbdev backend is non-functional, but we add it for documentational
purposes. It is not built as part of kmscon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 10:45:49 +0000 (11:45 +0100)]
uterm_video: add DRM backend
uterm_video can work with any backend so we need a DRM backend to get the
same functionality as our previous compositor/output API.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 10:26:04 +0000 (11:26 +0100)]
uterm: new video backend
Our old backend was hacked together and hadn't have any structure. This is
a new approach to create the uterm-library inside kmscon. The
uterm-library will contain everything that is needed to run an application
on Linux DRM devices without X11 or Wayland support.
The idea is to move the input subsystem to uterm, too. No other stuff is
currently planned to be included in uterm.
Although uterm is supposed to be a separate library, we do not build it as
such library. We currently include the log-subsystem and the
eloop-handlers in the library so we cannot build it as stand-alone
library. However, we try to keep it separate so if we ever need to export
it, then it should be a one-hour job to do it so.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 23 Mar 2012 10:11:46 +0000 (11:11 +0100)]
log: rewrite log subsystem
The new logger is much more powerful, allows online log-filter
modifications and precise debugging. We still avoid heavy file-operations
as we rely on the caller to forward stderr to a log-file and perform
log-rotations. However, we now provide a simple way to perform this
forward inside the application.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Tue, 20 Mar 2012 18:08:29 +0000 (19:08 +0100)]
eloop: move prefix to "ev_" instead of "kmscon_"
The long "kmscon_" prefix is horrible so move everything to "ev_" now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 15 Mar 2012 19:06:19 +0000 (20:06 +0100)]
eloop: rename from kmscon_ to ev_
We don't need the long kmscon_ prefix so make it shorter.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Ran Benita [Sun, 4 Mar 2012 17:06:34 +0000 (19:06 +0200)]
vte: constify global tables
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>