uterm: enable DRM helpers with UTERM_VIDEO_DUMB

The DRM helpers can actually also be used with dumb-displays so provide it
in both cases.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: add uterm_video_available() helper

This helper provides information whether a given backend is available and
even whether kernel-runtime support is available for this backend.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
kmscon: replace --fbdev/--dumb with --drm/--hwaccel

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>
kmscon: remove deprecated /etc/kmscon.conf support

This was supported for backwards-compatibility, but is no longer
supported. Use the new /etc/kmscon/kmscon.conf files.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: monitor: mark vesafb devices as primary

VESA VGA devices are platform devices so they are always primary.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
shl: add shl_string_list_is() helper

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>
kmscon: add --video-devices option

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>
kmscon: change default grab for "sesison-close" to "BackSpace"

Session management should be done with global keys. This allows us to use
the known "w", "t", "n" keys for "close", "new tab", "new window" etc.
functionality later.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: drm: clear new buffers after allocation

Framebuffers are not guaranteed to be cleared after we allocate them.
Therefore, clear them as all the other uterm-video backends do.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: vt: fix race by blocking signals before setting them

We must block the signals before setting the signal handlers to avoid
retrieving them asynchronously.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: input: fix stopping key-repeat when going asleep

We need to stop each key-repeat when putting input-devices to sleep.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: vt: put input devices asleep when inactive

There is no need to keep the input-devices around while another VT is
active.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: drm: fix device-detection if no master is active

If we try to detect a device name if no master is active, the
drmGetBusid() call will always return an empty string. Therefore, try to
become drm-master and set the correct interface version before doing this.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: vt: fix real VTs when opening the currently active VT

We always assumed that the currently active VT is never the VT we open.
However, this is not true so schedule a VT-activation if this happens.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>