16 Commits

Author SHA1 Message Date
David Herrmann
de02874bf6 uterm: add dumb-drm backend
Nearly all drm drivers provide a GEM/TTM buffer backend called "dumb
buffers". These buffers can simply be mmap'ped like fbdev device so 2D
acceleration is available. This patch adds a backend to uterm-video that
uses these buffers. It is quite similar to the drm backend but removes all
the egl/gl/gles2 dependencies.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-01 14:28:26 +02:00
David Herrmann
749f653e66 uterm: video: add blitting support
All backends that do not provide OpenGL contexts can not implement buffer
blitting so we can at least draw rectangular areas to the framebuffer.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-24 01:03:56 +02:00
David Herrmann
eec3f2ad85 uterm: add WAKEUP and SLEEP signals
Notify all listeners when going to sleep or waking up. This allows saving
energy in the listeners by not redrawing the screen while being asleep.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-06-24 01:01:47 +02:00
David Herrmann
9c7e0159aa uterm_input: introduce UTERM_INPUT_HAS_MODS()
This is a convenient macro to check whether a given set of modifiers is
enabled on the given input event.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-27 16:43:26 +02:00
David Herrmann
233eb5c510 uterm: add VT API
The uterm VT API is designed to support new user-space implementations of
vt-master APIs. If we are on seat0 and CONFIG_VT is enabled, we use the
kernel VT API. In all other cases we currently simply fall back to a
non-op but will implement in the future dbus based APIs or similar to
support VT switching, that is multi-session, on all seats.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-25 09:45:20 +02:00
David Herrmann
07d94e0792 uterm_input: fix typo
The header said *_is_asleep() instead of *_is_awake().

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05 22:35:43 +02:00
David Herrmann
c7cd3bf353 uterm_input: add input layer to uterm
This is a rewrite of the input layer but integrated into uterm. It has the
same functionality but is tightly bound to the concepts behind uterm and
will soon supercede the old implementation.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05 20:33:27 +02:00
David Herrmann
5a5bd3a6f2 uterm_monitor: add input device support
To allow moving all input handling to uterm, too, we need to detect input
devices in the uterm-monitor like all other devices, too.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05 18:21:58 +02:00
David Herrmann
d1be1d60fa uterm_video: remove hotplug awareness
To introduce the new uterm-monitor object we need to remove all the udev
handling from uterm_video. To not break "git bisect" we now remove all the
udev code from uterm_video and uterm_video_drm and make kmscon use the
static /dev/dri/card0 interface for now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05 17:39:46 +02:00
David Herrmann
380868d54b uterm_monitor: add system monitor for full seat support
The new uterm_monitor watches the system for seat-changes and puts all
devices under the correct seat. This allows to run kmscon on multiple
seats in a single process. It now also correctly handles seat-changes,
that is, devices that are reattached to a different seat on runtime.

It is not integrated into the kmscon source, yet, but will soon be.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05 17:16:13 +02:00
David Herrmann
bd9d153691 uterm: fix comments
Update comments to resemble new uterm_video logic.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-03 18:11:40 +02:00
David Herrmann
7e9a31aa4e uterm_video: allow explicitely activating GL ctx
We may have to use multiple GL contexts if we mix DRM and fbdev devices.
Therefore, we need explicit GL-ctx management.
We now allow to explicitely activate a specific GL context. This means,
the user needs to use the right GL context before he creates textures or
similar.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-25 17:35:03 +02:00
David Herrmann
56f5eebf0e 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>
2012-03-25 17:08:00 +02:00
David Herrmann
e6db44385b 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>
2012-03-24 15:21:57 +01:00
David Herrmann
a8562c7a5c 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>
2012-03-23 13:34:20 +01:00
David Herrmann
8e2af97038 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>
2012-03-23 11:26:04 +01:00