If all the auto-detection logic of kmscon still does something you don't
want, you can now use this list to override all this logic with a
statically configured white-list.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This helper tests whether a string-list has only a single entry and
compares this with the given entry.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
The old options were quite stupid and low-level. It doesn't make sense to
require users to understand "--dumb" (besides, it sounds wrong).
Therefore, two new options replace the old options:
--drm: Enabled by default. If true, kmscon uses primary DRM devices and
avoids primary fbdev devices. If false, kmscon uses no DRM devices
at all but uses primary fbdev devices now.
--hwaccel: Disabled by default. If true, kmscon tries to
hardware-accelerate any rendering if available. This can also
affect fbdev or other devices in the future.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We currently have no code that sets PRIMARY flags for fbdev devices so
this logic does not make sense with --fbdev. Hence, imply --all-gpus when
--fbdev is set.
Reported-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
By default, kmscon now only uses primary und auxiliary displays. All
uncategorized displays are ignored. This fixes problems with dual-GPU
systems.
--primary-gpu-only makes kmscon not use any auxiliary displays. --all-gpus
makes kmscon also use uncategorized displays.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Instead of using different types we now use flags. This is more
appropriate and will allow us more easily to add new flags.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We now have the ability to pass on local configurations so we no longer
need the global kmscon_conf.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Sorry for the huge commit, but this reworks the whole configuration
handler. We now provide conf_ctx contexts which contain a pointer to the
backing storage and the config-options that are used.
It is also possible to copy config-options now. So we can use the
main-config as default value for seat-configurations.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We are about to introduce per-seat-configuration so we need some helper
macros that will later select the right configuration that we read from.
These helpers simply hook into the kmscon-config and return the correct
value.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This just rearranges all options so they are logically grouped and in the
same order at all places. It also changes the internal variable for
"--fbdev" from "use_fbdev" to "fbdev" so all variables have the same name
as the option-names.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
On seats other than seat0 we do not have any session-management, because
VTs are not available. Furthermore, if we want to get rid of CONFIG_VT
entirely, we also need to provide session-management for seat0.
This commit introduces sessions. Every seat (seats are now managed in
kmscon_seat.c) can have registered sessions. One of the sessions is active
and gets control over all displays. Session switching is entirely handled
inside of kmscon so there is always an active session (except if no
session is registered at all).
This also reworks the seat-management. kmscon_main.c now only manages the
seat allocation/deallocation and video-objects. The seat itself is handled
inside of kmscon_seat.c and does not know of uterm_video objects. Instead,
it is assigned a list of displays that it can use. Everything is still
hotplugging capable so user-experience should be the same as before.
The kmscon_terminal layer is reworked to be session based. So every
terminal is now a single session. By default, a single terminal-session is
created for each seat. This may be changed, though.
There is currently no input-control to change between session with
keyboard hotkeys. However, this will be added when we have more than one
session.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Configuration handling is totally independent from kmscon_main.c so we
move it into a separate file to avoid cluttering up kmscon_main.c.
This also does some basic initialization in kmscon_conf.c which is solely
related to configuration handling and logging.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Everything in this header is solely related to configuration parsing so we
should name it properly. We will also move the configuration-handling from
kmscon_main.c to kmscon_conf.c in some of the next commits to clean up
kmscon-main.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We will be adding more applications to this repository, so to keep better
overview, we prefix kmscon sources with kmscon_*.
The only sources that have no prefix are either shared between
applications (i.e., statically linked) or they were not cleaned up, yet.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>